6 Commits

Author SHA1 Message Date
0790ed94b9 WIP 2025-08-25 18:23:39 -05:00
c7c1ee0f0a Put title on series page in div.page-title like other taxonomy pages
This must've gotten out of sync somehow throughout the history. It
slightly changes the margins by disabling the default one on h1, which
is slightly larger than the breadcrumb nav margin-block's.
2025-08-25 13:44:08 -05:00
d90f64fb86 Only show hr on home if homepageLatestPosts enabled
Otherwise there's just a random line separator for no reason.
2025-08-24 04:05:10 -05:00
20f22b7926 Improve semantic HTML tag usage on content pages 2025-08-24 03:52:23 -05:00
267652a7e4 Use specific class for website footer instead of generic tag selector
Just in case I ever want to use the footer tag anywhere else on the
page. I'm not sure if I'm reading this right, but it sounds like it
would make sense to put all the buttons at the bottom of the content
pages as a footer as well. I will have to reconsider this again in the
future.
2025-08-24 03:49:54 -05:00
310961215e Rename list.html to taxonomy.html in authors and series
Matches the changes made in Hugo 0.146.0
2025-08-24 02:57:33 -05:00
11 changed files with 89 additions and 97 deletions

View File

@@ -295,40 +295,20 @@ body {
margin: 0;
}
/* body-module types:
*
* full-width: no max-width, no margin from the sides of the page
* full-padded: no max-width, but has margin from the left/right page edges
* center: max-width 720px, centered when too large, padded when screen is narrow
*/
.body-module--full-width,
.body-module--full-padded,
.body-module--center-wide {
margin-block: var(--page-margin);
.main-container {
margin: var(--page-margin) auto;
/* use padding because otherwise there's no way to have margin be both auto, and a minimum value */
padding: 0 var(--page-margin);
max-width: calc(720px + 2 * var(--page-margin)); /* padding is included in the element's width */
}
.body-module--full-width {
margin-inline: 0;
}
.body-module-full-padded {
margin-inline: var(--page-margin);
}
.body-module--center {
margin-inline: auto;
/* add the minimum margin here because we are using auto for its centering */
padding-inline: var(--page-margin);
/* account for the padding being included in the element's calculated width */
max-width: calc(720px + 2 * var(--page-margin));
}
footer {
margin-bottom: var(--page-margin);
.site-footer {
margin: var(--page-margin) 0;
text-align: center;
font-size: smaller;
}
footer p {
.site-footer p {
margin: 0;
}
@@ -396,6 +376,10 @@ footer p {
/* Breadcrumb navigation {{{ */
.breadcrumb {
margin: var(--page-margin) 0;
}
.breadcrumb ul {
margin: 0;
padding: 0;

View File

@@ -1,4 +1,4 @@
<nav class="body-module--center breadcrumb" aria-label="{{ i18n "aria_breadcrumbnav" }}">
<nav class="breadcrumb" aria-label="{{ i18n "aria_breadcrumbnav" }}">
<ul>
{{ template "breadcrumbnav" (dict "p1" . "p2" .) }}
</ul>

View File

@@ -1,5 +1,5 @@
{{ if or .Date .Params.authors .Site.Params.readingtime .Site.Params.gitFileURL }}
<div class="page-metadata" aria-label="{{ i18n "aria_post_metadata" }}">
<section class="page-metadata" aria-label="{{ i18n "aria_post_metadata" }}">
{{ if .Date }}
<span class="page-metadata-item" aria-label="{{ i18n "aria_post_meta_date" }}">
{{ partial "icon.html" "calendar" }}
@@ -26,5 +26,5 @@
{{ partial "page-metadata/item/categories.html" . }}
{{ partial "page-metadata/item/tags.html" . }}
</div>
</section>
{{ end }}

View File

@@ -1,5 +1,5 @@
{{ if or .Date .Params.authors .Site.Params.readingtime }}
<div class="page-metadata" aria-label="{{ i18n "aria_post_metadata" }}">
<section class="page-metadata" aria-label="{{ i18n "aria_post_metadata" }}">
{{ if .Date }}
<span class="page-metadata-item" aria-label="date">
{{ partial "icon.html" "calendar" }}
@@ -14,5 +14,5 @@
{{ partial "page-metadata/item/series.html" . }}
{{ partial "page-metadata/item/categories.html" . }}
{{ partial "page-metadata/item/tags.html" . }}
</div>
</section>
{{ end }}

View File

@@ -1,4 +1,4 @@
<div class="share-buttons">
<section class="share-buttons">
{{ if .Site.Params.shareButtons.twitter }}
<a class="twitter-share"
target="_blank"
@@ -66,4 +66,4 @@
{{- partial "icon.html" "printer" -}}
</a>
{{ end }}
</div>
</section>

View File

@@ -1,5 +1,7 @@
{{ define "main" }}
<section class="body-module--center">
<section>
{{ if .Content }}<article>{{ end }}
<h1>
{{ partial "icon.html" "user-circle" }}
{{ .Title | markdownify }}
@@ -9,7 +11,9 @@
{{ . }}
{{ end }}
<div class="page-list">
{{ if .Content }}</article>{{ end }}
<section class="page-list">
{{ with .Paginator.Pages }}
{{ range . }}
<article class="page">
@@ -21,6 +25,6 @@
{{ i18n "no_posts" }}
</div>
{{ end }}
</div>
</section>
</section>
{{ end }}

View File

@@ -8,30 +8,32 @@
{{ partial "top.html" . }}
{{ if not .IsHome }}
{{ partial "breadcrumb.html" . }}
{{ end }}
{{ block "pre-body" . }}{{ end }}
<main id="main-content">
{{ block "main" . }}
THIS TEXT SHOULD NOT SHOW. YUZSIQGHE (that string is so I can grep for it)
<div class="main-container">
{{ if not .IsHome }}
{{ partial "breadcrumb.html" . }}
{{ end }}
</main>
{{ block "post-body" . }}{{ end }}
{{ if or .Site.Copyright .Site.Params.footer }}
<footer class="body-module--center">
{{ with .Site.Copyright }}
{{ . | safeHTML }}
<main id="main-content">
{{ block "main" . }}
THIS TEXT SHOULD NOT SHOW. YUZSIQGHE (that string is so I can grep for it)
{{ end }}
</main>
{{ with .Site.Params.footer }}
{{ . | $.RenderString (dict "display" "block") }}
{{ end }}
</footer>
{{ if or .Site.Copyright .Site.Params.footer }}
<footer class="site-footer">
{{ with .Site.Copyright }}
{{ . | safeHTML }}
{{ end }}
{{ with .Site.Params.footer }}
{{ . | $.RenderString (dict "display" "block") }}
{{ end }}
</footer>
{{ end }}
</div>
{{ block "post-body" . }}
{{/* currently this is only used for related posts */}}
{{ end }}
</body>

View File

@@ -1,15 +1,13 @@
{{ define "main" }}
{{ with .Content }}
<article class="body-module--center">
<article class="homepage-content">
{{ . }}
</article>
<hr class="body-module--center">
{{ end }}
{{ end }}
{{ define "post-body" }}
{{ if .Site.Params.homepageLatestPosts }}
<div class="body-module--center">
<hr>
<section class="homepage-latest-posts">
<h1>
{{ i18n "latest_posts" }}
{{ partial "rss-link.html" . }}
@@ -18,6 +16,6 @@
{{ partial "page-list.html" (.Paginate .Site.RegularPages).Pages }}
{{ partial "pagination.html" . }}
</div>
</section>
{{ end }}
{{ end }}

View File

@@ -1,5 +1,5 @@
{{ define "main" }}
<article class="body-module--center">
<article>
<div class="page-title">
<h1>
{{ .Title | markdownify }}
@@ -11,12 +11,12 @@
{{ partial "series-box.html" . }}
{{ if .Params.Toc }}
<div class="table-of-contents" aria-label="{{ i18n "aria_table_of_contents" }}">
<section class="table-of-contents" aria-label="{{ i18n "aria_table_of_contents" }}">
<details>
<summary>{{ i18n "table_of_contents" }}</summary>
{{ .TableOfContents }}
</details>
</div>
</section>
<div class="table-of-contents print">
{{ i18n "table_of_contents" }}
{{ .TableOfContents }}
@@ -25,14 +25,14 @@
{{ partial "feature-figure.html" . }}
<article class="post-content" data-pagefind-body>
<div class="post-content" data-pagefind-body>
{{ .Content }}
</article>
</div>
{{ partial "series-box.html" . }}
{{ if or .NextInSection .PrevInSection }}
<div class="prevnext">
<nav class="prevnext">
{{ with .NextInSection }}
<a class="prev" href="{{ .Permalink }}">
<div class="prev-caption">
@@ -58,7 +58,7 @@
{{ else }}
<div class="next"></div>
{{ end }}
</div>
</nav>
{{ end }}
{{ if .Site.Params.shareButtons }}
@@ -66,9 +66,9 @@
{{ end }}
{{ if .Params.comments }}
<div class="comments">
<section class="comments">
{{ partial "comments.html" . }}
</div>
</section>
{{ end }}
</article>
{{ end }}
@@ -77,7 +77,7 @@
{{ define "post-body" }}
{{ $related := .Site.RegularPages.Related . | first 10 }}
{{ with $related }}
<div class="body-module--full-width related-posts">
<div class="related-posts">
<hr>
<h1>{{ i18n "related_posts" }}</h1>
{{ partial "page-list.html" . }}

View File

@@ -1,25 +1,27 @@
{{ define "main" }}
<h1>
{{ with .Params.icon }}{{ partial "icon.html" . }}{{ end }}
{{ .Title | markdownify }}
{{ partial "rss-link.html" . }}
</h1>
<section>
<h1>
{{ with .Params.icon }}{{ partial "icon.html" . }}{{ end }}
{{ .Title | markdownify }}
{{ partial "rss-link.html" . }}
</h1>
{{ with .Content }}
{{ . }}
{{ end }}
<div class="list-page-container">
{{ with .Sections }}
<div class="sections">
{{ range . }}
{{ .Render "summary" }}
{{ end }}
</div>
{{ with .Content }}
{{ . }}
{{ end }}
{{ partial "page-list.html" .Paginator.Pages }}
</div>
<div class="list-page-container">
{{ with .Sections }}
<div class="sections">
{{ range . }}
{{ .Render "summary" }}
{{ end }}
</div>
{{ end }}
{{ partial "pagination.html" . }}
{{ partial "page-list.html" .Paginator.Pages }}
</div>
{{ partial "pagination.html" . }}
</section>
{{ end }}

View File

@@ -1,8 +1,10 @@
{{ define "main" }}
<h1>
{{ partial "icon.html" "files" }}
{{ .Title | markdownify }}
</h1>
<div class="page-title">
<h1>
{{ partial "icon.html" "files" }}
{{ .Title | markdownify }}
</h1>
</div>
{{ with .Content }}
{{ . }}