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