From 8dad1d1bd0bc7206f16323d220fdce73c400f470 Mon Sep 17 00:00:00 2001 From: Dimitar Trendafilov Date: Tue, 18 Aug 2020 15:18:25 +0300 Subject: Squashed 'website/themes/hugo-clarity/' content from commit 4969d5a git-subtree-dir: website/themes/hugo-clarity git-subtree-split: 4969d5a1fb2c358c00e2d7f6fc1e39024d7d2355 --- layouts/_default/baseof.html | 76 ++++++++++++++++++++++++++++++++++++++++++++ layouts/_default/list.html | 3 ++ layouts/_default/single.html | 26 +++++++++++++++ 3 files changed, 105 insertions(+) create mode 100644 layouts/_default/baseof.html create mode 100644 layouts/_default/list.html create mode 100644 layouts/_default/single.html (limited to 'layouts/_default') diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..18f14e6 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,76 @@ + + + + {{- partial "head" . }} + + {{- $options := (dict "targetPath" "css/styles.css" "outputStyle" "compressed" "enableSourceMap" "true") -}} + {{ $mainSassFile := "sass/main.sass" }} + {{- $styles := resources.Get $mainSassFile | resources.ExecuteAsTemplate $mainSassFile . | resources.ToCSS $options | resources.Fingerprint "sha512" }} + + + {{- $highlightPath := "js/highlight.js" }} + {{- $highlight := resources.Get $highlightPath | resources.ExecuteAsTemplate $highlightPath . }} + + {{- $functionsScriptPath := "js/functions.js" }} + {{- $functions := resources.Get $functionsScriptPath | resources.ExecuteAsTemplate $functionsScriptPath . }} + + {{- $codeScriptPath := "js/code.js" }} + {{- $code := resources.Get $codeScriptPath | resources.ExecuteAsTemplate $codeScriptPath . }} + + {{- $customScriptPath := "js/custom.js" }} + {{- $custom := resources.Get $customScriptPath | resources.ExecuteAsTemplate $customScriptPath . }} + + {{- $mainScriptPath := "js/index.js" }} + {{- $main := resources.Get $mainScriptPath | resources.ExecuteAsTemplate $mainScriptPath . }} + + {{- $bundle := slice $highlight $functions $code $main $custom | resources.Concat "js/bundle.js" | resources.Fingerprint "sha512" -}} + + + + + + + + {{- with .Site.Params.customCSS }} + {{- range . -}} + + {{- end }} + {{- end }} + + + {{- $maxCodeLines := 100 }} + {{- $params := .Site.Params }} + {{- with $params.codeMaxLines }} + {{- $maxCodeLines = . }} + {{- end }} + {{- with .Params.codeMaxLines }} + {{- $maxCodeLines = . }} + {{- end }} + {{- $codeLineNumbers := false }} + {{ with $params.codeLineNumbers }} + {{- $codeLineNumbers = . }} + {{ end }} + {{ with .Params.codeLineNumbers }} + {{- $codeLineNumbers = . }} + {{ else }} + {{ if eq .Params.codeLineNumbers false }} + {{- $codeLineNumbers = false }} + {{ end }} + {{ end }} + + {{- partial "nav" . }} +
+ {{- block "main" . }}{{ end }} +
+ {{- partial "icons" }} + {{- partial "footer" . }} + + {{- with .Site.Params.customJS }} + {{- range . -}} + + {{- end }} + {{- end }} + + diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..35a8ba8 --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,3 @@ +{{ define "main" }} + {{- partial "archive" . }} +{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..1749a4e --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,26 @@ +{{- define "main" }} +{{- $scratch := newScratch }} +{{- if isset .Params "image" }} + {{- $scratch.Set "image" .Params.image }} +{{- else }} + {{ $scratch.Set "image" .Site.Params.fallBackOgImage }} +{{- end }} +{{- $image := $scratch.Get "image" }} +{{- $bg := (path.Join "images" $image | absLangURL) }} +
+
+

{{ .Title }}

+ {{- partial "post-meta" . }} + {{ partial "share" . }} + {{ with .Params.featureImage }} + + {{ end }} + {{ if .Params.toc }} +

Overview

+ {{ .TableOfContents }} + {{ end }} + {{- .Content }} +
+ {{- partial "sidebar" . }} +
+{{- end }} -- cgit v1.3.1-26-gb76a