From a62a3e7755579d93ce3a87243dd277575930fffe Mon Sep 17 00:00:00 2001 From: Julio Capote Date: Mon, 5 Nov 2018 21:49:16 -0500 Subject: init --- themes/even/layouts/partials/comments.html | 109 +++++++++++++++++++ themes/even/layouts/partials/footer.html | 52 ++++++++++ themes/even/layouts/partials/head.html | 90 ++++++++++++++++ themes/even/layouts/partials/header.html | 19 ++++ themes/even/layouts/partials/post/copyright.html | 32 ++++++ .../partials/post/outdated-info-warning.html | 28 +++++ themes/even/layouts/partials/post/reward.html | 21 ++++ themes/even/layouts/partials/post/toc.html | 9 ++ themes/even/layouts/partials/scripts.html | 115 +++++++++++++++++++++ themes/even/layouts/partials/slideout.html | 25 +++++ 10 files changed, 500 insertions(+) create mode 100644 themes/even/layouts/partials/comments.html create mode 100644 themes/even/layouts/partials/footer.html create mode 100644 themes/even/layouts/partials/head.html create mode 100644 themes/even/layouts/partials/header.html create mode 100644 themes/even/layouts/partials/post/copyright.html create mode 100644 themes/even/layouts/partials/post/outdated-info-warning.html create mode 100644 themes/even/layouts/partials/post/reward.html create mode 100644 themes/even/layouts/partials/post/toc.html create mode 100644 themes/even/layouts/partials/scripts.html create mode 100644 themes/even/layouts/partials/slideout.html (limited to 'themes/even/layouts/partials') diff --git a/themes/even/layouts/partials/comments.html b/themes/even/layouts/partials/comments.html new file mode 100644 index 0000000..440240a --- /dev/null +++ b/themes/even/layouts/partials/comments.html @@ -0,0 +1,109 @@ +{{ if and .IsPage (ne .Params.comment false) }} + + {{- if .Site.DisqusShortname -}} +
+ + + {{- end -}} + + + {{- if and .Site.Params.changyanAppid .Site.Params.changyanAppkey -}} +
+ + {{- end -}} + + + {{- if .Site.Params.livereUID -}} +
+ + +
+ {{- end -}} + + + {{- if .Site.Params.gitment.owner -}} +
+ {{ if .Site.Params.publicCDN.enable -}} + {{ .Site.Params.publicCDN.gitmentCSS | safeHTML }} + {{ .Site.Params.publicCDN.gitmentJS | safeHTML }} + {{- else -}} + + + {{- end }} + + + {{- end }} + + + {{- if .Site.Params.gitalk.owner -}} +
+ {{ if .Site.Params.publicCDN.enable -}} + {{ .Site.Params.publicCDN.gitalkCSS | safeHTML }} + {{ .Site.Params.publicCDN.gitalkJS | safeHTML }} + {{- else -}} + + + {{- end }} + + + {{- end }} + +{{- end }} diff --git a/themes/even/layouts/partials/footer.html b/themes/even/layouts/partials/footer.html new file mode 100644 index 0000000..b6a1fa5 --- /dev/null +++ b/themes/even/layouts/partials/footer.html @@ -0,0 +1,52 @@ + + + \ No newline at end of file diff --git a/themes/even/layouts/partials/head.html b/themes/even/layouts/partials/head.html new file mode 100644 index 0000000..86ab6cf --- /dev/null +++ b/themes/even/layouts/partials/head.html @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + +{{- if .Description -}} + +{{ else if .IsPage }} + +{{ else if .Site.Params.description }} + +{{- end -}} + +{{- if .Keywords -}} + {{ $length := len .Keywords | add -1 -}} + +{{ else if .Site.Params.keywords }} + {{ $length := len .Site.Params.keywords | add -1 -}} + +{{- end }} + + +{{ with .Site.Params.baidu_verification }}{{ end }} +{{ with .Site.Params.google_verification }}{{ end }} + + + + + + +{{ if .RSSLink -}} + + +{{ end -}} + + + + + + + + + +{{- if .Site.Params.debug }} + + +{{- end }} + + +{{ if .Site.Params.busuanzi.enable -}} + +{{- end }} + + + +{{ if .Site.Params.publicCDN.enable -}} + {{ if .Site.Params.fancybox }}{{ .Site.Params.publicCDN.fancyboxCss | safeHTML }}{{ end }} +{{- else -}} + {{ if .Site.Params.fancybox }}{{ end }} +{{- end }} + + +{{ range .Site.Params.customCSS }} + +{{ end }} + +{{/* NOTE: These Hugo Internal Templates can be found starting at https://github.com/spf13/hugo/blob/master/tpl/tplimpl/template_embedded.go#L158 */}} +{{- template "_internal/opengraph.html" . -}} +{{- template "_internal/google_news.html" . -}} +{{- template "_internal/schema.html" . -}} +{{- template "_internal/twitter_cards.html" . -}} + + +{{ `` | safeHTML }} + +{{ `` | safeHTML }} diff --git a/themes/even/layouts/partials/header.html b/themes/even/layouts/partials/header.html new file mode 100644 index 0000000..3592e88 --- /dev/null +++ b/themes/even/layouts/partials/header.html @@ -0,0 +1,19 @@ +
+ +
+ + \ No newline at end of file diff --git a/themes/even/layouts/partials/post/copyright.html b/themes/even/layouts/partials/post/copyright.html new file mode 100644 index 0000000..cd42d68 --- /dev/null +++ b/themes/even/layouts/partials/post/copyright.html @@ -0,0 +1,32 @@ +{{ if or .Params.postMetaInFooter (and .Site.Params.postMetaInFooter (ne .Params.postMetaInFooter false)) -}} +
+ + + {{ if $.Site.Params.linkToMarkDown -}} + {{ with $.OutputFormats.Get "markdown" -}} + + {{- end }} + {{- end }} + {{ if or .Params.contentCopyright (and .Site.Params.contentCopyright (ne .Params.contentCopyright false)) -}} + + {{- end }} +
+{{- end }} \ No newline at end of file diff --git a/themes/even/layouts/partials/post/outdated-info-warning.html b/themes/even/layouts/partials/post/outdated-info-warning.html new file mode 100644 index 0000000..3736c13 --- /dev/null +++ b/themes/even/layouts/partials/post/outdated-info-warning.html @@ -0,0 +1,28 @@ +{{- if or .Params.enableOutdatedInfoWarning (and .Site.Params.outdatedInfoWarning.enable (ne .Params.enableOutdatedInfoWarning false)) }} + {{- $daysAgo := div (sub now.Unix .Lastmod.Unix) 86400 }} + {{- $hintThreshold := .Site.Params.outdatedInfoWarning.hint | default 30 }} + {{- $warnThreshold := .Site.Params.outdatedInfoWarning.warn | default 180 }} + + {{- $updateTime := .Lastmod }} + {{- if .GitInfo }} + {{- if lt .GitInfo.AuthorDate.Unix .Lastmod.Unix }} + {{- $updateTime := .GitInfo.AuthorDate }} + {{- end }} + {{- end -}} + + {{- if gt $daysAgo $hintThreshold }} +
+ {{- if gt $daysAgo $warnThreshold }} +
+ {{- else }} +
+ {{- end }} +

{{ T "outdatedInfoWarningBefore" -}} + + {{- dateFormat "January 2, 2006" $updateTime -}} + {{ T "outdatedInfoWarningAfter" -}} +

+
+
+ {{- end -}} +{{- end -}} diff --git a/themes/even/layouts/partials/post/reward.html b/themes/even/layouts/partials/post/reward.html new file mode 100644 index 0000000..3242854 --- /dev/null +++ b/themes/even/layouts/partials/post/reward.html @@ -0,0 +1,21 @@ +{{ if or .Params.reward (and .Site.Params.reward.enable (ne .Params.reward false)) }} +
+ + +
+ {{ $qrCode := .Site.Params.reward }} + {{ with $qrCode.wechat }} + + {{- end }} + {{ with $qrCode.alipay }} + + {{- end }} +
+
+{{- end }} \ No newline at end of file diff --git a/themes/even/layouts/partials/post/toc.html b/themes/even/layouts/partials/post/toc.html new file mode 100644 index 0000000..4fed1c7 --- /dev/null +++ b/themes/even/layouts/partials/post/toc.html @@ -0,0 +1,9 @@ +{{ if or .Params.toc (and .Site.Params.toc (ne .Params.toc false)) }} +
+

{{ T "toc" }}

+ {{ $globalAutoCollapseToc := .Site.Params.autoCollapseToc | default false }} +
+ {{.TableOfContents}} +
+
+{{- end }} \ No newline at end of file diff --git a/themes/even/layouts/partials/scripts.html b/themes/even/layouts/partials/scripts.html new file mode 100644 index 0000000..803ac6a --- /dev/null +++ b/themes/even/layouts/partials/scripts.html @@ -0,0 +1,115 @@ + + +{{- if .Site.Params.publicCDN.enable }} + {{ .Site.Params.publicCDN.jquery | safeHTML }} + {{ .Site.Params.publicCDN.slideout | safeHTML }} + {{ if .Site.Params.fancybox }}{{ .Site.Params.publicCDN.fancyboxJs | safeHTML }}{{ end }} +{{- else -}} + + + {{ if .Site.Params.fancybox }}{{ end }} +{{- end -}} + + +{{- if and (or .Params.enableOutdatedInfoWarning (and .Site.Params.outdatedInfoWarning.enable (ne .Params.enableOutdatedInfoWarning false))) (or .IsPage .IsHome) }} + {{- if .Site.Params.publicCDN.enable }} + {{ .Site.Params.publicCDN.timeagoJS | safeHTML }} + {{ .Site.Params.publicCDN.timeagoLocalesJS | safeHTML }} + {{- else }} + + + {{- end }} + +{{- end }} + + +{{- if and (or .Params.flowchartDiagrams.enable (and .Site.Params.flowchartDiagrams.enable (ne .Params.flowchartDiagrams.enable false))) (or .IsPage .IsHome) -}} + + + +{{- end -}} + + +{{- if and (or .Params.sequenceDiagrams.enable (and .Site.Params.sequenceDiagrams.enable (ne .Params.sequenceDiagrams.enable false))) (or .IsPage .IsHome) -}} + + + + + + +{{- end }} + + +{{- if and (or .Params.mathjax (and .Site.Params.mathjax (ne .Params.mathjax false))) (or .IsPage .IsHome) }} + + +{{- end }} + + +{{- if .Site.GoogleAnalytics -}} + {{ template "_internal/google_analytics_async.html" . }} +{{- end -}} + +{{- with .Site.Params.baidu_analytics -}} + +{{- end }} + + +{{- if .Site.Params.baidu_push -}} + +{{- end }} + + +{{ range .Site.Params.customJS }} + +{{ end }} diff --git a/themes/even/layouts/partials/slideout.html b/themes/even/layouts/partials/slideout.html new file mode 100644 index 0000000..42ed13e --- /dev/null +++ b/themes/even/layouts/partials/slideout.html @@ -0,0 +1,25 @@ + + \ No newline at end of file -- cgit v1.2.3