about summary refs log tree commit diff
path: root/layouts
diff options
context:
space:
mode:
authorNgô Ngọc Đức Huy <huyngo@disroot.org>2024-04-23 01:19:27 +0700
committerNgô Ngọc Đức Huy <huyngo@disroot.org>2024-04-23 01:19:27 +0700
commit40f57ed72a601d8489a180f3bd9acd5e6c20d323 (patch)
tree6dd84fffd42e809f5123333deb8bb1a366a97cfc /layouts
parent2cff39c15ffb512f87ed5f8a2f71603e9ff2d4c7 (diff)
downloadblog-40f57ed72a601d8489a180f3bd9acd5e6c20d323.tar.gz
Update theme
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/_markup/render-heading.html7
-rw-r--r--layouts/_default/baseof.html24
-rw-r--r--layouts/_default/books.html7
-rw-r--r--layouts/_default/comic.html45
-rw-r--r--layouts/_default/list.html22
-rw-r--r--layouts/_default/list.old.html20
-rw-r--r--layouts/_default/project.html68
-rw-r--r--layouts/_default/rss.xml34
-rw-r--r--layouts/_default/single.html22
-rw-r--r--layouts/_default/taxonomy.html12
-rw-r--r--layouts/_default/terms.html19
-rw-r--r--layouts/_default/wiki.html32
-rw-r--r--layouts/index.html14
-rw-r--r--layouts/index.old.html19
-rw-r--r--layouts/partials/custom-webring.html21
-rw-r--r--layouts/partials/fa-icons/email.svg1
-rw-r--r--layouts/partials/fa-icons/github.svg1
-rw-r--r--layouts/partials/fa-icons/liberapay.svg3
-rw-r--r--layouts/partials/fa-icons/mastodon.svg1
-rw-r--r--layouts/partials/fa-icons/matrix.svg12
-rw-r--r--layouts/partials/fa-icons/patreon.svg1
-rw-r--r--layouts/partials/fa-icons/pleroma.svg3
-rw-r--r--layouts/partials/fa-icons/sourcehut.svg1
-rw-r--r--layouts/partials/font-awesome.html9
-rw-r--r--layouts/partials/footer.html17
-rw-r--r--layouts/partials/head-extra.html8
-rw-r--r--layouts/partials/head.html31
-rw-r--r--layouts/partials/header.html13
-rw-r--r--layouts/partials/language-switcher.html5
-rw-r--r--layouts/partials/left-sidebar.html14
-rw-r--r--layouts/partials/pagination.html16
-rw-r--r--layouts/partials/post-info.html28
-rw-r--r--layouts/partials/post-language-switcher.html16
-rw-r--r--layouts/partials/post-pagination.html16
-rw-r--r--layouts/partials/post-summary.html6
-rw-r--r--layouts/partials/right-sidebar.html (renamed from layouts/partials/single-extra.html)0
-rw-r--r--layouts/partials/social.html17
37 files changed, 375 insertions, 210 deletions
diff --git a/layouts/_default/_markup/render-heading.html b/layouts/_default/_markup/render-heading.html
new file mode 100644
index 0000000..73f5c26
--- /dev/null
+++ b/layouts/_default/_markup/render-heading.html
@@ -0,0 +1,7 @@
+{{ $id := .Anchor | safeURL }}
+<h{{ .Level }} id="{{ $id }}">
+  <span class="decorative" aria-hidden="true"></span>
+  <a class="heading-anchor" href="#{{ $id }}">
+    {{ .Text | safeHTML }}
+  </a>
+</h{{ .Level }}>
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
new file mode 100644
index 0000000..f13b730
--- /dev/null
+++ b/layouts/_default/baseof.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html lang="{{ .Page.Language.Lang }}">
+<head>
+    {{ partial "head.html" . }}
+</head>
+<body>
+    <a class="skip-main" href="#main">{{ i18n "skipToContent" | humanize }}</a>
+    <header class="common-header"> 
+        {{ partial "header.html" . }}
+    </header>
+    <div class="container">
+        <aside id="left">
+            {{ partial "left-sidebar.html" . }}
+        </aside>
+        <main id="main" tabindex="-1"> 
+            {{ block "main" . }}{{ end }}
+        </main>
+        <aside id="right">
+            {{ partial "right-sidebar.html" . }}
+        </aside>
+    </div>
+    {{ partial "footer.html" . }}
+</body>
+</html>
diff --git a/layouts/_default/books.html b/layouts/_default/books.html
index c0a74d0..449b5e0 100644
--- a/layouts/_default/books.html
+++ b/layouts/_default/books.html
@@ -1,11 +1,4 @@
 {{ define "main" }}
-{{ if .Menus }}
-<nav class="post-navigation">
-  {{ range .Menus }}
-  <a href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name }}</a>
-  {{ end }}
-</nav>
-{{ end }}
 
 <article class="post h-entry">
   <header class="post-header">
diff --git a/layouts/_default/comic.html b/layouts/_default/comic.html
deleted file mode 100644
index 508df3c..0000000
--- a/layouts/_default/comic.html
+++ /dev/null
@@ -1,45 +0,0 @@
-{{ define "main" }}
-{{ if .Menus }}
-<nav class="post-navigation">
-  {{ range .Menus }}
-  <a href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name }}</a>
-  {{ end }}
-</nav>
-{{ end }}
-
-<article class="post h-entry">
-  <header class="post-header">
-    <center>
-      <h1 class="p-name post-title{{ if .Params.draft }} draft{{end}}">{{ trim .Title  " " }}</h1>
-    {{ if in .Params.categories "comics" }}
-    </center>
-    {{ end}}
-  </header>
-  <section class="content e-content">
-    <center>
-    {{ partial "comicNav.html" . }}
-    <img title="{{ .Params.TitleText }}"
-         alt="Comic panels. See transcription below."
-         src="/comics/{{ .Params.ComicId }}/{{ .Params.ComicTitle }}.png"
-         srcset="/comics/{{ .Params.ComicId }}/{{ .Params.ComicTitle }}_full.png 2x"
-         >
-    {{ partial "comicNav.html" . }}
-    </center>
-    <details>
-      <summary>
-        Transcription and extras
-      </summary>
-      {{ .Content }}
-    </details>
-  </section>
-  {{ partial "post-info.html" . }}
-</article>
-
-{{ if and (.Site.Params.paginationSinglePost) (ne .Type "page") }}
-  {{ partial "paginationPost.html" . }}
-{{ end }}
-
-
-{{ partial "custom-webring.html" }}
-
-{{ end }}
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
new file mode 100644
index 0000000..3079687
--- /dev/null
+++ b/layouts/_default/list.html
@@ -0,0 +1,22 @@
+{{ define "main" }}
+    <div class="index-content">
+        {{ .Content }}
+    </div>
+
+    {{ if .Params.reversed }}
+    <ol class="articles h-feed" reversed>
+    {{ else }}
+    <ul>
+    {{ end }}
+        {{ range .Pages }}
+        <li>
+            {{ partial "post-summary.html" . }}
+        </li>
+        {{ end }}
+    {{ if .Params.reversed }}
+    </ol>
+    {{ else }}
+    </ul>
+    {{ end }}
+
+{{ end }}
diff --git a/layouts/_default/list.old.html b/layouts/_default/list.old.html
deleted file mode 100644
index 33bd8b5..0000000
--- a/layouts/_default/list.old.html
+++ /dev/null
@@ -1,20 +0,0 @@
-{{ define "main" }}
-    <div class="index-content">
-        {{ .Content }}
-    </div>
-
-    <div class="articles h-feed">
-        <h1 class="post-title">{{ i18n .Title }}</h1>
-        {{ if not .Params.no_feed }}
-        {{ range .Page.CurrentSection.Pages }}
-            <div class="post-short-list h-entry">
-                <header class="post-header"> 
-                    <h2 class="p-name post-title{{ if .Params.favorite }} favorite{{end}}{{ if .Params.draft }} draft{{end}}"><a class="u-url" href="{{ .RelPermalink }}">{{ trim .Title " " }}</a></h2>
-                </header>
-                {{ partial "post-info.html" . }}
-            </div>
-        {{ end }}
-        {{ end}}
-    </div>
-
-{{ end }}
diff --git a/layouts/_default/project.html b/layouts/_default/project.html
deleted file mode 100644
index 5bd36e0..0000000
--- a/layouts/_default/project.html
+++ /dev/null
@@ -1,68 +0,0 @@
-{{ define "main" }}
-{{ if .Menus }}
-<nav class="post-navigation">
-  {{ range .Menus }}
-  <a href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name }}</a>
-  {{ end }}
-</nav>
-{{ end }}
-
-<article class="post h-entry">
-  <header class="post-header">
-    <h1 class="p-name post-title{{ if .Params.favorite }} favorite{{end}}{{ if .Params.draft }} draft{{end}}">{{ trim .Title  " " }}</h1>
-  </header>
-  <div class="content e-content">
-    <h2>Project info</h2>
-    <dl class="data">
-      <dt>Project site</dt>
-      <dd>
-      <a href="{{ .Params.projectUrl }}">
-        {{ .Params.name }}
-      </a>
-      </dd>
-      {{ if isSet .Params "author" }}
-        <dt>Creator</dt>
-        {{ if isSet .Params "authorurl" }}
-          <dd><a href={{.Params.authorURL}}>{{ .Params.author }}</a></dd>
-        {{ else }}
-          <dd>{{ .Params.author }}</dd>
-        {{ end }}
-      {{ end }}
-      {{ if isSet .Params "maintainers" }}
-        <dt>Maintainers</dt>
-        {{ range $maintainer := .Params.maintainers }}
-          {{ if isSet $maintainer "URL" }}
-          <dd><a href={{$maintainer.URL}}>{{ $maintainer.name }}</a></dd>
-          {{ else }}
-          <dd>{{ $maintainer.name }}</dd>
-          {{ end }}
-        {{ end }}
-      {{ end }}
-      <dt>Status</dt>
-      <dd>{{ .Params.projectStatus }}</dd>
-    </dl>
-    {{ .Content }}
-    <hr>
-    {{ if eq .Params.projectStatus "dead" }}
-    <p>
-      The project is currently dead. You can fork it if you find it helpful.
-    </p>
-    {{ else }}
-    <p>
-      The development of project is {{.Params.projectStatus}}.
-      You can help this project by contributing code, finding new issues,
-      suggesting new features, or donation.
-    </p>
-    {{ end }}
-  </div>
-  {{ partial "post-info.html" . }}
-</article>
-
-{{ if and (.Site.Params.paginationSinglePost) (ne .Type "page") }}
-  {{ partial "paginationPost.html" . }}
-{{ end }}
-
-
-{{ partial "custom-webring.html" }}
-
-{{ end }}
diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml
new file mode 100644
index 0000000..cb728d9
--- /dev/null
+++ b/layouts/_default/rss.xml
@@ -0,0 +1,34 @@
+{{- $pctx := . -}}
+{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
+{{- $pages := where $pctx.RegularPages ".Params.disable_feed" "!=" true -}}
+{{- $limit := .Site.Config.Services.RSS.Limit -}}
+{{- if ge $limit 1 -}}
+{{- $pages = $pages | first $limit -}}
+{{- end -}}
+{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
+<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
+  <channel>
+    <title>{{ if eq  .Title  .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
+    <link>{{ .Permalink }}</link>
+    <description>{{ .Site.Title }}{{ if ne  .Title  .Site.Title }}{{ with .Title }} ({{.}}){{ end }}{{ end }}</description>
+    <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
+    <language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
+    <managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
+    <webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
+    <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
+    <lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
+    {{ with .OutputFormats.Get "RSS" }}
+    {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
+    {{ end }}
+    {{ range $pages }}
+    <item>
+      <title>{{ .Title }}</title>
+      <link>{{ .Permalink }}</link>
+      <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
+      {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
+      <guid>{{ .Permalink }}</guid>
+      <description>{{ .Content | html }}</description>
+    </item>
+    {{ end }}
+  </channel>
+</rss>
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
new file mode 100644
index 0000000..c94d359
--- /dev/null
+++ b/layouts/_default/single.html
@@ -0,0 +1,22 @@
+{{ define "main" }}
+    <article class="post h-entry">
+        {{ .Content }}
+        {{ partial "post-info.html" . }}
+    </article>
+    <hr>
+    <nav>
+        {{with .Prev}}
+        <a class="prev-link" href="{{.Permalink}}" title="{{ .Title }}">
+            Previous post
+        </a>
+        {{end}}
+        {{with .Next}}
+        <a class="next-link float" href="{{.Permalink}}" title="{{ .Title }}">
+            Next post
+        </a>
+        {{end}}
+    </nav>
+    <hr>
+    Would you like to discuss this post?
+    <a href="mailto:huyngo@disroot.org?subject=Re: {{ trim .Title " "}}">Email me!</a>
+{{ end }}
diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html
new file mode 100644
index 0000000..7b3adb9
--- /dev/null
+++ b/layouts/_default/taxonomy.html
@@ -0,0 +1,12 @@
+{{ define "main" }}
+    <h1>{{ i18n .Data.Singular | humanize }}: {{ .Title }}</h1>
+    <div class="post-info">
+        <a href="{{ (printf "%s/%s" .Site.LanguagePrefix .Data.Plural) | absLangURL }}">{{ i18n (printf "toAll%s" (.Data.Plural | humanize )) | humanize }}</a>
+    </div>
+    <ol reversed>
+        {{ range .Paginator.Pages }}
+        <li>{{ partial "post-summary.html" . }}</li>
+        {{ end }}
+    </ol>
+
+{{ end }}
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
new file mode 100644
index 0000000..d4e745e
--- /dev/null
+++ b/layouts/_default/terms.html
@@ -0,0 +1,19 @@
+{{ define "main" }}
+    <div class="index-content">
+        {{ .Content }}
+    </div>
+
+    <h1>{{ i18n .Title }}</h1>
+
+    <ul class="terms">
+        {{ range $key, $value := .Data.Terms }}
+        <li>
+            <a href="{{ (print $.Data.Plural "/" (lower $key)) | absLangURL }}">
+            {{ $key }}
+            </a>
+            ({{ len $value }})
+        </li>
+        {{ end }}
+    </ul>
+
+{{ end }}
\ No newline at end of file
diff --git a/layouts/_default/wiki.html b/layouts/_default/wiki.html
deleted file mode 100644
index 0e933b5..0000000
--- a/layouts/_default/wiki.html
+++ /dev/null
@@ -1,32 +0,0 @@
-{{ define "main" }}
-{{ if .Menus }}
-<nav class="post-navigation">
-	{{ range .Menus }}
-	<a href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name }}</a>
-	{{ end }}
-</nav>
-{{ end }}
-
-<article class="post h-entry">
-	<header class="post-header">
-		<h1 class="p-name post-title{{ if .Params.favorite }} favorite{{end}}{{ if .Params.draft }} draft{{end}}">{{ trim .Title  " " }}</h1>
-	</header>
-	<div class="content e-content">
-		{{ .Content }}
-		<hr>
-		{{ i18n "WikiContribute" }}
-		<a href="mailto:huyngo+{{ .Params.wiki }}@disroot.org">
-			huyngo+{{ .Params.wiki }}@disroot.org
-		</a>
-	</div>
-	{{ partial "post-info.html" . }}
-</article>
-
-{{ if and (.Site.Params.paginationSinglePost) (ne .Type "page") }}
-	{{ partial "paginationPost.html" . }}
-{{ end }}
-
-
-{{ partial "custom-webring.html" }}
-
-{{ end }}
diff --git a/layouts/index.html b/layouts/index.html
new file mode 100644
index 0000000..c1da783
--- /dev/null
+++ b/layouts/index.html
@@ -0,0 +1,14 @@
+{{ define "main" }}
+    <div class="homepage-content">
+        {{ .Content }}
+    </div>
+    {{ with .Site.GetPage "section" "posts" }}
+    {{ range first 1 .Pages }}
+    <article class="embedded">
+        <h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
+        {{ .Content | truncate 1000 }}
+    </article>
+    {{ end }}
+    {{ end }}
+
+{{ end }}
diff --git a/layouts/index.old.html b/layouts/index.old.html
deleted file mode 100644
index 8367de4..0000000
--- a/layouts/index.old.html
+++ /dev/null
@@ -1,19 +0,0 @@
-{{ define "main" }}
-    <div class="homepage-content">
-        {{ .Content }}
-        <ul>
-            {{ range .Site.Sections }}
-            <li> <a href="{{ .Permalink }}">{{ i18n .Title }}</a> </li>
-            {{ end }}
-        </ul>
-    </div>
-
-    <div class="articles h-feed">
-        {{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
-        {{ range (.Paginate $pages).Pages }}
-            {{ partial "post-summary.html" . }}
-        {{ end }}
-        {{ partial "pagination.html" . }}
-    </div>
-
-{{ end }}
diff --git a/layouts/partials/custom-webring.html b/layouts/partials/custom-webring.html
index 604afc4..3dd9977 100644
--- a/layouts/partials/custom-webring.html
+++ b/layouts/partials/custom-webring.html
@@ -1,17 +1,16 @@
 <section class="webring">
   <h2 class="no-prefix">Fediring</h2>
-  Look at my fedi fellows' sites:
-  <ol>
-    <li style="list-style-type: '← ';"><a href="https://fediring.net/previous?host=xrvs.net">Previous site</a></li>
-    <li style="list-style-type: '? ';"><a href="https://fediring.net/">What is Fediring?</a></li>
-    <li style="list-style-type: '→ ';"><a href="https://fediring.net/next?host=xrvs.net">Next site</a></li>
-  </ol>
-  <h2 class="no-prefix">Articles from blogs I read</h2>
-  <section class="articles">
+  <ul>
+    <li><a href="https://fediring.net/" hreflang="en">{{ i18n "aboutFediring" }}</a></li>
+    <li><a class="prev-link" href="https://fediring.net/previous?host=example.com">{{ i18n "prev" }}</a></li>
+    <li><a class="random-link" href="https://fediring.net/random">{{ i18n "random" }}</a></li>
+    <li><a class="next-link" href="https://fediring.net/next?host=example.com">{{ i18n "next" }}</a></li>
+  </ul>
+  <h2 class="no-prefix">{{ i18n "otherSites" }}</h2>
+  <div class="articles">
     {{ partial "webring-articles.html" }}
-  </section>
+  </div>
   <small class="attribution">
-    Generated by
-    <a href="https://git.sr.ht/~cnx/fead">fead</a>
+    {{ i18n "feadAttribution" | safeHTML }}
   </small>
 </section>
diff --git a/layouts/partials/fa-icons/email.svg b/layouts/partials/fa-icons/email.svg
new file mode 100644
index 0000000..e3d84fe
--- /dev/null
+++ b/layouts/partials/fa-icons/email.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path fill="currentColor" d="M464 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm0 48v40.805c-22.422 18.259-58.168 46.651-134.587 106.49-16.841 13.247-50.201 45.072-73.413 44.701-23.208.375-56.579-31.459-73.413-44.701C106.18 199.465 70.425 171.067 48 152.805V112h416zM48 400V214.398c22.914 18.251 55.409 43.862 104.938 82.646 21.857 17.205 60.134 55.186 103.062 54.955 42.717.231 80.509-37.199 103.053-54.947 49.528-38.783 82.032-64.401 104.947-82.653V400H48z"/></svg>
diff --git a/layouts/partials/fa-icons/github.svg b/layouts/partials/fa-icons/github.svg
new file mode 100644
index 0000000..c80fea7
--- /dev/null
+++ b/layouts/partials/fa-icons/github.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><!-- Font Awesome Free 5.15.3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path fill="currentColor" d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"/></svg>
diff --git a/layouts/partials/fa-icons/liberapay.svg b/layouts/partials/fa-icons/liberapay.svg
new file mode 100644
index 0000000..19d90a4
--- /dev/null
+++ b/layouts/partials/fa-icons/liberapay.svg
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1536 1796">
+    <path fill="currentColor" d="M469.093 132l-247.737 38.364L18.4 1018.984C6.639 1069.078.554 1116.24.024 1160.442c-.551 44.224 8.502 83.402 27.147 117.495 18.649 34.116 49.543 60.997 92.707 80.704 43.163 19.706 102.54 29.551 178.208 29.551l47.966-196.585c-27.715-2.118-49.321-6.922-64.769-14.402-15.447-7.439-26.337-17.28-32.736-29.55-6.4-12.247-9.368-26.36-8.816-42.336.53-15.978 2.921-33.592 7.202-52.77l222.16-920.465zm382.159 380.586c-63.93 0-123.348 5.038-178.209 15.145-54.882 10.15-103.666 21.616-146.257 34.394L261.5 1668h236.522l71.93-289.245c36.212 6.4 72.443 9.601 108.679 9.601 74.566 0 143.572-13.108 206.971-39.192 63.379-26.106 117.675-62.573 162.98-109.466 45.154-46.871 80.62-102.513 106.196-166.994 25.576-64.416 38.365-135.6 38.365-213.386h.165c0-47.952-6.663-92.898-19.948-135.002-13.35-42.082-33.847-78.848-61.541-110.294-27.802-31.424-63.199-56.212-106.364-74.33-43.14-18.095-94.554-27.15-154.205-27.15zm-30.294 199.73c50.071 0 85.235 16.012 105.492 47.966 20.216 31.953 30.337 70.875 30.337 116.665 0 46.893-6.643 89.745-19.948 128.629-13.35 38.925-31.989 72.212-55.954 99.907-23.987 27.716-53.024 49.301-87.118 64.728-34.094 15.468-71.927 23.175-113.48 23.175-26.636 0-48.992-2.099-67.087-6.375l111.866-465.095c29.812-6.4 61.776-9.601 95.892-9.601z" fill="#1a171b"/>
+</svg>
diff --git a/layouts/partials/fa-icons/mastodon.svg b/layouts/partials/fa-icons/mastodon.svg
new file mode 100644
index 0000000..d9baf27
--- /dev/null
+++ b/layouts/partials/fa-icons/mastodon.svg
@@ -0,0 +1 @@
+<svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="mastodon" class="svg-inline--fa fa-mastodon fa-w-14" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="#6364FF" d="M433 179.11c0-97.2-63.71-125.7-63.71-125.7-62.52-28.7-228.56-28.4-290.48 0 0 0-63.72 28.5-63.72 125.7 0 115.7-6.6 259.4 105.63 289.1 40.51 10.7 75.32 13 103.33 11.4 50.81-2.8 79.32-18.1 79.32-18.1l-1.7-36.9s-36.31 11.4-77.12 10.1c-40.41-1.4-83-4.4-89.63-54a102.54 102.54 0 0 1-.9-13.9c85.63 20.9 158.65 9.1 178.75 6.7 56.12-6.7 105-41.3 111.23-72.9 9.8-49.8 9-121.5 9-121.5zm-75.12 125.2h-46.63v-114.2c0-49.7-64-51.6-64 6.9v62.5h-46.33V197c0-58.5-64-56.6-64-6.9v114.2H90.19c0-122.1-5.2-147.9 18.41-175 25.9-28.9 79.82-30.8 103.83 6.1l11.6 19.5 11.6-19.5c24.11-37.1 78.12-34.8 103.83-6.1 23.71 27.3 18.4 53 18.4 175z"></path></svg>
diff --git a/layouts/partials/fa-icons/matrix.svg b/layouts/partials/fa-icons/matrix.svg
new file mode 100644
index 0000000..4aefc50
--- /dev/null
+++ b/layouts/partials/fa-icons/matrix.svg
@@ -0,0 +1,12 @@
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"

+	 viewBox="0 0 620 520" style="enable-background:new 0 0 620 520;" xml:space="preserve">

+<path fill="currentColor" d="M13.7,11.9v496.2h35.7V520H0V0h49.4v11.9H13.7z"/>

+<path fill="currentColor" d="M166.3,169.2v25.1h0.7c6.7-9.6,14.8-17,24.2-22.2c9.4-5.3,20.3-7.9,32.5-7.9c11.7,0,22.4,2.3,32.1,6.8

+	c9.7,4.5,17,12.6,22.1,24c5.5-8.1,13-15.3,22.4-21.5c9.4-6.2,20.6-9.3,33.5-9.3c9.8,0,18.9,1.2,27.3,3.6c8.4,2.4,15.5,6.2,21.5,11.5

+	c6,5.3,10.6,12.1,14,20.6c3.3,8.5,5,18.7,5,30.7v124.1h-50.9V249.6c0-6.2-0.2-12.1-0.7-17.6c-0.5-5.5-1.8-10.3-3.9-14.3

+	c-2.2-4.1-5.3-7.3-9.5-9.7c-4.2-2.4-9.9-3.6-17-3.6c-7.2,0-13,1.4-17.4,4.1c-4.4,2.8-7.9,6.3-10.4,10.8c-2.5,4.4-4.2,9.4-5,15.1

+	c-0.8,5.6-1.3,11.3-1.3,17v103.3h-50.9v-104c0-5.5-0.1-10.9-0.4-16.3c-0.2-5.4-1.3-10.3-3.1-14.9c-1.8-4.5-4.8-8.2-9-10.9

+	c-4.2-2.7-10.3-4.1-18.5-4.1c-2.4,0-5.6,0.5-9.5,1.6c-3.9,1.1-7.8,3.1-11.5,6.1c-3.7,3-6.9,7.3-9.5,12.9c-2.6,5.6-3.9,13-3.9,22.1

+	v107.6h-50.9V169.2H166.3z"/>

+<path fill="currentColor" d="M506.3,508.1V11.9h-35.7V0H520v520h-49.4v-11.9H506.3z"/>

+</svg>

diff --git a/layouts/partials/fa-icons/patreon.svg b/layouts/partials/fa-icons/patreon.svg
new file mode 100644
index 0000000..13df44e
--- /dev/null
+++ b/layouts/partials/fa-icons/patreon.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path fill="currentColor" d="M512 194.8c0 101.3-82.4 183.8-183.8 183.8-101.7 0-184.4-82.4-184.4-183.8 0-101.6 82.7-184.3 184.4-184.3C429.6 10.5 512 93.2 512 194.8zM0 501.5h90v-491H0v491z"/></svg>
diff --git a/layouts/partials/fa-icons/pleroma.svg b/layouts/partials/fa-icons/pleroma.svg
new file mode 100644
index 0000000..ba4bc25
--- /dev/null
+++ b/layouts/partials/fa-icons/pleroma.svg
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1536 1792">
+    <path fill="#ffbe82" d="M119.568 128A119.569 119.569 0 0 0 0 247.568V1664h381.701V128H119.568zm455.282 0v768h266.73a119.569 119.569 0 0 0 119.57-119.568V128h-386.3zm0 1154.299V1664h266.73a119.569 119.569 0 0 0 119.57-119.568v-262.133h-386.3z"/>
+</svg>
diff --git a/layouts/partials/fa-icons/sourcehut.svg b/layouts/partials/fa-icons/sourcehut.svg
new file mode 100644
index 0000000..81621fe
--- /dev/null
+++ b/layouts/partials/fa-icons/sourcehut.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200z"></path></svg>
diff --git a/layouts/partials/font-awesome.html b/layouts/partials/font-awesome.html
new file mode 100644
index 0000000..55bf1b1
--- /dev/null
+++ b/layouts/partials/font-awesome.html
@@ -0,0 +1,9 @@
+<span class="inline-svg" title="{{ .network }}" aria-label="{{ .network }}">
+
+{{ $dict := newScratch }}
+
+{{ $dict.Set "svg" (partial (print "fa-icons/" .iconName ".svg")) }}
+
+{{ $dict.Get "svg" | safeHTML }}
+
+</span>
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
new file mode 100644
index 0000000..a93d3a3
--- /dev/null
+++ b/layouts/partials/footer.html
@@ -0,0 +1,17 @@
+<footer id="footer">
+    {{ $languagesCount := $.Site.Home.AllTranslations }}
+    {{ if gt $languagesCount 1 }}
+        {{ partial "language-switcher.html" . }}
+    {{ end }}
+
+    <div class="common-footer-bottom">
+        <div class="copyright">
+            <p>© 2021-{{ now.Year }} {{ .Site.Params.author }}<br>
+            {{ partial "copyright.html" . }}
+            </p>
+        </div> 
+        <div>
+            {{ partial "social.html" . }}
+        </div>
+    </div>
+</footer>
diff --git a/layouts/partials/head-extra.html b/layouts/partials/head-extra.html
deleted file mode 100644
index e3f256f..0000000
--- a/layouts/partials/head-extra.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<link rel="apple-touch-icon" sizes="180x180" href={{ "/apple-touch-icon.png" }}>
-<link rel="icon" type="image/png" sizes="32x32" href={{ "/favicon-32x32.png" }}>
-<link rel="icon" type="image/png" sizes="16x16" href={{ "/favicon-16x16.png" }}>
-<link rel="manifest" href={{ "/site.webmanifest" }}>
-{{ $light := resources.Get "css/highlight.css" }}
-{{ $dark := resources.Get "css/highdark.css" }}
-{{ $code := slice $light $dark | resources.Concat "css/code.css" | minify | fingerprint }}
-<link rel="stylesheet" type="text/css" href="{{ $code.RelPermalink }}">
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
new file mode 100644
index 0000000..be5ae30
--- /dev/null
+++ b/layouts/partials/head.html
@@ -0,0 +1,31 @@
+<!-- Basic stuff -->
+<meta charset="utf-8">
+<meta name="HandheldFriendly" content="True">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<meta name="referrer" content="no-referrer">
+
+<meta name="color-scheme" content="dark light">
+
+<title>{{ .Title }} - {{ .Site.Title }}</title>
+<meta name="description" content="{{ .Site.Params.Description }}">
+
+{{ with .OutputFormats.Get "rss" -}}
+<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}"
+                       href="{{ .Permalink}}" title="$.Site.Title" />
+{{ end -}}
+
+<link rel="icon" type="image/x-icon" href="/favicon.ico">
+<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
+<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
+<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
+<link rel="manifest" href="/site.webmanifest">
+
+{{ $main := resources.Get "css/main.css"}}
+{{ $dark := resources.Get "css/dark.css" }}
+{{ $light := resources.Get "css/light.css" }}
+{{ $syntax_dark := resources.Get "css/syntax-dark.css" }}
+{{ $syntax_light := resources.Get "css/syntax-light.css" }}
+{{ $style := slice $main $dark $light $syntax_dark $syntax_light | resources.Concat "css/style.css" | minify | fingerprint }}
+<link rel="stylesheet" type="text/css" href="{{ $style.RelPermalink }}">
+
+{{ template "_internal/opengraph.html" . }}
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
new file mode 100644
index 0000000..f9a00a9
--- /dev/null
+++ b/layouts/partials/header.html
@@ -0,0 +1,13 @@
+<nav>
+<a class="site-title" href="{{ .Site.BaseURL | relLangURL }}">
+    {{ .Site.Title }}
+</a>
+{{ if .Site.Menus.main }}
+{{ $currentPage := . }}
+{{ range .Site.Menus.main }}
+<a class="{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} active{{end}}" href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name }}</a>
+{{ end }}
+{{ end }}
+</nav>
+<h1 class="p-name post-title{{ if .Params.draft }} draft{{end}}">{{ trim .Title  " " }}</h1>
+{{ partial "post-language-switcher.html" . }}
diff --git a/layouts/partials/language-switcher.html b/layouts/partials/language-switcher.html
new file mode 100644
index 0000000..7e2e848
--- /dev/null
+++ b/layouts/partials/language-switcher.html
@@ -0,0 +1,5 @@
+<ul class="language-select">
+{{ range $.Site.Home.AllTranslations }}
+<li><a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a></li>
+{{ end }}
+</ul>
\ No newline at end of file
diff --git a/layouts/partials/left-sidebar.html b/layouts/partials/left-sidebar.html
new file mode 100644
index 0000000..403afc7
--- /dev/null
+++ b/layouts/partials/left-sidebar.html
@@ -0,0 +1,14 @@
+<details open>
+  <summary>{{ i18n "sections" }}</summary>
+  <ul>
+    {{ range sort .Site.Sections.ByTitle }}
+    <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
+    {{ end }}
+  </ul>
+</details>
+{{ if gt (len .TableOfContents) 32 }}
+<details open id="toc">
+  <summary>{{ i18n "TOC" }}</summary>
+  {{ .TableOfContents }}
+</details>
+{{ end }}
diff --git a/layouts/partials/pagination.html b/layouts/partials/pagination.html
new file mode 100644
index 0000000..c561c09
--- /dev/null
+++ b/layouts/partials/pagination.html
@@ -0,0 +1,16 @@
+{{ if or ( .Paginator.HasPrev ) ( .Paginator.HasNext ) }}
+    {{ $toNewPostsMessage := i18n "toNewPosts" }}
+    {{ $toOldPostsMessage := i18n "toOldPosts" }}    
+    <div class="pagination">
+        <div class="left pagination-item {{ if not .Paginator.HasPrev }}disabled{{ end }}">
+            {{ if .Paginator.HasPrev }}
+                <a href="{{ .Paginator.Prev.URL | relLangURL }}">{{ $toNewPostsMessage }}</a>
+            {{ end }}
+        </div>
+        <div class="right pagination-item {{ if not .Paginator.HasNext }}disabled{{ end }}">
+            {{ if .Paginator.HasNext }}
+                <a href="{{ .Paginator.Next.URL | relLangURL }}">{{ $toOldPostsMessage }}</a>
+            {{ end }}
+        </div>
+    </div>
+{{ end }}
diff --git a/layouts/partials/post-info.html b/layouts/partials/post-info.html
new file mode 100644
index 0000000..bb6e3c0
--- /dev/null
+++ b/layouts/partials/post-info.html
@@ -0,0 +1,28 @@
+<div class="post-info">
+    {{ with .Params.date }}
+    <div>
+        <time>{{ .Format "2006-01-02" }}</time>
+    </div>
+    {{ end }}
+
+
+    <div class="post-taxonomies">
+        {{ if .Params.categories }}
+        Categories:
+        <ul class="post-categories">
+            {{ range .Params.categories }}
+            <li><a href="{{ "categories/" | urlize | absLangURL }}">{{ . }}</a></li>
+            {{ end }}
+        </ul>
+        {{ end }}
+        <br>
+        {{ if .Params.tags }}
+        Tags:
+        <ul class="post-tags">
+            {{ range .Params.tags }}
+            <li><a href="{{ "tags/" | absLangURL }}{{ . | urlize }}">#{{ . }}</a></li>
+            {{ end }}
+        </ul>
+        {{ end }}
+    </div>
+</div>
diff --git a/layouts/partials/post-language-switcher.html b/layouts/partials/post-language-switcher.html
new file mode 100644
index 0000000..162cdf3
--- /dev/null
+++ b/layouts/partials/post-language-switcher.html
@@ -0,0 +1,16 @@
+{{ if .IsTranslated }}
+    {{ $pageLang := .Page.Lang}}
+    <ul class="post-translations">
+        {{ range .AllTranslations }}
+            {{ if eq .Lang $pageLang }}
+                <li>
+                    {{ upper .Lang }}
+                </li>
+            {{ else }}
+                <li>
+                    <a href="{{ .Permalink }}">{{ upper .Lang }}</a>
+                </li>
+            {{ end }}
+        {{ end }}
+    </ul>
+{{ end }}
\ No newline at end of file
diff --git a/layouts/partials/post-pagination.html b/layouts/partials/post-pagination.html
new file mode 100644
index 0000000..2130181
--- /dev/null
+++ b/layouts/partials/post-pagination.html
@@ -0,0 +1,16 @@
+{{ if or ( .PrevInSection ) ( .NextInSection ) }}
+    <div class="pagination post-pagination">
+        <div class="left pagination-item {{ if not .NextInSection }}disabled{{ end }}">
+            {{ if .NextInSection }}
+                <a href="{{ .NextInSection.RelPermalink }}">{{ .NextInSection.Title }}</a>
+            {{ end }}
+        </div>
+        <div class="right pagination-item {{ if not .PrevInSection }}disabled{{ end }}">
+            {{ if .PrevInSection }}
+                <a href="{{ .PrevInSection.RelPermalink }}">{{ .PrevInSection.Title }}</a>
+            {{ end }}
+        </div>
+    </div>
+{{ end }}
+
+{{ partial "pagination-extra.html" . }}
diff --git a/layouts/partials/post-summary.html b/layouts/partials/post-summary.html
new file mode 100644
index 0000000..1396d64
--- /dev/null
+++ b/layouts/partials/post-summary.html
@@ -0,0 +1,6 @@
+{{ with .Params.date }}
+<time>{{ .Format "2006-01-02" }}</time>:
+{{ end }}
+<a class="u-url" href="{{ .RelPermalink }}">{{ trim .Title " " }}</a>
+{{ if .Params.draft }}(draft){{end}}
+{{ partial "post-language-switcher.html" . }}
diff --git a/layouts/partials/single-extra.html b/layouts/partials/right-sidebar.html
index 0d3b101..0d3b101 100644
--- a/layouts/partials/single-extra.html
+++ b/layouts/partials/right-sidebar.html
diff --git a/layouts/partials/social.html b/layouts/partials/social.html
new file mode 100644
index 0000000..2a10cb5
--- /dev/null
+++ b/layouts/partials/social.html
@@ -0,0 +1,17 @@
+<table class="social-icons">
+
+  {{ range $.Site.Params.Social }}
+  <tr>
+    <th>
+      {{ $network := humanize .id }}
+      {{ $network | title }}
+      {{ partial "font-awesome.html" (dict "iconName" .id "network" $network) }}
+    </th>
+    <td>
+      <a href="{{ .url }}" rel="me">
+        {{ .name }}
+      </a>
+    </td>
+  </tr>
+  {{ end }}
+</table>