From fbf2522975cdfeee6ba440867861f6aec22016b7 Mon Sep 17 00:00:00 2001 From: Francesco Date: Sat, 11 May 2024 22:13:47 +0200 Subject: [PATCH] Format Former-commit-id: f3234816ea7563a3870c63ebcbe3e4637655fc7b --- README.md | 19 +++++++------- layouts/404.html | 1 - layouts/_default/baseof.html | 44 +++++++++++++++----------------- layouts/_default/home.html | 3 ++- layouts/partials/comments.html | 2 +- layouts/partials/head.html | 10 +++++++- layouts/partials/head/js.html | 3 ++- layouts/partials/math.html | 9 ++++--- layouts/partials/post-entry.html | 7 +++-- 9 files changed, 56 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index 529116b..4f55921 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,8 @@ The fonts in use are [Literata](https://fonts.google.com/specimen/Literata) and Various miscellaneous features: - Latex blocks overflows on mobile to prevent having strange alignments; -- Code blocks are displayed with ligatures. +- Code blocks are displayed with ligatures; +- [Giscus](https://giscus.app/) comments support. ### 2.6 Extending the theme @@ -193,15 +194,15 @@ url = "/posts" name = "resume" url = "/resume" -# giscus conf, for more detail, see https://giscus.app/ +# Giscus conf, for more detail, see https://giscus.app/ [params.giscus] - enable = true - repo = "" - repoid = "" - category = "" - categoryid = "" - mapping = "pathname" - theme = "light" +enable = true +repo = "" +repoid = "" +category = "" +categoryid = "" +mapping = "pathname" +theme = "light" # Syntax highlight on code blocks, all styles: # https://xyproto.github.io/splash/docs/all.html diff --git a/layouts/404.html b/layouts/404.html index 72ef81e..15c8a62 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -9,5 +9,4 @@

typo?

- {{ end }} \ No newline at end of file diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index a116c36..9b63b69 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -2,36 +2,35 @@ - - {{ partial "head.html" . }} - + + {{ partial "head.html" . }} + -{{ $theme := "auto"}} + {{ $theme := "auto"}} -{{ with .Param "theme" }} -{{ $theme = .}} -{{ end }} + {{ with .Param "theme" }} + {{ $theme = .}} + {{ end }} - + -
-
- {{ partial "header.html" . }} -
+
+
+ {{ partial "header.html" . }} +
-
- {{ block "main" . }}{{ end }} -
-
+
+ {{ block "main" . }}{{ end }} +
+
- + - + - - - \ No newline at end of file diff --git a/layouts/_default/home.html b/layouts/_default/home.html index e251ce3..5273fa0 100644 --- a/layouts/_default/home.html +++ b/layouts/_default/home.html @@ -21,7 +21,8 @@

{{ . }}

{{ with site.Params.social }}
{{- range . }} - {{ partial "svg.html" . }} diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html index 979b59e..cbc7d6c 100644 --- a/layouts/partials/comments.html +++ b/layouts/partials/comments.html @@ -14,5 +14,5 @@ data-loading="lazy" crossorigin="anonymous" async> - + {{ end }} \ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html index fef47c4..9350ee6 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,6 +1,14 @@ -{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }} + + + {{ if .IsHome }} + {{ site.Title }} + {{ else }} + {{ printf "%s | %s" .Title site.Title }} + {{ end }} + + {{ partialCached "head/css.html" . }} {{ partialCached "head/js.html" . }} diff --git a/layouts/partials/head/js.html b/layouts/partials/head/js.html index 8bae509..aa471f4 100644 --- a/layouts/partials/head/js.html +++ b/layouts/partials/head/js.html @@ -1,6 +1,7 @@ {{- with resources.Get "js/main.js" }} {{- $opts := dict "minify" true }} {{- with . | js.Build $opts | fingerprint }} - + {{- end }} {{- end }} \ No newline at end of file diff --git a/layouts/partials/math.html b/layouts/partials/math.html index c54c8d5..62b330f 100644 --- a/layouts/partials/math.html +++ b/layouts/partials/math.html @@ -1,7 +1,10 @@ - - + + -