3 Commits

Author SHA1 Message Date
1f4a06569d WIP? add optional dict to page-list 2025-08-31 03:14:35 -05:00
5590019c74 WIP 2025-08-31 03:10:01 -05:00
90ead0daea WIP 2025-08-31 03:09:37 -05:00
6 changed files with 81 additions and 89 deletions

View File

@@ -455,14 +455,14 @@ body {
margin-top: 16px; margin-top: 16px;
} }
.page-list > .page { .summary {
padding: 24px; padding: 24px;
border-radius: 12px; border-radius: 12px;
background-color: var(--background-1); background-color: var(--background-1);
color: var(--text-1); color: var(--text-1);
} }
.page > .page-title { .summary-title {
margin-top: 0; margin-top: 0;
} }
@@ -474,18 +474,29 @@ body {
} }
*/ */
.page-title { .page-title,
.summary-title {
margin-bottom: 10px; margin-bottom: 10px;
} }
.page-title a { .page-title a,
.summary-title a {
color: inherit; color: inherit;
} }
.page-title h1 { .page-title h1,
.summary-title h1 {
margin: 0; margin: 0;
} }
.summary-description {
margin-top: 10px;
}
.summary-readmore {
margin-top: 5px;
}
.page-metadata { .page-metadata {
margin-bottom: 24px; margin-bottom: 24px;
} }
@@ -511,14 +522,6 @@ body {
margin-top: 15px; margin-top: 15px;
} }
.page-description {
margin-top: 10px;
}
.readmore {
margin-top: 5px;
}
/* }}} */ /* }}} */
/* Taxonomy list layout {{{ */ /* Taxonomy list layout {{{ */
@@ -571,17 +574,7 @@ body {
/* Series list layout {{{ */ /* Series list layout {{{ */
.page-list.series { .page-list-series-inner {
display: flex;
gap: 80px;
flex-flow: row wrap;
list-style: none;
color: var(--text-0);
padding: 8px;
border-radius: 16px;
}
.page-list.series-inner {
gap: 10px; gap: 10px;
flex-direction: row; flex-direction: row;
flex-flow: row wrap; flex-flow: row wrap;
@@ -590,7 +583,7 @@ body {
padding: 8px; padding: 8px;
border-radius: 16px; border-radius: 16px;
} }
.page-list.series-inner > .page { .page-list-series-inner > .summary {
flex: 1; flex: 1;
min-width: 49%; min-width: 49%;
} }

View File

@@ -1,9 +1,18 @@
<div class="page-list"> {{ $list := dict }}
{{ with . }} {{ $extraclasses := "" }}
{{ with try (index . "list") }}
{{ if .Err }}
{{ $list = $ }}
{{ else }}
{{ $list = .Value }}
{{ $extraclasses = index $ "classes" }}
{{ end }}
{{ end }}
<div class="page-list{{ with $extraclasses }}{{ . }}{{ end }}">
{{ with $list }}
{{ range . }} {{ range . }}
<article class="page">
{{ .Render "summary" }} {{ .Render "summary" }}
</article>
{{ end }} {{ end }}
{{ else }} {{ else }}
<div> <div>

View File

@@ -1,16 +1,18 @@
<h2 class="page-title"> <article class="summary">
<h2 class="summary-title">
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a> <a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }} {{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
</h2> </h2>
{{ partial "page-metadata/author.html" . }} {{ partial "page-metadata/author.html" . }}
{{ with .Summary }} {{ with .Summary }}
<div class="page-description"> <div class="summary-description">
{{ . }} {{ . }}
</div> </div>
{{ end }} {{ end }}
<div class="readmore"> <div class="summary-readmore">
<a href="{{ .Permalink }}">{{ i18n "read_more" }} &rarr;</a> <a href="{{ .Permalink }}">{{ i18n "read_more" }} &rarr;</a>
</div> </div>
</article>

View File

@@ -8,17 +8,5 @@
{{ . }} {{ . }}
{{ end }} {{ end }}
<div class="page-list"> {{ partial "page-list.html" .Paginator.Pages }}
{{ with .Paginator.Pages }}
{{ range . }}
<article class="page">
{{ .Render "summary" }}
</article>
{{ end }}
{{ else }}
<div>
{{ i18n "no_posts" }}
</div>
{{ end }}
</div>
{{ end }} {{ end }}

View File

@@ -1,21 +1,19 @@
<h2 class="page-title"> <article class="summary">
<h2 class="summary-title">
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }} {{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a> <a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }} {{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
</h2> </h2>
{{ partial "page-metadata/series.html" . }} {{ partial "page-metadata/series.html" . }}
{{ with .Summary }} {{ with .Summary }}
<div class="page-description"> <div class="summary-description">
{{ . }} {{ . }}
</div> </div>
{{ end }}
<div class="page-list series-inner">
{{ range .Data.Pages.Reverse }}
<article class="page">
{{ .Render "summary" }}
</article>
{{ end }} {{ end }}
</div>
<div class="page-list page-list-series-inner">
{{ partial "page-list.html" .Data.Pages.Reverse }}
</div>
</article>

View File

@@ -1,19 +1,21 @@
<h2 class="page-title"> <article class="summary">
<h2 class="summary-title">
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }} {{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a> <a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }} {{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
</h2> </h2>
{{ partial "page-metadata/post-short.html" . }} {{ partial "page-metadata/post-short.html" . }}
{{ partial "feature-figure.html" . }} {{ partial "feature-figure.html" . }}
{{ with .Summary }} {{ with .Summary }}
<div class="page-description"> <div class="summary-description">
{{ . }} {{ . }}
</div> </div>
{{ end }} {{ end }}
<div class="readmore"> <div class="summary-readmore">
<a href="{{ .Permalink }}">{{ i18n "read_more" }} &rarr;</a> <a href="{{ .Permalink }}">{{ i18n "read_more" }} &rarr;</a>
</div> </div>
</article>