Merge branch 'page-list-and-summary-css-cleanup'

This commit is contained in:
2025-09-01 02:51:40 -05:00
10 changed files with 135 additions and 123 deletions

View File

@@ -174,30 +174,6 @@ video {
max-width: 100%; max-width: 100%;
} }
figure > .figure-media {
padding: 5px;
}
figure > .figure-media.border {
border: 2px solid var(--figure-border);
}
.post-media > figure > .figure-media {
border: 7px solid var(--figure-border);
}
figure {
display: block;
text-align: center;
margin: 0;
}
figcaption {
font-style: italic;
font-size: small;
text-align: center;
}
a { a {
color: var(--link-0); color: var(--link-0);
text-decoration: inherit; text-decoration: inherit;
@@ -444,26 +420,26 @@ body {
/* }}} */ /* }}} */
/* List layout {{{ */ /* Summary card formatting {{{ */
.page-list { .summary-card {
display: flex;
flex-direction: column;
list-style: none;
padding: 0;
gap: 40px;
margin-top: 16px;
}
.page-list > .page {
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-card-title {
margin-top: 0; margin-top: 0;
margin-bottom: 10px;
}
.summary-card-title a {
color: inherit;
}
.summary-card-title h1 {
margin: 0;
} }
/* hugo just can't handle this feature /* hugo just can't handle this feature
@@ -474,18 +450,6 @@ body {
} }
*/ */
.page-title {
margin-bottom: 10px;
}
.page-title a {
color: inherit;
}
.page-title h1 {
margin: 0;
}
.page-metadata { .page-metadata {
margin-bottom: 24px; margin-bottom: 24px;
} }
@@ -507,20 +471,74 @@ body {
content: ","; content: ",";
} }
.post-media { /* for formatting of the featured image/media, see the .featured-media class */
margin-top: 15px;
}
.page-description { .summary-card-description {
margin-top: 10px; margin-top: 10px;
} }
.readmore { .summary-card-readmore {
margin-top: 5px; margin-top: 5px;
} }
/* }}} */ /* }}} */
/* Figures, and featured media component (used in page.html and summary-card) {{{ */
figure > .figure-media {
padding: 5px;
}
figure > .figure-media.border {
border: 2px solid var(--figure-border);
}
figure {
display: block;
text-align: center;
margin: 0;
}
figcaption {
font-style: italic;
font-size: small;
text-align: center;
}
.featured-media {
margin-top: 15px;
}
.featured-media > figure > .figure-media {
border: 7px solid var(--figure-border);
}
/* }}} */
/* List layout {{{ */
.page-list {
display: flex;
flex-direction: column;
list-style: none;
padding: 0;
gap: 40px;
margin-top: 16px;
}
.page-title {
margin-bottom: 10px;
}
.page-title a {
color: inherit;
}
.page-title h1 {
margin: 0;
}
/* }}} */
/* Taxonomy list layout {{{ */ /* Taxonomy list layout {{{ */
.taxonomy-list a, .taxonomy-list a,
@@ -571,17 +589,11 @@ body {
/* Series list layout {{{ */ /* Series list layout {{{ */
.page-list.series { .page-list--series {
display: flex;
gap: 80px; 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; gap: 10px;
flex-direction: row; flex-direction: row;
flex-flow: row wrap; flex-flow: row wrap;
@@ -590,7 +602,7 @@ body {
padding: 8px; padding: 8px;
border-radius: 16px; border-radius: 16px;
} }
.page-list.series-inner > .page { .page-list--series-inner > .summary-card {
flex: 1; flex: 1;
min-width: 49%; min-width: 49%;
} }
@@ -776,16 +788,16 @@ body {
margin: var(--page-margin); margin: var(--page-margin);
} }
.related-posts .page { .related-posts .summary-card {
min-width: 300px; min-width: 300px;
max-width: 300px; max-width: 300px;
} }
.related-posts .page:first-child { .related-posts .summary-card:first-child {
margin-left: var(--page-margin); margin-left: var(--page-margin);
} }
.related-posts .page:last-child { .related-posts .summary-card:last-child {
margin-right: var(--page-margin); margin-right: var(--page-margin);
} }

View File

@@ -48,6 +48,8 @@ post_count:
# Navigation # Navigation
read_more: read_more:
other: "Read more" other: "Read more"
see_posts:
other: "See posts"
related_posts: related_posts:
other: "Related Posts" other: "Related Posts"

View File

@@ -1,5 +1,5 @@
{{ with .Resources.Get "feature" }} {{ with .Resources.Get "feature" }}
<div class="post-media"> <div class="featured-media">
<figure> <figure>
{{ partial "embed-resource.html" . }} {{ partial "embed-resource.html" . }}
{{ with .Title }} {{ with .Title }}

View File

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

View File

@@ -11,9 +11,7 @@
<div class="page-list"> <div class="page-list">
{{ with .Paginator.Pages }} {{ with .Paginator.Pages }}
{{ range . }} {{ range . }}
<article class="page"> {{ .Render "summary" }}
{{ .Render "summary" }}
</article>
{{ end }} {{ end }}
{{ else }} {{ else }}
<div> <div>

View File

@@ -23,7 +23,7 @@
</div> </div>
{{ end }} {{ end }}
{{ partial "feature-figure.html" . }} {{ partial "featured-media.html" . }}
<div class="post-content" data-pagefind-body> <div class="post-content" data-pagefind-body>
{{ .Content }} {{ .Content }}

View File

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

View File

@@ -10,12 +10,10 @@
{{ . }} {{ . }}
{{ end }} {{ end }}
<div class="page-list series"> <div class="page-list page-list--series">
{{ with .Paginator.Pages }} {{ with .Paginator.Pages }}
{{ range . }} {{ range . }}
<div class="page series"> {{ .Render "summary" }}
{{ .Render "summary" }}
</div>
{{ end }} {{ end }}
{{ else }} {{ else }}
<div> <div>

View File

@@ -1,19 +1,21 @@
<h2 class="page-title"> <article class="summary-card">
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }} <h2 class="summary-card-title">
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a> {{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }} <a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
</h2> {{ 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 "featured-media.html" . }}
{{ with .Summary }} {{ with .Summary }}
<div class="page-description"> <div class="summary-card-description">
{{ . }} {{ . }}
</div>
{{ end }}
<div class="summary-card-readmore">
<a href="{{ .Permalink }}">{{ i18n "read_more" }} &rarr;</a>
</div> </div>
{{ end }} </article>
<div class="readmore">
<a href="{{ .Permalink }}">{{ i18n "read_more" }} &rarr;</a>
</div>