From dfb6e1f80754c1c8f2d4d332c5292319f008a67b Mon Sep 17 00:00:00 2001 From: amzrk2 Date: Wed, 27 May 2020 22:53:13 +0800 Subject: v2 original port --- layouts/partials/comment-disqus.html | 18 ---- layouts/partials/comment-utterances.html | 4 +- layouts/partials/components.html | 8 ++ layouts/partials/footer.html | 9 +- layouts/partials/head.html | 77 ++++++++-------- layouts/partials/header.html | 6 +- layouts/partials/math.html | 4 + layouts/partials/post-meta.html | 6 +- layouts/partials/scripts-end.html | 146 +++++++++++++++++++++++++++++++ layouts/partials/scripts-front.html | 18 ++++ layouts/partials/scripts.html | 97 -------------------- layouts/partials/sidebar.html | 102 ++++++++++----------- 12 files changed, 286 insertions(+), 209 deletions(-) delete mode 100644 layouts/partials/comment-disqus.html create mode 100644 layouts/partials/components.html create mode 100644 layouts/partials/math.html create mode 100644 layouts/partials/scripts-end.html create mode 100644 layouts/partials/scripts-front.html delete mode 100644 layouts/partials/scripts.html (limited to 'layouts/partials') diff --git a/layouts/partials/comment-disqus.html b/layouts/partials/comment-disqus.html deleted file mode 100644 index 539f8c7..0000000 --- a/layouts/partials/comment-disqus.html +++ /dev/null @@ -1,18 +0,0 @@ -{{ with .Site.Params.disqusShortname }} -
-
- -
-{{ end }} \ No newline at end of file diff --git a/layouts/partials/comment-utterances.html b/layouts/partials/comment-utterances.html index 3e56201..43c06bf 100644 --- a/layouts/partials/comment-utterances.html +++ b/layouts/partials/comment-utterances.html @@ -4,6 +4,8 @@

{{ i18n "postCommentLoading" }}

- +
{{ end }} \ No newline at end of file diff --git a/layouts/partials/components.html b/layouts/partials/components.html new file mode 100644 index 0000000..273f813 --- /dev/null +++ b/layouts/partials/components.html @@ -0,0 +1,8 @@ +
+
+ +
+
+ +
+
\ No newline at end of file diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index be8f5bf..cb43e10 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,5 +1,10 @@ \ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 134f6e4..c306ade 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -18,51 +18,54 @@ {{ else }} {{ .Title }} - {{ .Site.Title }} {{ end }} - - +{{ if or (.Params.author) (.Site.Params.author) }} + +{{ end }} +{{ if or (.Params.description) (.Site.Params.description) }} + +{{ end }} {{ if .Params.tags }} {{ end }} + {{ template "_internal/opengraph.html" . }} {{ template "_internal/twitter_cards.html" . }} -{{ template "_internal/google_analytics_async.html" . }} - -{{ $options := (dict "targetPath" "css/main.min.css" "outputStyle" "compressed") }} -{{ $style := resources.Get "sass/main.scss" | resources.ToCSS $options }} - + +{{ $sass := resources.Get "fuji.scss" }} +{{ $options := (dict "targetPath" "assets/css/fuji.min.css" "outputStyle" "compressed" "enableSourceMap" true) }} +{{ $style := $sass | resources.ToCSS $options }} + - -{{ if .Site.Params.useCDN }} - - - - -{{ if or (.Site.Params.playerURL) (.Params.playerURL) }} - - -{{ end }} - +{{ if .Site.Params.useResourceCDN }} + + + + + + + {{ else }} -{{ $jquery := resources.Get "js/jquery.min.js" }} - -{{ $lazysizes := resources.Get "js/lazysizes.min.js" }} - -{{ $fontawesome := resources.Get "css/fontawsome.min.css" }} - -{{ $zoom := resources.Get "js/medium-zoom.min.js" }} - -{{ if or (.Site.Params.playerURL) (.Params.playerURL) }} -{{ $aplayerCSS := resources.Get "css/APlayer.min.css" }} - -{{ $aplayerJS := resources.Get "js/APlayer.min.js" }} - -{{ end }} + + + + + + + {{ end }} - -{{ if or (.Params.math) (.Site.Params.math) }} - - - +{{ with .Site.GoogleAnalytics }} + + + {{ end }} \ No newline at end of file diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 3166a36..a08e2d9 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,9 +1,9 @@
- diff --git a/layouts/partials/math.html b/layouts/partials/math.html new file mode 100644 index 0000000..aca973a --- /dev/null +++ b/layouts/partials/math.html @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/layouts/partials/post-meta.html b/layouts/partials/post-meta.html index 80f3a16..1d0a081 100644 --- a/layouts/partials/post-meta.html +++ b/layouts/partials/post-meta.html @@ -1 +1,5 @@ -{{ if .Site.Params.showWordCounter }} {{ .WordCount }}{{ i18n "postMetaWordCount" }}{{ end }}{{ if .Site.Params.showReadTime }} {{ .ReadingTime }}{{ i18n "postMetaReadingTime" }}{{ end }} {{ if .Params.tags }}{{ range .Params.tags }}{{ . }} {{ end }}{{ else }}{{ i18n "postMetaNoTag" }}{{ end }} \ No newline at end of file +{{ if .Site.Params.showWordCounter }} +{{ .WordCount }}{{ i18n "postMetaWordCount" }}{{ end }}{{ if .Site.Params.showReadTime }} +{{ .ReadingTime }}{{ i18n "postMetaReadingTime" }}{{ end }} +{{ if .Params.tags }}{{ range .Params.tags }}{{ . }} {{ end }}{{ else }}{{ i18n "postMetaNoTag" }}{{ end }} \ No newline at end of file diff --git a/layouts/partials/scripts-end.html b/layouts/partials/scripts-end.html new file mode 100644 index 0000000..d82ab58 --- /dev/null +++ b/layouts/partials/scripts-end.html @@ -0,0 +1,146 @@ + + + + +{{ if and (and (ne .Params.noComments true) (.IsPage)) (.Site.Params.utterancesRepo) }} + +{{ else }} + +{{ end }} + +{{ with .Params.playerURL }} + +{{ end }} \ No newline at end of file diff --git a/layouts/partials/scripts-front.html b/layouts/partials/scripts-front.html new file mode 100644 index 0000000..9fa99b6 --- /dev/null +++ b/layouts/partials/scripts-front.html @@ -0,0 +1,18 @@ + \ No newline at end of file diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html deleted file mode 100644 index 6bcdd8b..0000000 --- a/layouts/partials/scripts.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - -{{ if ne .Params.noComments true }} -{{ if and (.IsPage) (.Site.Params.utterancesRepo) }} - -{{ end }} -{{ end }} - - -{{ if in .Site.Params.mainSections .Type }} - -{{ end }} -{{ if .Site.Params.scrollTop }} - - -{{ end }} - - -{{ with .Params.playerURL }} - -{{ end }} - -{{ with .Site.Params.playerURL }} - -{{ end }} \ No newline at end of file diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index 51e53d3..8e902c1 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -1,51 +1,53 @@ - -{{ if in .Site.Params.mainSections .Type }} -
-
{{ i18n "sidebarToc" }}
- {{.TableOfContents}} -
-{{ end }} - -
-
{{ i18n "sidebarPages" }}
-
    - {{ $currentPage := . }} - {{ range .Site.Menus.nav }} -
  • - {{ .Name }} -
  • - {{ end }} -
  • - RSS -
  • -
-
- -
-
{{ i18n "sidebarTags" }}
-
- {{ range .Site.Taxonomies.tags }} - - {{ .Page.Title }} - - {{ end }} +
- - - -{{ with .Site.Params.bgmImageChart }} -
-
{{ i18n "sidebarBangumiChart" }}
- Bangumi Image Chart -
-{{ end }} \ No newline at end of file + {{ end }} + + + + + + + {{ with .Site.Params.bgmImageChart }} + + + {{ end }} + \ No newline at end of file -- cgit v1.2.3 From acc5ec346a8d5bf0b7fd96ea0d7bfe89731c7fe2 Mon Sep 17 00:00:00 2001 From: amzrk2 Date: Thu, 28 May 2020 10:38:41 +0800 Subject: ie --- layouts/partials/scripts-front.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'layouts/partials') diff --git a/layouts/partials/scripts-front.html b/layouts/partials/scripts-front.html index 9fa99b6..59c3bb0 100644 --- a/layouts/partials/scripts-front.html +++ b/layouts/partials/scripts-front.html @@ -15,4 +15,19 @@ } else { localStorage.setItem('fuji_theme', $('body').attr('data-theme')); } + + \ No newline at end of file -- cgit v1.2.3 From d47a131ca03b813b26345c752d41cc8999a646ce Mon Sep 17 00:00:00 2001 From: amzrk2 Date: Fri, 29 May 2020 16:14:13 +0800 Subject: Fix highlight.js --- layouts/partials/head.html | 4 ++-- layouts/partials/scripts-end.html | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'layouts/partials') diff --git a/layouts/partials/head.html b/layouts/partials/head.html index c306ade..85b77cc 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -41,7 +41,7 @@ {{ if .Site.Params.useResourceCDN }} - + @@ -52,7 +52,7 @@ - + {{ end }} diff --git a/layouts/partials/scripts-end.html b/layouts/partials/scripts-end.html index d82ab58..ea37e5c 100644 --- a/layouts/partials/scripts-end.html +++ b/layouts/partials/scripts-end.html @@ -72,13 +72,15 @@ background: mediumTheme }); - // init highlight.js hljs.initHighlightingOnLoad(); // remove empty ul in toc if article only have ## and ### if ($('.sidebar-toc ul ul').length > 0 && $('.sidebar-toc ul ul li').text() === '') { $('.sidebar-toc ul ul').hide(); } + + // init highlight.js + hljs.initHighlighting(); {{ if and (and (ne .Params.noComments true) (.IsPage)) (.Site.Params.utterancesRepo) }} -- cgit v1.2.3 From 594655b050145b7c3beab06166678940e613a79a Mon Sep 17 00:00:00 2001 From: amzrk2 Date: Fri, 29 May 2020 16:55:27 +0800 Subject: Disqus support --- layouts/partials/comment-disqus.html | 18 ++++++++++++++++++ layouts/partials/scripts-end.html | 16 ++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 layouts/partials/comment-disqus.html (limited to 'layouts/partials') diff --git a/layouts/partials/comment-disqus.html b/layouts/partials/comment-disqus.html new file mode 100644 index 0000000..539f8c7 --- /dev/null +++ b/layouts/partials/comment-disqus.html @@ -0,0 +1,18 @@ +{{ with .Site.Params.disqusShortname }} +
+
+ +
+{{ end }} \ No newline at end of file diff --git a/layouts/partials/scripts-end.html b/layouts/partials/scripts-end.html index ea37e5c..39b3a00 100644 --- a/layouts/partials/scripts-end.html +++ b/layouts/partials/scripts-end.html @@ -118,6 +118,22 @@ } }); +{{ else if and (and (ne .Params.noComments true) (.IsPage)) (.Site.Params.disqusShortname) }} + {{ else }} + +{{ end }} \ No newline at end of file diff --git a/layouts/partials/analytic-gtag.html b/layouts/partials/analytic-gtag.html new file mode 100644 index 0000000..f43e48a --- /dev/null +++ b/layouts/partials/analytic-gtag.html @@ -0,0 +1,13 @@ +{{ with .Site.GoogleAnalytics }} + + + +{{ end }} \ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 85b77cc..f52a7ce 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -56,16 +56,5 @@ {{ end }} -{{ with .Site.GoogleAnalytics }} - - - -{{ end }} \ No newline at end of file +{{ partial "analytic-gtag.html" . }} +{{ partial "analytic-cfga.html" . }} \ No newline at end of file -- cgit v1.2.3 From f14d5fa8f78a5756866002591aa479f8ccf5b582 Mon Sep 17 00:00:00 2001 From: amzrk2 Date: Sat, 30 May 2020 12:54:18 +0800 Subject: Custom highlight.js support --- layouts/partials/head.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'layouts/partials') diff --git a/layouts/partials/head.html b/layouts/partials/head.html index f52a7ce..b407340 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -43,18 +43,33 @@ +{{ if .Site.Params.customHighlight }} + +{{ else }} +{{ end }} +{{ if .Params.playerURL }} +{{ end }} + {{ else }} + +{{ if .Site.Params.customHighlight }} + +{{ else }} +{{ end }} +{{ if .Params.playerURL }} {{ end }} +{{ end }} + {{ partial "analytic-gtag.html" . }} {{ partial "analytic-cfga.html" . }} \ No newline at end of file -- cgit v1.2.3 From ac62cbd84fc67401f4014b6e9d8ed6c6b175503e Mon Sep 17 00:00:00 2001 From: amzrk2 Date: Sat, 30 May 2020 14:02:20 +0800 Subject: Update fa --- layouts/partials/comment-utterances.html | 2 +- layouts/partials/components.html | 4 ++-- layouts/partials/head.html | 21 +-------------------- layouts/partials/post-meta.html | 8 ++++---- 4 files changed, 8 insertions(+), 27 deletions(-) (limited to 'layouts/partials') diff --git a/layouts/partials/comment-utterances.html b/layouts/partials/comment-utterances.html index 43c06bf..ac1e723 100644 --- a/layouts/partials/comment-utterances.html +++ b/layouts/partials/comment-utterances.html @@ -1,6 +1,6 @@ {{ with .Site.Params.utterancesRepo }}
- +

{{ i18n "postCommentLoading" }}

diff --git a/layouts/partials/components.html b/layouts/partials/components.html index 273f813..0fb4f6a 100644 --- a/layouts/partials/components.html +++ b/layouts/partials/components.html @@ -1,8 +1,8 @@
- +
- +
\ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html index b407340..d4b610c 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -38,11 +38,10 @@ {{ $style := $sass | resources.ToCSS $options }} -{{ if .Site.Params.useResourceCDN }} - + {{ if .Site.Params.customHighlight }} {{ else }} @@ -53,23 +52,5 @@ {{ end }} -{{ else }} - - - - - -{{ if .Site.Params.customHighlight }} - -{{ else }} - -{{ end }} -{{ if .Params.playerURL }} - - -{{ end }} - -{{ end }} - {{ partial "analytic-gtag.html" . }} {{ partial "analytic-cfga.html" . }} \ No newline at end of file diff --git a/layouts/partials/post-meta.html b/layouts/partials/post-meta.html index 1d0a081..7d686ce 100644 --- a/layouts/partials/post-meta.html +++ b/layouts/partials/post-meta.html @@ -1,5 +1,5 @@ -{{ if .Site.Params.showWordCounter }} -{{ .WordCount }}{{ i18n "postMetaWordCount" }}{{ end }}{{ if .Site.Params.showReadTime }} -{{ .ReadingTime }}{{ i18n "postMetaReadingTime" }}{{ end }} +{{ if .Site.Params.showWordCounter }} +{{ .WordCount }}{{ i18n "postMetaWordCount" }}{{ end }}{{ if .Site.Params.showReadTime }} +{{ .ReadingTime }}{{ i18n "postMetaReadingTime" }}{{ end }} {{ if .Params.tags }}{{ range .Params.tags }}{{ . }} {{ end }}{{ else }}{{ i18n "postMetaNoTag" }}{{ end }} \ No newline at end of file -- cgit v1.2.3 From bde0e702941721e0f408390478a1f497cf8a7a31 Mon Sep 17 00:00:00 2001 From: amzrk2 Date: Sat, 30 May 2020 14:05:49 +0800 Subject: Update footer --- layouts/partials/footer.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'layouts/partials') diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index cb43e10..2f4ba79 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,7 +1,7 @@