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

View File

@@ -1,9 +1,18 @@
<div class="page-list">
{{ with . }}
{{ $list := dict }}
{{ $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 . }}
<article class="page">
{{ .Render "summary" }}
</article>
{{ .Render "summary" }}
{{ end }}
{{ else }}
<div>

View File

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

View File

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

View File

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