1 Commits

Author SHA1 Message Date
0790ed94b9 WIP 2025-08-25 18:23:39 -05:00
10 changed files with 152 additions and 143 deletions

View File

@@ -340,7 +340,7 @@ body {
* or it will need its hover background to be chopped off on the left */ * or it will need its hover background to be chopped off on the left */
} }
.top-brand { .brand {
flex-grow: 1; flex-grow: 1;
margin: 8px var(--page-margin); margin: 8px var(--page-margin);
font-size: 1.25em; font-size: 1.25em;
@@ -348,27 +348,27 @@ body {
align-items: center; align-items: center;
} }
.top-brand > a { .brand a {
color: inherit; color: inherit;
font-weight: bold; font-weight: bold;
} }
.top-navbar { .navbar {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.top-navbar-item { .navbar-item {
padding: 12px var(--page-margin); padding: 12px var(--page-margin);
white-space: nowrap; white-space: nowrap;
} }
.top-navbar-item:hover { .navbar-item:hover {
background-color: var(--background-2); background-color: var(--background-2);
text-decoration: none; text-decoration: none;
} }
.top-navbar-item--active { .navbar-item.active {
font-weight: bold; font-weight: bold;
} }
@@ -446,6 +446,13 @@ body {
/* List layout {{{ */ /* List layout {{{ */
/* flexbox container for sections and main page list */
.list-page-container {
display: flex;
flex-direction: column;
gap: 40px;
}
.page-list { .page-list {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@@ -455,14 +462,14 @@ body {
margin-top: 16px; margin-top: 16px;
} }
.summary { .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);
} }
.summary-title { .page > .page-title {
margin-top: 0; margin-top: 0;
} }
@@ -474,29 +481,18 @@ 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;
} }
@@ -522,6 +518,14 @@ body {
margin-top: 15px; margin-top: 15px;
} }
.page-description {
margin-top: 10px;
}
.readmore {
margin-top: 5px;
}
/* }}} */ /* }}} */
/* Taxonomy list layout {{{ */ /* Taxonomy list layout {{{ */
@@ -574,7 +578,17 @@ body {
/* Series list layout {{{ */ /* Series list layout {{{ */
.page-list-series-inner { .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 {
gap: 10px; gap: 10px;
flex-direction: row; flex-direction: row;
flex-flow: row wrap; flex-flow: row wrap;
@@ -583,7 +597,7 @@ body {
padding: 8px; padding: 8px;
border-radius: 16px; border-radius: 16px;
} }
.page-list-series-inner > .summary { .page-list.series-inner > .page {
flex: 1; flex: 1;
min-width: 49%; min-width: 49%;
} }
@@ -593,7 +607,6 @@ body {
/* Subsections on list pages {{{ */ /* Subsections on list pages {{{ */
.sections { .sections {
margin-bottom: 60px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 10px; gap: 10px;
@@ -604,9 +617,6 @@ body {
color: var(--text-1); color: var(--text-1);
border-radius: 12px; border-radius: 12px;
padding: 1px 25px; padding: 1px 25px;
display: flex;
flex-direction: row;
justify-content: space-between;
} }
.section:hover { .section:hover {
@@ -630,16 +640,6 @@ body {
margin-bottom: 5px; margin-bottom: 5px;
} }
.section-arrow {
margin-block: auto;
max-height: fit-content;
float: right;
}
.section-arrow > .icon {
height: 48px;
width: 48px;
}
/* }}} */ /* }}} */

View File

@@ -0,0 +1,4 @@
{{/*
Create a file named `layouts/partials/additional-head.html` at your site root to
add extra tags into <head>. Page variables are passed.
*/}}

View File

@@ -1,18 +1,9 @@
{{ $list := dict }} <div class="page-list">
{{ $extraclasses := "" }} {{ with . }}
{{ 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,13 +1,13 @@
<header class="top"> <header class="top">
<div class="top-brand"> <div class="brand">
<a href="{{ .Site.Home.Permalink | absLangURL }}"> <a href="{{ .Site.Home.Permalink | absLangURL }}">
{{ .Site.Title | markdownify }} {{ .Site.Title | markdownify }}
</a> </a>
</div> </div>
<nav class="top-navbar" aria-label="{{ i18n "aria_navbar" }}"> <nav class="navbar" aria-label="{{ i18n "aria_navbar" }}">
{{ with .Site.Home }} {{ with .Site.Home }}
<a class="top-navbar-item{{ if $.IsHome }} top-navbar-item--active{{ end }}" href="{{ .Permalink | absLangURL }}">{{ .Title | markdownify }}</a> <a class="navbar-item{{ if $.IsHome }} active{{ end }}" href="{{ .Permalink | absLangURL }}">{{ .Title | markdownify }}</a>
{{ end }} {{ end }}
{{ range .Site.Menus.main }} {{ range .Site.Menus.main }}
@@ -16,7 +16,7 @@
{{ if or ($.HasMenuCurrent .Menu .) (eq .Page $) }} {{ if or ($.HasMenuCurrent .Menu .) (eq .Page $) }}
{{ $isActive = true }} {{ $isActive = true }}
{{ end }} {{ end }}
<a class="top-navbar-item{{ if $isActive }} top-navbar-item--active{{ end }}" <a class="navbar-item{{ if $isActive }} active{{ end }}"
{{ if strings.HasPrefix .URL "http" }}target="_blank" rel="noopener"{{ end }} {{ if strings.HasPrefix .URL "http" }}target="_blank" rel="noopener"{{ end }}
href="{{ .URL }}">{{ .Name }}</a> href="{{ .URL }}">{{ .Name }}</a>
{{ end }} {{ end }}

View File

@@ -1,18 +1,16 @@
<article class="summary"> <h2 class="page-title">
<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="summary-description"> <div class="page-description">
{{ . }} {{ . }}
</div> </div>
{{ end }} {{ end }}
<div class="summary-readmore"> <div class="readmore">
<a href="{{ .Permalink }}">{{ i18n "read_more" }} &rarr;</a> <a href="{{ .Permalink }}">{{ i18n "read_more" }} &rarr;</a>
</div> </div>
</article>

View File

@@ -1,4 +1,7 @@
{{ define "main" }} {{ define "main" }}
<section>
{{ if .Content }}<article>{{ end }}
<h1> <h1>
{{ partial "icon.html" "user-circle" }} {{ partial "icon.html" "user-circle" }}
{{ .Title | markdownify }} {{ .Title | markdownify }}
@@ -8,5 +11,20 @@
{{ . }} {{ . }}
{{ end }} {{ end }}
{{ partial "page-list.html" .Paginator.Pages }} {{ if .Content }}</article>{{ end }}
<section class="page-list">
{{ with .Paginator.Pages }}
{{ range . }}
<article class="page">
{{ .Render "summary" }}
</article>
{{ end }}
{{ else }}
<div>
{{ i18n "no_posts" }}
</div>
{{ end }}
</section>
</section>
{{ end }} {{ end }}

View File

@@ -1,4 +1,5 @@
{{ define "main" }} {{ define "main" }}
<section>
<h1> <h1>
{{ with .Params.icon }}{{ partial "icon.html" . }}{{ end }} {{ with .Params.icon }}{{ partial "icon.html" . }}{{ end }}
{{ .Title | markdownify }} {{ .Title | markdownify }}
@@ -9,6 +10,7 @@
{{ . }} {{ . }}
{{ end }} {{ end }}
<div class="list-page-container">
{{ with .Sections }} {{ with .Sections }}
<div class="sections"> <div class="sections">
{{ range . }} {{ range . }}
@@ -18,6 +20,8 @@
{{ end }} {{ end }}
{{ partial "page-list.html" .Paginator.Pages }} {{ partial "page-list.html" .Paginator.Pages }}
</div>
{{ partial "pagination.html" . }} {{ partial "pagination.html" . }}
</section>
{{ end }} {{ end }}

View File

@@ -1,6 +1,5 @@
<a class="section-anchor" href="{{ .Permalink }}"> <a class="section-anchor" href="{{ .Permalink }}">
<div class="section"> <div class="section">
<div>
<h2 class="section-title"> <h2 class="section-title">
{{ with .Params.icon }}{{ partial "icon.html" . }}{{ end }} {{ with .Params.icon }}{{ partial "icon.html" . }}{{ end }}
{{ .Title | markdownify }} {{ .Title | markdownify }}
@@ -12,9 +11,4 @@
</div> </div>
{{ end }} {{ end }}
</div> </div>
<div class="section-arrow">
{{ partial "icon.html" "arrow-right" }}
</div>
</div>
</a> </a>

View File

@@ -1,19 +1,21 @@
<article class="summary"> <h2 class="page-title">
<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="summary-description"> <div class="page-description">
{{ . }} {{ . }}
</div> </div>
{{ end }} {{ end }}
<div class="page-list page-list-series-inner"> <div class="page-list series-inner">
{{ partial "page-list.html" .Data.Pages.Reverse }} {{ range .Data.Pages.Reverse }}
</div> <article class="page">
</article> {{ .Render "summary" }}
</article>
{{ end }}
</div>

View File

@@ -1,21 +1,19 @@
<article class="summary"> <h2 class="page-title">
<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="summary-description"> <div class="page-description">
{{ . }} {{ . }}
</div> </div>
{{ end }} {{ end }}
<div class="summary-readmore"> <div class="readmore">
<a href="{{ .Permalink }}">{{ i18n "read_more" }} &rarr;</a> <a href="{{ .Permalink }}">{{ i18n "read_more" }} &rarr;</a>
</div> </div>
</article>