mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-09 18:06:07 +01:00
Fix homepage
This commit is contained in:
parent
abf0ec191e
commit
4c2d44d78b
3 changed files with 23 additions and 29 deletions
|
@ -456,11 +456,14 @@ ol ol {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.homepage .content {
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
flex: 1 auto;
|
flex: 1 auto;
|
||||||
// align-items: center;
|
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{ define "body" }}
|
{{ define "body" }}
|
||||||
<body class="{{ if .Site.Params.backgroundImage }} background-image" style="background-image: url('{{ .Site.Params.backgroundImage }}');" {{ else }}"{{ end }}>
|
<body class="homepage {{ if .Site.Params.backgroundImage }} background-image" style="background-image: url('{{ .Site.Params.backgroundImage }}');" {{ else }}"{{ end }}>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
{{ $paginator := .Paginate .Data.Pages }}
|
|
||||||
|
|
||||||
<main class="posts" {{ if eq .Kind "taxonomy" }}data-pagefind-ignore{{ end }}>
|
<main class="posts" {{ if eq .Kind "taxonomy" }}data-pagefind-ignore{{ end }}>
|
||||||
{{ partial "memex-header.html" . }}
|
{{ partial "memex-header.html" . }}
|
||||||
|
|
||||||
|
@ -19,29 +17,22 @@
|
||||||
<div class="post-content e-content" data-pagefind-body data-pagefind-filter="type:{{.Type | title}}">{{ .Content }}</div>
|
<div class="post-content e-content" data-pagefind-body data-pagefind-filter="type:{{.Type | title}}">{{ .Content }}</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ range $paginator.Pages.GroupByDate "2006" }}
|
<ul class="posts-list">
|
||||||
<div class="posts-group">
|
{{ range .Pages.ByDate }}
|
||||||
<div class="post-year">{{ .Key }}</div>
|
<li class="post-item">
|
||||||
|
<a href="{{.Permalink}}">
|
||||||
<ul class="posts-list">
|
{{ if .Params.emoji }}<span class="post-emoji">{{ .Params.emoji }}</span>{{ end }}
|
||||||
{{ range .Pages }}
|
<span class="post-title">{{ if .Title }}{{.Title}}{{ else }}<i>Untitled {{ .Type | singularize -}}</i>{{ end }}</span>
|
||||||
<li class="post-item">
|
<span class="post-day">
|
||||||
<a href="{{.Permalink}}">
|
{{ if .Site.Params.dateformShort }}
|
||||||
{{ if .Params.emoji }}<span class="post-emoji">{{ .Params.emoji }}</span>{{ end }}
|
{{ .Date.Format .Site.Params.dateformShort }}
|
||||||
<span class="post-title">{{ if .Title }}{{.Title}}{{ else }}<i>Untitled {{ .Type | singularize -}}</i>{{ end }}</span>
|
{{ else }}
|
||||||
<span class="post-day">
|
{{ .Date.Format "Jan 2"}}
|
||||||
{{ if .Site.Params.dateformShort }}
|
{{ end }}
|
||||||
{{ .Date.Format .Site.Params.dateformShort }}
|
</span>
|
||||||
{{ else }}
|
</a>
|
||||||
{{ .Date.Format "Jan 2"}}
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</span>
|
</ul>
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{{ end }}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
{{ partial "pagination-list.html" . }}
|
|
||||||
</main>
|
</main>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in a new issue