13 Commits

22 changed files with 218 additions and 187 deletions

View File

@ -123,8 +123,8 @@
gap: 40px;
}
.page-list ul,
.series-taxonomy ul {
.page-list,
.series-taxonomy-list {
display: flex;
flex-direction: column;
list-style: none;
@ -132,12 +132,13 @@
gap: 40px;
}
.series-taxonomy ul {
.series-taxonomy-list {
gap: 80px;
}
.page-list li,
.series-taxonomy li {
.page-list .post,
.series-taxonomy-list .series-taxonomy,
.series-taxonomy .post {
padding-top: 8px;
padding-left: 24px;
padding-right: 24px;
@ -158,6 +159,11 @@
margin-bottom: 10px;
}
.post-title h1,
.author-name h1 {
margin: 0;
}
.post-title a,
.author-name a {
color: inherit;
@ -172,7 +178,7 @@
.post-metadata,
.author-metadata {
margin-bottom: 15px;
margin-bottom: 24px;
}
.categories,
@ -206,7 +212,7 @@
margin: 0;
}
.taxonomy-list ul {
.taxonomy-list {
list-style: none;
padding: 0;
display: flex;
@ -214,7 +220,7 @@
gap: 10px;
}
.taxonomy-list li {
.taxonomy-list .taxonomy-term {
background-color: var(--background-1);
color: var(--text-1);
padding: 8px 12px;
@ -230,7 +236,7 @@
}
@media (max-width: 480px) {
.taxonomy-list li {
.taxonomy-list .taxonomy-term {
flex-direction: column;
gap: 4px;
}
@ -244,7 +250,7 @@
/* Series list format */
.series-pages ul {
.series-page-list {
display: flex;
gap: 10px;
flex-flow: row wrap;
@ -255,7 +261,7 @@
border-radius: 16px;
}
.series-pages li {
.series-page-list .post {
flex: 1;
min-width: 49%;
}
@ -304,8 +310,13 @@
/* Header formatting (website title and article section headers) */
h1.header {
.header {
margin: 16px 0;
}
.header h1 {
font-size: 1.5em;
font-weight: bold;
}
.header a,
@ -347,6 +358,7 @@ h1.header {
}
/* Related posts */
.full-width-page-list {
/* make left/right 0 margin so it takes up full width */
@ -359,16 +371,16 @@ h1.header {
margin-right: 20px;
}
.full-width-page-list li {
.full-width-page-list .post {
min-width: 300px;
max-width: 300px;
}
.full-width-page-list li:first-child {
.full-width-page-list .post:first-child {
margin-left: 20px;
}
.full-width-page-list li:last-child {
.full-width-page-list .post:last-child {
margin-right: 20px;
}
@ -393,7 +405,7 @@ h1.header {
}
}
.full-width-page-list .page-list ul {
.full-width-page-list .page-list {
display: flex;
flex-direction: row;
gap: 20px;
@ -401,6 +413,7 @@ h1.header {
}
/* Social media share buttons */
.share-buttons {
background: var(--background-1);
@ -439,6 +452,7 @@ h1.header {
*/
/* See also formating */
.see-also {
background-color: var(--background-1);
@ -453,6 +467,7 @@ h1.header {
}
/* Back to top */
#back-to-top {
position: fixed;
@ -624,6 +639,14 @@ hr {
border: 1px solid var(--background-3);
}
@media (min-width: 720px) {
.full-width-hr {
/* see also: the related-posts section too */
margin-left: calc(-100vw / 2 + 760px / 2);
margin-right: calc(-100vw / 2 + 760px / 2);
}
}
table.markdown {
border-collapse: collapse;
border: 2px solid var(--text-1);
@ -648,6 +671,13 @@ table.markdown {
color: var(--text-1);
}
:target {
animation: target-fade 10s ease-out;
}
@keyframes target-fade {
0% { background-color: var(--background-yellow-2); }
}
* {
box-sizing: border-box;
}
@ -655,13 +685,21 @@ table.markdown {
/* Code blocks */
.highlight {
.highlight > .chroma {
margin: 16px 0;
overflow: auto;
}
.highlight > pre {
padding: 12px 8px;
overflow: auto;
.chroma {
background-color: var(--background-1) !important;
}
.chroma .gp {
/* Generic Prompt symbol */
user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
}
:not(pre) > code {
@ -790,46 +828,21 @@ li.disabled > .page-link:hover {
/* Breadcrumb navigation */
.breadcrumb {
margin: 16px 0;
.breadcrumb ul {
margin: 30px 0 20px;
}
.breadcrumb ul {
padding: 0;
list-style: none;
display: flex;
justify-content: space-between;
flex-grow: 1;
}
.breadcrumb li {
display: inline;
padding: 8px;
background-color: var(--background-1);
}
.breadcrumb li:hover {
background-color: var(--background-2);
cursor: pointer;
}
.breadcrumb li a:hover {
text-decoration: none;
}
.breadcrumb li.active:hover {
cursor: default;
}
.breadcrumb li:first-child {
border-top-left-radius: 12px;
border-bottom-left-radius: 12px;
padding-left: 12px;
}
.breadcrumb li:last-child {
border-top-right-radius: 12px;
border-bottom-right-radius: 12px;
padding-right: 12px;
.breadcrumb li+li:before {
content: "»"
}

View File

@ -1,14 +1,21 @@
/* tango style */
@media print, (prefers-color-scheme: light) {
.chroma {
color: black;
}
/* Background */ .bg { background-color: #f8f8f8 }
/* PreWrapper */ .chroma { background-color: #f8f8f8; }
/* Other */ .chroma .x { color: #000000 }
/* Error */ .chroma .err { color: #a40000 }
/* CodeLine */ .chroma .cl { }
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; }
/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #ffffcc }
/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; }
/* LineHighlight */ .chroma .hl { background-color: #ffffcc }
/* LineNumbersTable */ .chroma .lnt { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
/* LineNumbers */ .chroma .ln { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
/* Line */ .chroma .line { display: flex; }
/* Keyword */ .chroma .k { color: #204a87; font-weight: bold }
/* KeywordConstant */ .chroma .kc { color: #204a87; font-weight: bold }
/* KeywordDeclaration */ .chroma .kd { color: #204a87; font-weight: bold }
@ -83,6 +90,7 @@
/* GenericTraceback */ .chroma .gt { color: #a40000; font-weight: bold }
/* GenericUnderline */ .chroma .gl { color: #000000; text-decoration: underline }
/* TextWhitespace */ .chroma .w { color: #f8f8f8; text-decoration: underline }
}
@media (prefers-color-scheme: light) {

View File

@ -1,11 +1,16 @@
/* Background */ .chroma { color: #d0d0d0; background-color: #202020 }
/* native style */
/* Background */ .bg { color: #d0d0d0; background-color: #202020 }
/* PreWrapper */ .chroma { color: #d0d0d0; background-color: #202020; }
/* Other */ .chroma .x { }
/* Error */ .chroma .err { color: #a61717; background-color: #e3d2d2 }
/* CodeLine */ .chroma .cl { }
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; }
/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #363636 }
/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 }
/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 }
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; }
/* LineHighlight */ .chroma .hl { background-color: #ffffcc }
/* LineNumbersTable */ .chroma .lnt { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 }
/* LineNumbers */ .chroma .ln { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 }
/* Line */ .chroma .line { display: flex; }
/* Keyword */ .chroma .k { color: #6ab825; font-weight: bold }
/* KeywordConstant */ .chroma .kc { color: #6ab825; font-weight: bold }
/* KeywordDeclaration */ .chroma .kd { color: #6ab825; font-weight: bold }

View File

@ -28,9 +28,9 @@
</div>
{{ end }}
<div class="post-content">
<article class="post-content">
{{ .Content }}
</div>
</article>
{{ partial "series-box.html" . }}

View File

@ -1,23 +1,21 @@
<div class="post">
<h2 class="post-title">
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
</h2>
<h2 class="post-title">
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
</h2>
{{ partial "post-metadata/short.html" . }}
{{ partial "post-metadata/short.html" . }}
{{ with .Resources.GetMatch "feature" }}
<div class="post-media">
{{ partial "figure.html" (dict "src" .) }}
</div>
{{ end }}
<div class="post-description">
{{ partial "description-or-summary.html" . }}
{{ with .Resources.GetMatch "feature" }}
<div class="post-media">
{{ partial "figure.html" (dict "src" .) }}
</div>
{{ end }}
<div class="readmore">
<a href="{{ .Permalink }}">{{ i18n "read_more" }} &rarr;</a>
</div>
<div class="post-description">
{{ partial "description-or-summary.html" . }}
</div>
<div class="readmore">
<a href="{{ .Permalink }}">{{ i18n "read_more" }} &rarr;</a>
</div>

View File

@ -1,26 +1,24 @@
<div class="post">
<h2 class="post-title">
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
</h2>
<h2 class="post-title">
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
</h2>
{{ partial "post-metadata/series.html" . }}
{{ partial "post-metadata/series.html" . }}
<div class="post-description">
{{ partial "description-or-summary.html" . }}
</div>
<div class="series-pages">
<ul>
{{ $i := 0 }}
{{ $total := len .Data.Pages }}
{{ range .Data.Pages.Reverse }}
{{ $i = add 1 $i }}
{{ .Scratch.Set "series_position" $i }}
{{ .Scratch.Set "series_total" $total }}
<li>{{ .Render "summary/series_post" }}</li>
{{ end }}
</ul>
</div>
<div class="post-description">
{{ partial "description-or-summary.html" . }}
</div>
<div class="series-page-list">
{{ $i := 0 }}
{{ $total := len .Data.Pages }}
{{ range .Data.Pages.Reverse }}
{{ $i = add 1 $i }}
{{ .Scratch.Set "series_position" $i }}
{{ .Scratch.Set "series_total" $total }}
<article class="post">
{{ .Render "summary/series_post" }}
</article>
{{ end }}
</div>

View File

@ -1,29 +1,27 @@
<div class="post">
<div class="post-series-position">
{{ if .Scratch.Get "series_position" }}
({{ .Scratch.Get "series_position" }}/{{ .Scratch.Get "series_total" }})
{{ end }}
</div>
<h2 class="post-title">
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
</h2>
{{ partial "post-metadata/short.html" . }}
{{ with .Resources.GetMatch "feature" }}
<div class="post-media">
{{ partial "figure.html" (dict "src" .) }}
</div>
<div class="post-series-position">
{{ if .Scratch.Get "series_position" }}
({{ .Scratch.Get "series_position" }}/{{ .Scratch.Get "series_total" }})
{{ end }}
<div class="post-description">
{{ partial "description-or-summary.html" . }}
</div>
<div class="readmore">
<a href="{{ .Permalink }}">{{ i18n "read_more" }} &rarr;</a>
</div>
</div>
<h2 class="post-title">
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
</h2>
{{ partial "post-metadata/short.html" . }}
{{ with .Resources.GetMatch "feature" }}
<div class="post-media">
{{ partial "figure.html" (dict "src" .) }}
</div>
{{ end }}
<div class="post-description">
{{ partial "description-or-summary.html" . }}
</div>
<div class="readmore">
<a href="{{ .Permalink }}">{{ i18n "read_more" }} &rarr;</a>
</div>

View File

@ -6,11 +6,11 @@
<div class="page-list">
{{ with .Paginator.Pages }}
<ul>
{{ range . }}
<li>{{ .Render "summary/author" }}</li>
{{ end }}
</ul>
{{ range . }}
<article class="post">
{{ .Render "summary/author" }}
</article>
{{ end }}
{{ else }}
<div>
{{ i18n "no_posts" }}

View File

@ -1,9 +1,11 @@
{{ define "main" }}
<h1>
{{ partial "icon.html" "user-circle" }}
{{ .Title | markdownify }}
{{ partial "rss-link.html" . }}
</h1>
<div class="author-name">
<h1>
{{ partial "icon.html" "user-circle" }}
{{ .Title | markdownify }}
{{ partial "rss-link.html" . }}
</h1>
</div>
{{ partial "post-metadata/author.html" . }}

View File

@ -1,8 +1,8 @@
{{ define "main" }}
{{ with .Content }}
<div class="homepage-content">
<article class="homepage-content">
{{ . }}
</div>
</article>
<hr>
{{ end }}

View File

@ -40,7 +40,7 @@
{{ partial "seo-tags/author.html" . }}
<meta name="language" content="{{ .Language.Lang }}">
<meta name="description" content="{{ (partial "seo-tags/description.html" .) | plainify }}">
<meta name="description" content="{{ (partial "seo-description.html" .) | plainify }}">
{{ partial "additional-head.html" . }}
</head>

View File

@ -1,10 +1,10 @@
<div class="page-list">
{{ with . }}
<ul>
{{ range . }}
<li>{{ .Render "summary/post" }}</li>
{{ end }}
</ul>
{{ range . }}
<article class="post">
{{ .Render "summary/post" }}
</article>
{{ end }}
{{ else }}
<div>
{{ i18n "no_posts" }}

View File

@ -1,5 +1,5 @@
{{ if gt .Paginator.TotalPages 1 }}
<div class="pagination">
<nav class="pagination">
{{ template "_internal/pagination.html" . }}
</div>
</nav>
{{ end }}

View File

@ -1,5 +1,5 @@
<meta property="og:title" content="{{ .Title | plainify }}">
<meta property="og:description" content="{{ (partial "seo-tags/description.html" .) | plainify }}">
<meta property="og:description" content="{{ (partial "seo-description.html" .) | plainify }}">
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}">
<meta property="og:url" content="{{ .Permalink }}">

View File

@ -1,5 +1,5 @@
<meta itemprop="name" content="{{ .Title | plainify }}">
<meta itemprop="description" content="{{ (partial "seo-tags/description.html" .) | plainify }}">
<meta itemprop="description" content="{{ (partial "seo-description.html" .) | plainify }}">
{{ $format := "2006-01-02T15:04:05-07:00" }}
{{ with .Date }}
@ -21,6 +21,10 @@
<meta itemprop="image" content="{{ $featured.Permalink }}">
{{ end }}
{{ with .Params.tags }}
<meta itemprop="keywords" content="{{ delimit . ", " }}">
{{ with (.GetTerms "tags") }}
{{ $tags := slice }}
{{ range . }}
{{ $tags = $tags | append .LinkTitle }}
{{ end }}
<meta itemprop="keywords" content="{{ delimit $tags ", " }}">
{{ end }}

View File

@ -22,7 +22,7 @@
{{ end }}
<meta name="twitter:title" content="{{ .Title | plainify }}">
<meta name="twitter:description" content="{{ (partial "seo-tags/description.html" .) | plainify }}">
<meta name="twitter:description" content="{{ (partial "seo-description.html" .) | plainify }}">
{{ with .Site.Social.twitter }}
<meta name="twitter:site" content="@{{ . }}">

View File

@ -1,6 +1,10 @@
<h1 class="header">
<a href="{{ .Site.Home.Permalink | absLangURL }}">{{ .Site.Title | markdownify }}</a>
</h1>
<header class="header">
<h1>
<a href="{{ .Site.Home.Permalink | absLangURL }}">
{{ .Site.Title | markdownify }}
</a>
</h1>
</header>
<div class="topbar">
<nav class="navbar" aria-label="{{ i18n "aria_navbar" }}">

View File

@ -4,13 +4,13 @@
{{ .Title | markdownify }}
</h1>
<div class="series-taxonomy">
<div class="series-taxonomy-list">
{{ with .Pages }}
<ul>
{{ range . }}
<li>{{ .Render "summary/series" }}</li>
{{ end }}
</ul>
{{ range . }}
<article class="series-taxonomy">
{{ .Render "summary/series" }}
</article>
{{ end }}
{{ else }}
<div>
{{ i18n "no_posts" }}

View File

@ -0,0 +1 @@
<hr class="full-width-hr">

View File

@ -13,21 +13,19 @@
<div class="taxonomy-list">
{{ with .Data.Terms.Alphabetical }}
<ul>
{{ range . }}
{{ with .Page }}
<li>
<div class="taxonomy-list-left">
<a href="{{ .Permalink }}">
<p>{{ .Title | markdownify }}</p>
</a>
{{ partial "post-metadata/taxonomy.html" . }}
</div>
{{ partial "description-or-summary.html" . }}
</li>
{{ end }}
{{ range . }}
{{ with .Page }}
<article class="taxonomy-term">
<div class="taxonomy-list-left">
<a href="{{ .Permalink }}">
<p>{{ .Title | markdownify }}</p>
</a>
{{ partial "post-metadata/taxonomy.html" . }}
</div>
{{ partial "description-or-summary.html" . }}
</article>
{{ end }}
</ul>
{{ end }}
{{ else }}
<div>
{{ i18n "no_posts" }}

View File

@ -1,16 +1,18 @@
{{ define "main" }}
<h1>
{{ if eq .Data.Singular "tag" }}
{{ partial "icon.html" "tag" }}
{{ else if eq .Data.Singular "category" }}
{{ partial "icon.html" "folder" }}
{{ else }}
{{ partial "icon.html" "filter" }}
{{ end }}
<div class="post-title">
<h1>
{{ if eq .Data.Singular "tag" }}
{{ partial "icon.html" "tag" }}
{{ else if eq .Data.Singular "category" }}
{{ partial "icon.html" "folder" }}
{{ else }}
{{ partial "icon.html" "filter" }}
{{ end }}
{{ .Title | markdownify }}
{{ partial "rss-link.html" . }}
</h1>
{{ .Title | markdownify }}
{{ partial "rss-link.html" . }}
</h1>
</div>
{{ partial "post-metadata/taxonomy.html" . }}