Website Summary Files Commits Branches @commit @diff @stats
path: root / layouts / _default / baseof.html
diff options
context:
space:
mode:
Commit8dad1d1bd0bc7206f16323d220fdce73c400f470 (patch)
Author
 Dimitar Trendafilov <trendafilov.dn@gmail.com>
2020-08-18 15:18:25 +0300
Committer
 Dimitar Trendafilov <trendafilov.dn@gmail.com>
2020-08-18 15:18:25 +0300
Files1dd6b123977afd3e391f39e2bef68f7daa0cbecb /layouts/_default/baseof.html
IPL-8dad1d1bd0bc7206f16323d220fdce73c400f470.tar
IPL-8dad1d1bd0bc7206f16323d220fdce73c400f470.tar.gz
IPL-8dad1d1bd0bc7206f16323d220fdce73c400f470.zip
Squashed 'website/themes/hugo-clarity/' content from commit 4969d5a
git-subtree-dir: website/themes/hugo-clarity git-subtree-split: 4969d5a1fb2c358c00e2d7f6fc1e39024d7d2355
1 files changed, 76 insertions, 0 deletions
-rw-r--r--layouts/_default/baseof.html76
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 @@
+<!DOCTYPE html>
+<html lang="{{ .Lang }}" data-figures="{{ .Params.figurePositionShow }}"{{ if .IsPage }} class="page"{{ end }}>
+ <head>
+ {{- partial "head" . }}
+ <!-- styles definition-->
+ {{- $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" }}
+
+ <!-- scripts definition -->
+ {{- $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" -}}
+
+ <!-- preload assets declaration -->
+ <link rel="preload" href="{{ $styles.Permalink }}" integrity = "{{ $styles.Data.Integrity }}" as="style" crossorigin="anonymous">
+ <link rel="preload" href="{{ $bundle.Permalink }}" as="script" integrity=
+ "{{ $bundle.Data.Integrity }}" crossorigin="anonymous">
+
+ <!-- styles file -->
+ <link rel="stylesheet" type="text/css" href="{{ $styles.Permalink }}" integrity="{{ $styles.Data.Integrity }}" crossorigin="anonymous">
+ {{- with .Site.Params.customCSS }}
+ {{- range . -}}
+ <link rel="stylesheet" href="{{ . | relURL }}">
+ {{- end }}
+ {{- end }}
+
+ </head>
+ {{- $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 }}
+ <body data-code="{{ $maxCodeLines }}" data-lines="{{ $codeLineNumbers }}" id="documentTop">
+ {{- partial "nav" . }}
+ <main>
+ {{- block "main" . }}{{ end }}
+ </main>
+ {{- partial "icons" }}
+ {{- partial "footer" . }}
+ <script type="text/javascript" src = "{{ $bundle.Permalink }}" integrity=
+ "{{ $bundle.Data.Integrity }}" crossorigin="anonymous"></script>
+ {{- with .Site.Params.customJS }}
+ {{- range . -}}
+ <script type="text/javascript" src="{{ . | relURL }}" ></script>
+ {{- end }}
+ {{- end }}
+ </body>
+</html>