From 40f57ed72a601d8489a180f3bd9acd5e6c20d323 Mon Sep 17 00:00:00 2001 From: Ngô Ngọc Đức Huy Date: Tue, 23 Apr 2024 01:19:27 +0700 Subject: Update theme --- layouts/partials/custom-webring.html | 21 +++++++++---------- layouts/partials/fa-icons/email.svg | 1 + layouts/partials/fa-icons/github.svg | 1 + layouts/partials/fa-icons/liberapay.svg | 3 +++ layouts/partials/fa-icons/mastodon.svg | 1 + layouts/partials/fa-icons/matrix.svg | 12 +++++++++++ layouts/partials/fa-icons/patreon.svg | 1 + layouts/partials/fa-icons/pleroma.svg | 3 +++ layouts/partials/fa-icons/sourcehut.svg | 1 + layouts/partials/font-awesome.html | 9 ++++++++ layouts/partials/footer.html | 17 +++++++++++++++ layouts/partials/head-extra.html | 8 ------- layouts/partials/head.html | 31 ++++++++++++++++++++++++++++ layouts/partials/header.html | 13 ++++++++++++ layouts/partials/language-switcher.html | 5 +++++ layouts/partials/left-sidebar.html | 14 +++++++++++++ layouts/partials/pagination.html | 16 ++++++++++++++ layouts/partials/post-info.html | 28 +++++++++++++++++++++++++ layouts/partials/post-language-switcher.html | 16 ++++++++++++++ layouts/partials/post-pagination.html | 16 ++++++++++++++ layouts/partials/post-summary.html | 6 ++++++ layouts/partials/right-sidebar.html | 1 + layouts/partials/single-extra.html | 1 - layouts/partials/social.html | 17 +++++++++++++++ 24 files changed, 222 insertions(+), 20 deletions(-) create mode 100644 layouts/partials/fa-icons/email.svg create mode 100644 layouts/partials/fa-icons/github.svg create mode 100644 layouts/partials/fa-icons/liberapay.svg create mode 100644 layouts/partials/fa-icons/mastodon.svg create mode 100644 layouts/partials/fa-icons/matrix.svg create mode 100644 layouts/partials/fa-icons/patreon.svg create mode 100644 layouts/partials/fa-icons/pleroma.svg create mode 100644 layouts/partials/fa-icons/sourcehut.svg create mode 100644 layouts/partials/font-awesome.html create mode 100644 layouts/partials/footer.html delete mode 100644 layouts/partials/head-extra.html create mode 100644 layouts/partials/head.html create mode 100644 layouts/partials/header.html create mode 100644 layouts/partials/language-switcher.html create mode 100644 layouts/partials/left-sidebar.html create mode 100644 layouts/partials/pagination.html create mode 100644 layouts/partials/post-info.html create mode 100644 layouts/partials/post-language-switcher.html create mode 100644 layouts/partials/post-pagination.html create mode 100644 layouts/partials/post-summary.html create mode 100644 layouts/partials/right-sidebar.html delete mode 100644 layouts/partials/single-extra.html create mode 100644 layouts/partials/social.html (limited to 'layouts/partials') 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 @@

Fediring

- Look at my fedi fellows' sites: -
    -
  1. Previous site
  2. -
  3. What is Fediring?
  4. -
  5. Next site
  6. -
-

Articles from blogs I read

-
+ +

{{ i18n "otherSites" }}

+
{{ partial "webring-articles.html" }} -
+ - Generated by - fead + {{ i18n "feadAttribution" | safeHTML }}
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 @@ + 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 @@ + 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 @@ + + + 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 @@ + 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 @@ + + + + + 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 @@ + 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 @@ + + + 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 @@ + 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 @@ + + +{{ $dict := newScratch }} + +{{ $dict.Set "svg" (partial (print "fa-icons/" .iconName ".svg")) }} + +{{ $dict.Get "svg" | safeHTML }} + + 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 @@ + 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 @@ - - - - -{{ $light := resources.Get "css/highlight.css" }} -{{ $dark := resources.Get "css/highdark.css" }} -{{ $code := slice $light $dark | resources.Concat "css/code.css" | minify | fingerprint }} - 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 @@ + + + + + + + + +{{ .Title }} - {{ .Site.Title }} + + +{{ with .OutputFormats.Get "rss" -}} + +{{ end -}} + + + + + + + +{{ $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 }} + + +{{ 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 @@ + +

{{ trim .Title " " }}

+{{ 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 @@ + \ 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 @@ +
+ {{ i18n "sections" }} + +
+{{ if gt (len .TableOfContents) 32 }} +
+ {{ i18n "TOC" }} + {{ .TableOfContents }} +
+{{ 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" }} + +{{ 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 @@ +
+ {{ with .Params.date }} +
+ +
+ {{ end }} + + +
+ {{ if .Params.categories }} + Categories: +
    + {{ range .Params.categories }} +
  • {{ . }}
  • + {{ end }} +
+ {{ end }} +
+ {{ if .Params.tags }} + Tags: + + {{ end }} +
+
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}} + +{{ 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 ) }} + +{{ 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 }} +: +{{ end }} +{{ trim .Title " " }} +{{ if .Params.draft }}(draft){{end}} +{{ partial "post-language-switcher.html" . }} diff --git a/layouts/partials/right-sidebar.html b/layouts/partials/right-sidebar.html new file mode 100644 index 0000000..0d3b101 --- /dev/null +++ b/layouts/partials/right-sidebar.html @@ -0,0 +1 @@ +{{ partial "custom-webring.html" }} diff --git a/layouts/partials/single-extra.html b/layouts/partials/single-extra.html deleted file mode 100644 index 0d3b101..0000000 --- a/layouts/partials/single-extra.html +++ /dev/null @@ -1 +0,0 @@ -{{ partial "custom-webring.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 @@ + + + {{ range $.Site.Params.Social }} + + + + + {{ end }} +
+ {{ $network := humanize .id }} + {{ $network | title }} + {{ partial "font-awesome.html" (dict "iconName" .id "network" $network) }} + + + {{ .name }} + +
-- cgit 1.4.1