mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-09 01:35:56 +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;
|
||||
}
|
||||
|
||||
.homepage .content {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1 auto;
|
||||
// align-items: center;
|
||||
justify-content: center;
|
||||
margin: 0;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{ 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 }}
|
||||
|
||||
{{ define "main" }}
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
{{ define "main" }}
|
||||
{{ $paginator := .Paginate .Data.Pages }}
|
||||
|
||||
{{ define "main" }}
|
||||
<main class="posts" {{ if eq .Kind "taxonomy" }}data-pagefind-ignore{{ end }}>
|
||||
{{ 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>
|
||||
{{ end }}
|
||||
|
||||
{{ range $paginator.Pages.GroupByDate "2006" }}
|
||||
<div class="posts-group">
|
||||
<div class="post-year">{{ .Key }}</div>
|
||||
|
||||
<ul class="posts-list">
|
||||
{{ range .Pages }}
|
||||
<li class="post-item">
|
||||
<a href="{{.Permalink}}">
|
||||
{{ if .Params.emoji }}<span class="post-emoji">{{ .Params.emoji }}</span>{{ end }}
|
||||
<span class="post-title">{{ if .Title }}{{.Title}}{{ else }}<i>Untitled {{ .Type | singularize -}}</i>{{ end }}</span>
|
||||
<span class="post-day">
|
||||
{{ if .Site.Params.dateformShort }}
|
||||
{{ .Date.Format .Site.Params.dateformShort }}
|
||||
{{ else }}
|
||||
{{ .Date.Format "Jan 2"}}
|
||||
{{ end }}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ partial "pagination-list.html" . }}
|
||||
<ul class="posts-list">
|
||||
{{ range .Pages.ByDate }}
|
||||
<li class="post-item">
|
||||
<a href="{{.Permalink}}">
|
||||
{{ if .Params.emoji }}<span class="post-emoji">{{ .Params.emoji }}</span>{{ end }}
|
||||
<span class="post-title">{{ if .Title }}{{.Title}}{{ else }}<i>Untitled {{ .Type | singularize -}}</i>{{ end }}</span>
|
||||
<span class="post-day">
|
||||
{{ if .Site.Params.dateformShort }}
|
||||
{{ .Date.Format .Site.Params.dateformShort }}
|
||||
{{ else }}
|
||||
{{ .Date.Format "Jan 2"}}
|
||||
{{ end }}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</main>
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in a new issue