Fix homepage

This commit is contained in:
JP Hastings-Spital 2023-10-24 20:42:10 +01:00
parent abf0ec191e
commit 4c2d44d78b
3 changed files with 23 additions and 29 deletions

View file

@ -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;

View file

@ -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" }}

View file

@ -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,12 +17,8 @@
<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" }}
<div class="posts-group">
<div class="post-year">{{ .Key }}</div>
<ul class="posts-list"> <ul class="posts-list">
{{ range .Pages }} {{ range .Pages.ByDate }}
<li class="post-item"> <li class="post-item">
<a href="{{.Permalink}}"> <a href="{{.Permalink}}">
{{ if .Params.emoji }}<span class="post-emoji">{{ .Params.emoji }}</span>{{ end }} {{ if .Params.emoji }}<span class="post-emoji">{{ .Params.emoji }}</span>{{ end }}
@ -40,8 +34,5 @@
</li> </li>
{{ end }} {{ end }}
</ul> </ul>
</div>
{{ end }}
{{ partial "pagination-list.html" . }}
</main> </main>
{{ end }} {{ end }}