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 */
}
.top-brand {
.brand {
flex-grow: 1;
margin: 8px var(--page-margin);
font-size: 1.25em;
@@ -348,27 +348,27 @@ body {
align-items: center;
}
.top-brand > a {
.brand a {
color: inherit;
font-weight: bold;
}
.top-navbar {
.navbar {
display: flex;
flex-wrap: wrap;
}
.top-navbar-item {
.navbar-item {
padding: 12px var(--page-margin);
white-space: nowrap;
}
.top-navbar-item:hover {
.navbar-item:hover {
background-color: var(--background-2);
text-decoration: none;
}
.top-navbar-item--active {
.navbar-item.active {
font-weight: bold;
}
@@ -446,6 +446,13 @@ body {
/* List layout {{{ */
/* flexbox container for sections and main page list */
.list-page-container {
display: flex;
flex-direction: column;
gap: 40px;
}
.page-list {
display: flex;
flex-direction: column;
@@ -455,14 +462,14 @@ body {
margin-top: 16px;
}
.summary {
.page-list > .page {
padding: 24px;
border-radius: 12px;
background-color: var(--background-1);
color: var(--text-1);
}
.summary-title {
.page > .page-title {
margin-top: 0;
}
@@ -474,29 +481,18 @@ body {
}
*/
.page-title,
.summary-title {
.page-title {
margin-bottom: 10px;
}
.page-title a,
.summary-title a {
.page-title a {
color: inherit;
}
.page-title h1,
.summary-title h1 {
.page-title h1 {
margin: 0;
}
.summary-description {
margin-top: 10px;
}
.summary-readmore {
margin-top: 5px;
}
.page-metadata {
margin-bottom: 24px;
}
@@ -522,6 +518,14 @@ body {
margin-top: 15px;
}
.page-description {
margin-top: 10px;
}
.readmore {
margin-top: 5px;
}
/* }}} */
/* Taxonomy list layout {{{ */
@@ -574,7 +578,17 @@ body {
/* 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;
flex-direction: row;
flex-flow: row wrap;
@@ -583,7 +597,7 @@ body {
padding: 8px;
border-radius: 16px;
}
.page-list-series-inner > .summary {
.page-list.series-inner > .page {
flex: 1;
min-width: 49%;
}
@@ -593,7 +607,6 @@ body {
/* Subsections on list pages {{{ */
.sections {
margin-bottom: 60px;
display: flex;
flex-direction: column;
gap: 10px;
@@ -604,9 +617,6 @@ body {
color: var(--text-1);
border-radius: 12px;
padding: 1px 25px;
display: flex;
flex-direction: row;
justify-content: space-between;
}
.section:hover {
@@ -630,16 +640,6 @@ body {
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 }}
{{ $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 }}
<div class="page-list">
{{ with . }}
{{ range . }}
<article class="page">
{{ .Render "summary" }}
</article>
{{ end }}
{{ else }}
<div>

View File

@@ -1,13 +1,13 @@
<header class="top">
<div class="top-brand">
<div class="brand">
<a href="{{ .Site.Home.Permalink | absLangURL }}">
{{ .Site.Title | markdownify }}
</a>
</div>
<nav class="top-navbar" aria-label="{{ i18n "aria_navbar" }}">
<nav class="navbar" aria-label="{{ i18n "aria_navbar" }}">
{{ 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 }}
{{ range .Site.Menus.main }}
@@ -16,7 +16,7 @@
{{ if or ($.HasMenuCurrent .Menu .) (eq .Page $) }}
{{ $isActive = true }}
{{ 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 }}
href="{{ .URL }}">{{ .Name }}</a>
{{ end }}

View File

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

View File

@@ -1,4 +1,7 @@
{{ define "main" }}
<section>
{{ if .Content }}<article>{{ end }}
<h1>
{{ partial "icon.html" "user-circle" }}
{{ .Title | markdownify }}
@@ -8,5 +11,20 @@
{{ . }}
{{ 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 }}

View File

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

View File

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

View File

@@ -1,5 +1,4 @@
<article class="summary">
<h2 class="summary-title">
<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 }}
@@ -8,12 +7,15 @@
{{ partial "page-metadata/series.html" . }}
{{ with .Summary }}
<div class="summary-description">
<div class="page-description">
{{ . }}
</div>
{{ end }}
<div class="page-list page-list-series-inner">
{{ partial "page-list.html" .Data.Pages.Reverse }}
</div>
<div class="page-list series-inner">
{{ range .Data.Pages.Reverse }}
<article class="page">
{{ .Render "summary" }}
</article>
{{ end }}
</div>

View File

@@ -1,5 +1,4 @@
<article class="summary">
<h2 class="summary-title">
<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 }}
@@ -10,12 +9,11 @@
{{ partial "feature-figure.html" . }}
{{ with .Summary }}
<div class="summary-description">
<div class="page-description">
{{ . }}
</div>
{{ end }}
<div class="summary-readmore">
<div class="readmore">
<a href="{{ .Permalink }}">{{ i18n "read_more" }} &rarr;</a>
</div>
</article>