2 Commits

7 changed files with 130 additions and 110 deletions

View File

@@ -293,17 +293,35 @@ body {
color: var(--text-0); color: var(--text-0);
overflow-wrap: break-word; overflow-wrap: break-word;
margin: 0; margin: 0;
display: flex;
flex-direction: column;
align-items: center;
gap: var(--page-margin);
} }
.main-container { .body-module {
margin: var(--page-margin) auto; width: 100%; /* without, it collapses inside flexbox for some reason TODO: figure out why */
/* 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--marginless {
margin: 0;
}
.body-module--full-width {
margin: 0 var(--page-margin);
/*
margin-left: var(--page-margin);
margin-right: var(--page-margin);
*/
}
.body-module--wide {
margin-left: var(--page-margin);
margin-right: var(--page-margin);
max-width: 720px;
} }
footer { footer {
margin: var(--page-margin) 0; margin-bottom: var(--page-margin);
text-align: center; text-align: center;
font-size: smaller; font-size: smaller;
} }
@@ -376,10 +394,6 @@ footer p {
/* Breadcrumb navigation {{{ */ /* Breadcrumb navigation {{{ */
.breadcrumb {
margin: var(--page-margin) 0;
}
.breadcrumb ul { .breadcrumb ul {
margin: 0; margin: 0;
padding: 0; padding: 0;

View File

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

View File

@@ -1,4 +1,4 @@
<header class="top"> <header class="body-module body-module--marginless top">
<div class="brand"> <div class="brand">
<a href="{{ .Site.Home.Permalink | absLangURL }}"> <a href="{{ .Site.Home.Permalink | absLangURL }}">
{{ .Site.Title | markdownify }} {{ .Site.Title | markdownify }}

View File

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

View File

@@ -1,13 +1,13 @@
{{ define "main" }} {{ define "main" }}
{{ with .Content }} {{ with .Content }}
<article class="homepage-content"> <article class="body-module body-module--wide">
{{ . }} {{ . }}
</article> </article>
<hr> <hr class="body-module body-module--wide">
{{ end }} {{ end }}
{{ if .Site.Params.homepageLatestPosts }} {{ if .Site.Params.homepageLatestPosts }}
<div class="homepage-latest-posts"> <div class="body-module body-module--wide">
<h1> <h1>
{{ i18n "latest_posts" }} {{ i18n "latest_posts" }}
{{ partial "rss-link.html" . }} {{ partial "rss-link.html" . }}

View File

@@ -1,84 +1,86 @@
{{ define "main" }} {{ define "main" }}
<div class="page-title"> <article class="body-module body-module--wide">
<h1> <div class="page-title">
{{ .Title | markdownify }} <h1>
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }} {{ .Title | markdownify }}
</h1> {{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
</div> </h1>
</div>
{{ partial "page-metadata/post-full.html" . }} {{ partial "page-metadata/post-full.html" . }}
{{ partial "series-box.html" . }} {{ partial "series-box.html" . }}
{{ if .Params.Toc }} {{ if .Params.Toc }}
<div class="table-of-contents" aria-label="{{ i18n "aria_table_of_contents" }}"> <div class="table-of-contents" aria-label="{{ i18n "aria_table_of_contents" }}">
<details> <details>
<summary>{{ i18n "table_of_contents" }}</summary> <summary>{{ i18n "table_of_contents" }}</summary>
{{ .TableOfContents }}
</details>
</div>
<div class="table-of-contents print">
{{ i18n "table_of_contents" }}
{{ .TableOfContents }} {{ .TableOfContents }}
</details> </div>
</div> {{ end }}
<div class="table-of-contents print">
{{ i18n "table_of_contents" }} {{ partial "feature-figure.html" . }}
{{ .TableOfContents }}
</div> <article class="post-content" data-pagefind-body>
{{ .Content }}
</article>
{{ partial "series-box.html" . }}
{{ if or .NextInSection .PrevInSection }}
<div class="prevnext">
{{ with .NextInSection }}
<a class="prev" href="{{ .Permalink }}">
<div class="prev-caption">
&larr; {{ i18n "newer_post" }}
</div>
<div class="prev-post">
{{ .Title | markdownify }}
</div>
</a>
{{ else }}
<div class="prev"></div>
{{ end }}
{{ with .PrevInSection }}
<a class="next" href="{{ .Permalink }}">
<div class="next-caption">
{{ i18n "older_post" }} &rarr;
</div>
<div class="next-post">
{{ .Title | markdownify }}
</div>
</a>
{{ else }}
<div class="next"></div>
{{ end }}
</div>
{{ end }}
{{ if .Site.Params.shareButtons }}
{{ partial "share.html" . }}
{{ end }}
{{ if .Params.comments }}
<div class="comments">
{{ partial "comments.html" . }}
</div>
{{ end }}
{{ end }} {{ end }}
{{ partial "feature-figure.html" . }}
<article class="post-content" data-pagefind-body> {{ define "post-body" }}
{{ .Content }} {{ $related := .Site.RegularPages.Related . | first 10 }}
{{ with $related }}
<div class="related-posts">
<hr>
<h1>{{ i18n "related_posts" }}</h1>
{{ partial "page-list.html" . }}
</div>
{{ end }}
</article> </article>
{{ partial "series-box.html" . }}
{{ if or .NextInSection .PrevInSection }}
<div class="prevnext">
{{ with .NextInSection }}
<a class="prev" href="{{ .Permalink }}">
<div class="prev-caption">
&larr; {{ i18n "newer_post" }}
</div>
<div class="prev-post">
{{ .Title | markdownify }}
</div>
</a>
{{ else }}
<div class="prev"></div>
{{ end }}
{{ with .PrevInSection }}
<a class="next" href="{{ .Permalink }}">
<div class="next-caption">
{{ i18n "older_post" }} &rarr;
</div>
<div class="next-post">
{{ .Title | markdownify }}
</div>
</a>
{{ else }}
<div class="next"></div>
{{ end }}
</div>
{{ end }}
{{ if .Site.Params.shareButtons }}
{{ partial "share.html" . }}
{{ end }}
{{ if .Params.comments }}
<div class="comments">
{{ partial "comments.html" . }}
</div>
{{ end }}
{{ end }}
{{ define "post-body" }}
{{ $related := .Site.RegularPages.Related . | first 10 }}
{{ with $related }}
<div class="related-posts">
<hr>
<h1>{{ i18n "related_posts" }}</h1>
{{ partial "page-list.html" . }}
</div>
{{ end }}
{{ end }} {{ end }}

View File

@@ -1,2 +1,6 @@
User-Agent: * User-Agent: *
Sitemap: {{ "sitemap.xml" | absLangURL }} Sitemap: {{ "sitemap.xml" | absLangURL }}
{{/* It complains about the raw markdown output having no title tag */ -}}
User-Agent: Bingbot
Disallow: /blog/*.md$