From 8555cf72dec9321fa010296ce6988cf7b7cf602b Mon Sep 17 00:00:00 2001 From: Ryan Schanzenbacher Date: Sun, 26 Dec 2021 00:30:09 -0500 Subject: convert theme from submodule to regular files --- themes/hugo-coder | 1 - themes/hugo-coder/layouts/404.html | 3 + .../layouts/_default/_markup/render-heading.html | 6 + themes/hugo-coder/layouts/_default/baseof.html | 160 +++++++++++++++++++++ themes/hugo-coder/layouts/_default/list.html | 11 ++ themes/hugo-coder/layouts/_default/single.html | 7 + themes/hugo-coder/layouts/_default/terms.html | 11 ++ themes/hugo-coder/layouts/index.html | 3 + themes/hugo-coder/layouts/partials/404.html | 7 + .../layouts/partials/analytics/cloudflare.html | 4 + .../layouts/partials/analytics/fathom.html | 13 ++ .../layouts/partials/analytics/goatcounter.html | 2 + .../partials/analytics/googletagmanager.html | 9 ++ .../layouts/partials/analytics/matomo.html | 13 ++ .../layouts/partials/analytics/plausible.html | 1 + themes/hugo-coder/layouts/partials/csp.html | 1 + themes/hugo-coder/layouts/partials/float.html | 7 + themes/hugo-coder/layouts/partials/footer.html | 26 ++++ themes/hugo-coder/layouts/partials/header.html | 39 +++++ themes/hugo-coder/layouts/partials/home.html | 35 +++++ themes/hugo-coder/layouts/partials/list.html | 22 +++ themes/hugo-coder/layouts/partials/page.html | 13 ++ themes/hugo-coder/layouts/partials/pagination.html | 48 +++++++ .../layouts/partials/posts/commento.html | 4 + .../hugo-coder/layouts/partials/posts/disqus.html | 3 + themes/hugo-coder/layouts/partials/posts/math.html | 38 +++++ .../hugo-coder/layouts/partials/posts/series.html | 29 ++++ .../layouts/partials/posts/utterances.html | 12 ++ .../layouts/partials/taxonomy/authors.html | 9 ++ .../layouts/partials/taxonomy/categories.html | 9 ++ .../hugo-coder/layouts/partials/taxonomy/tags.html | 11 ++ themes/hugo-coder/layouts/partials/terms.html | 28 ++++ themes/hugo-coder/layouts/posts/li.html | 4 + themes/hugo-coder/layouts/posts/list.html | 21 +++ themes/hugo-coder/layouts/posts/single.html | 52 +++++++ themes/hugo-coder/layouts/shortcodes/notice.html | 12 ++ 36 files changed, 673 insertions(+), 1 deletion(-) delete mode 160000 themes/hugo-coder create mode 100644 themes/hugo-coder/layouts/404.html create mode 100644 themes/hugo-coder/layouts/_default/_markup/render-heading.html create mode 100644 themes/hugo-coder/layouts/_default/baseof.html create mode 100644 themes/hugo-coder/layouts/_default/list.html create mode 100644 themes/hugo-coder/layouts/_default/single.html create mode 100644 themes/hugo-coder/layouts/_default/terms.html create mode 100644 themes/hugo-coder/layouts/index.html create mode 100644 themes/hugo-coder/layouts/partials/404.html create mode 100644 themes/hugo-coder/layouts/partials/analytics/cloudflare.html create mode 100644 themes/hugo-coder/layouts/partials/analytics/fathom.html create mode 100644 themes/hugo-coder/layouts/partials/analytics/goatcounter.html create mode 100644 themes/hugo-coder/layouts/partials/analytics/googletagmanager.html create mode 100644 themes/hugo-coder/layouts/partials/analytics/matomo.html create mode 100644 themes/hugo-coder/layouts/partials/analytics/plausible.html create mode 100644 themes/hugo-coder/layouts/partials/csp.html create mode 100644 themes/hugo-coder/layouts/partials/float.html create mode 100644 themes/hugo-coder/layouts/partials/footer.html create mode 100644 themes/hugo-coder/layouts/partials/header.html create mode 100644 themes/hugo-coder/layouts/partials/home.html create mode 100644 themes/hugo-coder/layouts/partials/list.html create mode 100644 themes/hugo-coder/layouts/partials/page.html create mode 100644 themes/hugo-coder/layouts/partials/pagination.html create mode 100644 themes/hugo-coder/layouts/partials/posts/commento.html create mode 100644 themes/hugo-coder/layouts/partials/posts/disqus.html create mode 100644 themes/hugo-coder/layouts/partials/posts/math.html create mode 100644 themes/hugo-coder/layouts/partials/posts/series.html create mode 100644 themes/hugo-coder/layouts/partials/posts/utterances.html create mode 100644 themes/hugo-coder/layouts/partials/taxonomy/authors.html create mode 100644 themes/hugo-coder/layouts/partials/taxonomy/categories.html create mode 100644 themes/hugo-coder/layouts/partials/taxonomy/tags.html create mode 100644 themes/hugo-coder/layouts/partials/terms.html create mode 100644 themes/hugo-coder/layouts/posts/li.html create mode 100644 themes/hugo-coder/layouts/posts/list.html create mode 100644 themes/hugo-coder/layouts/posts/single.html create mode 100644 themes/hugo-coder/layouts/shortcodes/notice.html (limited to 'themes/hugo-coder/layouts') diff --git a/themes/hugo-coder b/themes/hugo-coder deleted file mode 160000 index 55b2a15..0000000 --- a/themes/hugo-coder +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 55b2a150f990bc56364dba347bc9acc6aab07be3 diff --git a/themes/hugo-coder/layouts/404.html b/themes/hugo-coder/layouts/404.html new file mode 100644 index 0000000..23ecb19 --- /dev/null +++ b/themes/hugo-coder/layouts/404.html @@ -0,0 +1,3 @@ +{{ define "content" }} + {{ partial "404.html" . }} +{{ end }} diff --git a/themes/hugo-coder/layouts/_default/_markup/render-heading.html b/themes/hugo-coder/layouts/_default/_markup/render-heading.html new file mode 100644 index 0000000..712241b --- /dev/null +++ b/themes/hugo-coder/layouts/_default/_markup/render-heading.html @@ -0,0 +1,6 @@ + + {{ .Text | safeHTML }} + + + + diff --git a/themes/hugo-coder/layouts/_default/baseof.html b/themes/hugo-coder/layouts/_default/baseof.html new file mode 100644 index 0000000..89635ee --- /dev/null +++ b/themes/hugo-coder/layouts/_default/baseof.html @@ -0,0 +1,160 @@ + + + + + + + + + + {{ if .Site.Params.csp }} + {{ partial "csp.html" . }} + {{ end }} + + {{ with .Site.Params.author }}{{ end }} + + + + {{ template "_internal/twitter_cards.html" . }} + {{ template "_internal/opengraph.html" . }} + + {{ block "title" . }}{{ .Site.Title }}{{ end }} + + {{ if .Permalink }} + + {{ end }} + + + + {{ if .Site.IsServer }} + {{ $cssOpts := (dict "targetPath" "css/coder.css" "enableSourceMap" true ) }} + {{ $styles := resources.Get "scss/coder.scss" | resources.ExecuteAsTemplate "style.coder.css" . | toCSS $cssOpts }} + + {{ else }} + {{ $cssOpts := (dict "targetPath" "css/coder.css" ) }} + {{ $styles := resources.Get "scss/coder.scss" | resources.ExecuteAsTemplate "style.coder.css" . | toCSS $cssOpts | minify | fingerprint }} + + {{ end }} + + {{ if .Site.Params.rtl }} + {{ if .Site.IsServer }} + {{ $cssOpts := (dict "targetPath" "css/coder-rtl.css" "enableSourceMap" true ) }} + {{ $styles := resources.Get "scss/coder-rtl.scss" | resources.ExecuteAsTemplate "style.coder-rtl.css" . | toCSS $cssOpts }} + + {{ else }} + {{ $cssOpts := (dict "targetPath" "css/coder-rtl.css" ) }} + {{ $styles := resources.Get "scss/coder-rtl.scss" | resources.ExecuteAsTemplate "style.coder-rtl.css" . | toCSS $cssOpts | minify | fingerprint }} + + {{ end }} + {{ end }} + + {{ if or (eq .Site.Params.colorScheme "auto") (eq .Site.Params.colorScheme "dark") }} + {{ if .Site.IsServer }} + {{ $cssOpts := (dict "targetPath" "css/coder-dark.css" "enableSourceMap" true ) }} + {{ $styles := resources.Get "scss/coder-dark.scss" | resources.ExecuteAsTemplate "style.coder-dark.css" . | toCSS $cssOpts }} + + {{ else }} + {{ $cssOpts := (dict "targetPath" "css/coder-dark.css" ) }} + {{ $styles := resources.Get "scss/coder-dark.scss" | resources.ExecuteAsTemplate "style.coder-dark.css" . | toCSS $cssOpts | minify | fingerprint }} + + {{ end }} + {{ end }} + + {{ range .Site.Params.customCSS }} + + {{ end }} + + {{ range .Site.Params.customSCSS }} + {{/* We don't change the targetPath to because it's transparent to users */}} + {{ if $.Site.IsServer }} + {{ $cssOpts := (dict "enableSourceMap" true ) }} + {{ $styles := resources.Get . | toCSS $cssOpts }} + + {{ else }} + {{ $styles := resources.Get . | toCSS | minify | fingerprint }} + + {{ end }} + {{ end }} + + + + + + + + {{ range .AlternativeOutputFormats -}} + {{ printf `` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }} + {{ end -}} + + {{ if .Site.Params.enableTwemoji }} + + {{ end }} + + {{ hugo.Generator }} + + + {{ $csClass := "colorscheme-light" }} + {{ if eq .Site.Params.colorScheme "dark" }} + {{ $csClass = "colorscheme-dark" }} + {{ else if eq .Site.Params.colorScheme "auto" }} + {{ $csClass = "colorscheme-auto" }} + {{ end }} + + + + + + {{ partial "float" . }} +
+ {{ partial "header.html" . }} + +
+ {{ block "content" . }}{{ end }} +
+ + {{ partial "footer.html" . }} +
+ + {{ if .Site.IsServer }} + {{ $script := resources.Get "js/coder.js" }} + + {{ else }} + {{ $script := resources.Get "js/coder.js" | minify | fingerprint }} + + {{ end }} + + {{ range .Site.Params.customJS }} + + {{ end }} + + {{ template "_internal/google_analytics.html" . }} + + {{ if and .Site.Params.fathomAnalytics .Site.Params.fathomAnalytics.siteID }} + {{- partial "analytics/fathom" . -}} + {{ end }} + + {{ if and .Site.Params.plausibleAnalytics .Site.Params.plausibleAnalytics.domain }} + {{- partial "analytics/plausible" . -}} + {{ end }} + + {{ if and .Site.Params.goatCounter .Site.Params.goatCounter.code }} + {{- partial "analytics/goatcounter" . -}} + {{ end }} + + {{ if and .Site.Params.cloudflare .Site.Params.cloudflare.token }} + {{- partial "analytics/cloudflare" . -}} + {{ end }} + + {{ if and .Site.Params.matomo .Site.Params.matomo.serverURL }} + {{- partial "analytics/matomo" . -}} + {{ end }} + + {{ if and .Site.Params.googleTagManager .Site.Params.googleTagManager.id }} + {{- partial "analytics/googletagmanager" . -}} + {{ end }} + + + diff --git a/themes/hugo-coder/layouts/_default/list.html b/themes/hugo-coder/layouts/_default/list.html new file mode 100644 index 0000000..e35b04c --- /dev/null +++ b/themes/hugo-coder/layouts/_default/list.html @@ -0,0 +1,11 @@ +{{ define "title" }} + {{- if eq .Kind "term" -}} + {{- i18n .Data.Singular | title -}} + {{- print ": " -}} + {{- end -}} + + {{- .Title }} · {{ .Site.Title -}} +{{ end }} +{{ define "content" }} + {{ partial "list.html" . }} +{{ end }} diff --git a/themes/hugo-coder/layouts/_default/single.html b/themes/hugo-coder/layouts/_default/single.html new file mode 100644 index 0000000..6150c6a --- /dev/null +++ b/themes/hugo-coder/layouts/_default/single.html @@ -0,0 +1,7 @@ +{{ define "title" }} + {{ .Title }} · {{ .Site.Title }} +{{ end }} +{{ define "content" }} + {{ partial "page.html" . }} + {{ partial "posts/math.html" . }} +{{ end }} diff --git a/themes/hugo-coder/layouts/_default/terms.html b/themes/hugo-coder/layouts/_default/terms.html new file mode 100644 index 0000000..9d35888 --- /dev/null +++ b/themes/hugo-coder/layouts/_default/terms.html @@ -0,0 +1,11 @@ +{{ define "title" }} + {{- if eq .Kind "term" -}} + {{- i18n .Data.Singular | title -}} + {{- print ": " -}} + {{- end -}} + + {{- .Title }} · {{ .Site.Title -}} +{{ end }} +{{ define "content" }} + {{ partial "terms.html" . }} +{{ end }} diff --git a/themes/hugo-coder/layouts/index.html b/themes/hugo-coder/layouts/index.html new file mode 100644 index 0000000..b829b61 --- /dev/null +++ b/themes/hugo-coder/layouts/index.html @@ -0,0 +1,3 @@ +{{ define "content" }} + {{ partial "home.html" . }} +{{ end }} diff --git a/themes/hugo-coder/layouts/partials/404.html b/themes/hugo-coder/layouts/partials/404.html new file mode 100644 index 0000000..a884c68 --- /dev/null +++ b/themes/hugo-coder/layouts/partials/404.html @@ -0,0 +1,7 @@ +
+
+

404

+

{{ i18n "page_not_found" }}

+

{{ i18n "page_does_not_exist" }}
{{ i18n "head_back" .Site.BaseURL | safeHTML }}

+
+
diff --git a/themes/hugo-coder/layouts/partials/analytics/cloudflare.html b/themes/hugo-coder/layouts/partials/analytics/cloudflare.html new file mode 100644 index 0000000..d8a732f --- /dev/null +++ b/themes/hugo-coder/layouts/partials/analytics/cloudflare.html @@ -0,0 +1,4 @@ + + + diff --git a/themes/hugo-coder/layouts/partials/analytics/fathom.html b/themes/hugo-coder/layouts/partials/analytics/fathom.html new file mode 100644 index 0000000..13e7cfc --- /dev/null +++ b/themes/hugo-coder/layouts/partials/analytics/fathom.html @@ -0,0 +1,13 @@ + diff --git a/themes/hugo-coder/layouts/partials/analytics/goatcounter.html b/themes/hugo-coder/layouts/partials/analytics/goatcounter.html new file mode 100644 index 0000000..5ba3063 --- /dev/null +++ b/themes/hugo-coder/layouts/partials/analytics/goatcounter.html @@ -0,0 +1,2 @@ + diff --git a/themes/hugo-coder/layouts/partials/analytics/googletagmanager.html b/themes/hugo-coder/layouts/partials/analytics/googletagmanager.html new file mode 100644 index 0000000..2d2581d --- /dev/null +++ b/themes/hugo-coder/layouts/partials/analytics/googletagmanager.html @@ -0,0 +1,9 @@ + + + diff --git a/themes/hugo-coder/layouts/partials/analytics/matomo.html b/themes/hugo-coder/layouts/partials/analytics/matomo.html new file mode 100644 index 0000000..8fabb63 --- /dev/null +++ b/themes/hugo-coder/layouts/partials/analytics/matomo.html @@ -0,0 +1,13 @@ + diff --git a/themes/hugo-coder/layouts/partials/analytics/plausible.html b/themes/hugo-coder/layouts/partials/analytics/plausible.html new file mode 100644 index 0000000..8999972 --- /dev/null +++ b/themes/hugo-coder/layouts/partials/analytics/plausible.html @@ -0,0 +1 @@ + diff --git a/themes/hugo-coder/layouts/partials/csp.html b/themes/hugo-coder/layouts/partials/csp.html new file mode 100644 index 0000000..e9238a4 --- /dev/null +++ b/themes/hugo-coder/layouts/partials/csp.html @@ -0,0 +1 @@ +{{ printf `` (delimit .Site.Params.csp.childsrc " ") (delimit .Site.Params.csp.fontsrc " ") (delimit .Site.Params.csp.formaction " ") (delimit .Site.Params.csp.framesrc " ") (delimit .Site.Params.csp.imgsrc " ") (delimit .Site.Params.csp.objectsrc " ") (delimit .Site.Params.csp.stylesrc " ") (delimit .Site.Params.csp.scriptsrc " ") (delimit .Site.Params.csp.prefetchsrc " ") (delimit .Site.Params.csp.connectsrc " ") | safeHTML }} diff --git a/themes/hugo-coder/layouts/partials/float.html b/themes/hugo-coder/layouts/partials/float.html new file mode 100644 index 0000000..623047d --- /dev/null +++ b/themes/hugo-coder/layouts/partials/float.html @@ -0,0 +1,7 @@ +{{ if not .Site.Params.hideColorSchemeToggle }} +
+ + + +
+{{ end }} diff --git a/themes/hugo-coder/layouts/partials/footer.html b/themes/hugo-coder/layouts/partials/footer.html new file mode 100644 index 0000000..c184381 --- /dev/null +++ b/themes/hugo-coder/layouts/partials/footer.html @@ -0,0 +1,26 @@ +{{ if not .Site.Params.hideFooter | default false }} + +{{ end }} diff --git a/themes/hugo-coder/layouts/partials/header.html b/themes/hugo-coder/layouts/partials/header.html new file mode 100644 index 0000000..4b7924e --- /dev/null +++ b/themes/hugo-coder/layouts/partials/header.html @@ -0,0 +1,39 @@ + diff --git a/themes/hugo-coder/layouts/partials/home.html b/themes/hugo-coder/layouts/partials/home.html new file mode 100644 index 0000000..ff640dd --- /dev/null +++ b/themes/hugo-coder/layouts/partials/home.html @@ -0,0 +1,35 @@ +
+
+ {{ if and (isset .Site.Params "avatarurl") (not (isset .Site.Params "gravatar")) }} + {{ with .Site.Params.avatarURL }} +
avatar
+ {{ end }} + {{ end }} + {{ with .Site.Params.gravatar }} +
gravatar
+ {{ end }} +

{{ .Site.Params.author }}

+ {{ if reflect.IsSlice .Site.Params.info }} +

{{ range .Site.Params.info }}{{.}}
{{ end}}

+ {{ else }} +

{{ .Site.Params.info }}

+ {{ end }} + {{ with .Site.Params.social }} +
    + {{ range sort . "weight" }} + {{ if .icon }} +
  • + + + +
  • + {{ else }} +
  • + {{ .name }} +
  • + {{ end }} + {{ end }} +
+ {{ end }} +
+
diff --git a/themes/hugo-coder/layouts/partials/list.html b/themes/hugo-coder/layouts/partials/list.html new file mode 100644 index 0000000..243e1af --- /dev/null +++ b/themes/hugo-coder/layouts/partials/list.html @@ -0,0 +1,22 @@ +
+

+ + {{- if eq .Kind "term" -}} + {{- i18n .Data.Singular | title -}} + {{- print ": " -}} + {{- end -}} + + {{- i18n (lower .Title) | default .Title | title -}} + +

+ {{ .Content }} + + {{ partial "pagination.html" . }} +
diff --git a/themes/hugo-coder/layouts/partials/page.html b/themes/hugo-coder/layouts/partials/page.html new file mode 100644 index 0000000..656f2f1 --- /dev/null +++ b/themes/hugo-coder/layouts/partials/page.html @@ -0,0 +1,13 @@ +
+ +
diff --git a/themes/hugo-coder/layouts/partials/pagination.html b/themes/hugo-coder/layouts/partials/pagination.html new file mode 100644 index 0000000..1e004b8 --- /dev/null +++ b/themes/hugo-coder/layouts/partials/pagination.html @@ -0,0 +1,48 @@ +{{ $paginator := .Paginator }} +{{ $adjacent_links := 2 }} +{{ $max_links := (add (mul $adjacent_links 2) 1) }} +{{ $lower_limit := (add $adjacent_links 1) }} +{{ $upper_limit := (sub $paginator.TotalPages $adjacent_links) }} +{{ if gt $paginator.TotalPages 1 }} + +{{ end }} diff --git a/themes/hugo-coder/layouts/partials/posts/commento.html b/themes/hugo-coder/layouts/partials/posts/commento.html new file mode 100644 index 0000000..93a245e --- /dev/null +++ b/themes/hugo-coder/layouts/partials/posts/commento.html @@ -0,0 +1,4 @@ +{{- if and (isset .Site.Params "commentourl") (not (eq .Site.Params.commentoURL "" )) (eq (.Params.disableComments | default false) false) -}} +
+ +{{- end -}} diff --git a/themes/hugo-coder/layouts/partials/posts/disqus.html b/themes/hugo-coder/layouts/partials/posts/disqus.html new file mode 100644 index 0000000..b0ffb1f --- /dev/null +++ b/themes/hugo-coder/layouts/partials/posts/disqus.html @@ -0,0 +1,3 @@ +{{- if and (not (eq (.Site.DisqusShortname | default "") "")) (eq (.Params.disableComments | default false) false) -}} + {{ template "_internal/disqus.html" . }} +{{- end -}} diff --git a/themes/hugo-coder/layouts/partials/posts/math.html b/themes/hugo-coder/layouts/partials/posts/math.html new file mode 100644 index 0000000..bc39ce5 --- /dev/null +++ b/themes/hugo-coder/layouts/partials/posts/math.html @@ -0,0 +1,38 @@ +{{- if or (.Params.math) (.Site.Params.math) -}} + + {{/* The file is already minified */}} + + +{{- end -}} +{{- if or (.Params.katex) (.Site.Params.katex) -}} + + {{/* The loading of KaTeX is deferred to speed up page rendering */}} + + +{{- end -}} diff --git a/themes/hugo-coder/layouts/partials/posts/series.html b/themes/hugo-coder/layouts/partials/posts/series.html new file mode 100644 index 0000000..d08a83d --- /dev/null +++ b/themes/hugo-coder/layouts/partials/posts/series.html @@ -0,0 +1,29 @@ +{{ $currentPageUrl := .RelPermalink }} +{{ if .Params.series }} +
+ {{ range .Params.series }} + {{ $name := . | urlize }} + {{ $series := index $.Site.Taxonomies.series $name }} + {{ if gt (len $series.Pages) 1 }} +

+ {{ i18n "see_also" | default "See also in" }} {{ . }} + + + +

+ + {{ end }} + {{ end }} +
+{{ end }} diff --git a/themes/hugo-coder/layouts/partials/posts/utterances.html b/themes/hugo-coder/layouts/partials/posts/utterances.html new file mode 100644 index 0000000..0feea41 --- /dev/null +++ b/themes/hugo-coder/layouts/partials/posts/utterances.html @@ -0,0 +1,12 @@ +{{- if isset .Site.Params "utterances" -}} + {{- if and (isset .Site.Params.utterances "repo") (not (eq .Site.Params.utterances.repo "" )) (eq (.Params.disable_comments | default false) false) -}} + + {{- end -}} +{{- end -}} diff --git a/themes/hugo-coder/layouts/partials/taxonomy/authors.html b/themes/hugo-coder/layouts/partials/taxonomy/authors.html new file mode 100644 index 0000000..366d8d8 --- /dev/null +++ b/themes/hugo-coder/layouts/partials/taxonomy/authors.html @@ -0,0 +1,9 @@ +
+ + {{- range $index, $el := . -}} + {{- if gt $index 0 }} + + {{- end }} + {{ . }} + {{- end -}} +
\ No newline at end of file diff --git a/themes/hugo-coder/layouts/partials/taxonomy/categories.html b/themes/hugo-coder/layouts/partials/taxonomy/categories.html new file mode 100644 index 0000000..b592f4e --- /dev/null +++ b/themes/hugo-coder/layouts/partials/taxonomy/categories.html @@ -0,0 +1,9 @@ +
+ + {{- range $index, $el := . -}} + {{- if gt $index 0 }} + + {{- end }} + {{ . }} + {{- end -}} +
diff --git a/themes/hugo-coder/layouts/partials/taxonomy/tags.html b/themes/hugo-coder/layouts/partials/taxonomy/tags.html new file mode 100644 index 0000000..1be1ec0 --- /dev/null +++ b/themes/hugo-coder/layouts/partials/taxonomy/tags.html @@ -0,0 +1,11 @@ +
+ + {{- range $index, $el := . -}} + {{- if gt $index 0 }} + + {{- end }} + + {{ . }} + + {{- end -}} +
diff --git a/themes/hugo-coder/layouts/partials/terms.html b/themes/hugo-coder/layouts/partials/terms.html new file mode 100644 index 0000000..7d51e57 --- /dev/null +++ b/themes/hugo-coder/layouts/partials/terms.html @@ -0,0 +1,28 @@ +
+

+ + {{- if eq .Kind "term" -}} + {{- i18n .Data.Singular | title -}} + {{- print ": " -}} + {{- end -}} + + {{- i18n (lower .Title) | default .Title | title -}} + +

+ {{ .Content }} + +
diff --git a/themes/hugo-coder/layouts/posts/li.html b/themes/hugo-coder/layouts/posts/li.html new file mode 100644 index 0000000..dd58396 --- /dev/null +++ b/themes/hugo-coder/layouts/posts/li.html @@ -0,0 +1,4 @@ +
  • + {{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006" ) }} + {{ .Title }} +
  • diff --git a/themes/hugo-coder/layouts/posts/list.html b/themes/hugo-coder/layouts/posts/list.html new file mode 100644 index 0000000..8ed6850 --- /dev/null +++ b/themes/hugo-coder/layouts/posts/list.html @@ -0,0 +1,21 @@ +{{ define "title" }} + {{ title (i18n (lower .Title)) | default .Title }} · {{ .Site.Title }} +{{ end }} +{{ define "content" }} +
    +

    + + {{ title (i18n (lower .Title)) | default .Title }} + +

    + {{ .Content }} + + + {{ partial "pagination.html" . }} +
    +{{ end }} diff --git a/themes/hugo-coder/layouts/posts/single.html b/themes/hugo-coder/layouts/posts/single.html new file mode 100644 index 0000000..61f11f7 --- /dev/null +++ b/themes/hugo-coder/layouts/posts/single.html @@ -0,0 +1,52 @@ +{{ define "title" }} + {{ .Title }} · {{ .Site.Title }} +{{ end }} +{{ define "content" }} +
    +
    +
    +
    +

    + + {{ .Title }} + +

    +
    + +
    + +
    + {{ if .Params.featuredImage }} + Featured image + {{ end }} + {{ .Content }} +
    + + +
    + {{ partial "posts/series.html" . }} + {{ partial "posts/disqus.html" . }} + {{ partial "posts/commento.html" . }} + {{ partial "posts/utterances.html" . }} +
    +
    + + {{ partial "posts/math.html" . }} +
    +{{ end }} diff --git a/themes/hugo-coder/layouts/shortcodes/notice.html b/themes/hugo-coder/layouts/shortcodes/notice.html new file mode 100644 index 0000000..96685d5 --- /dev/null +++ b/themes/hugo-coder/layouts/shortcodes/notice.html @@ -0,0 +1,12 @@ +{{- $type := .Get 0 -}} +{{- $title := .Get 1 | default $type -}} +{{- $inner := .Inner | .Page.RenderString | chomp -}} +{{- $icon := dict "note" "fa-sticky-note" "tip" "fa-lightbulb-o" "example" "fa-file-text" "question" "fa-question" "info" "fa-exclamation-circle" "warning" "fa-exclamation-triangle" "error" "fa-times-circle" -}} +
    +
    + {{ i18n $title | default $title | humanize }} +
    +
    + {{- $inner -}} +
    +
    -- cgit v1.2.3