From 9ccf652c00457e46eaf46fc4cb8f6d0ee582c5ef Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Fri, 1 Oct 2021 14:32:43 +0200 Subject: Initial commit --- themes/hugo-whisper-theme/layouts/404.html | 13 ++++ .../layouts/_default/baseof.html | 71 ++++++++++++++++++++++ .../hugo-whisper-theme/layouts/_default/list.html | 17 ++++++ .../layouts/_default/single.html | 11 ++++ .../layouts/_default/summary.html | 7 +++ themes/hugo-whisper-theme/layouts/index.html | 59 ++++++++++++++++++ .../layouts/partials/hamburger.html | 5 ++ .../layouts/partials/header.html | 12 ++++ .../layouts/partials/main-menu-mobile.html | 12 ++++ .../layouts/partials/main-menu.html | 12 ++++ .../layouts/partials/sidebar.html | 11 ++++ .../layouts/partials/sub-footer.html | 13 ++++ 12 files changed, 243 insertions(+) create mode 100644 themes/hugo-whisper-theme/layouts/404.html create mode 100644 themes/hugo-whisper-theme/layouts/_default/baseof.html create mode 100644 themes/hugo-whisper-theme/layouts/_default/list.html create mode 100644 themes/hugo-whisper-theme/layouts/_default/single.html create mode 100644 themes/hugo-whisper-theme/layouts/_default/summary.html create mode 100644 themes/hugo-whisper-theme/layouts/index.html create mode 100644 themes/hugo-whisper-theme/layouts/partials/hamburger.html create mode 100644 themes/hugo-whisper-theme/layouts/partials/header.html create mode 100644 themes/hugo-whisper-theme/layouts/partials/main-menu-mobile.html create mode 100644 themes/hugo-whisper-theme/layouts/partials/main-menu.html create mode 100644 themes/hugo-whisper-theme/layouts/partials/sidebar.html create mode 100644 themes/hugo-whisper-theme/layouts/partials/sub-footer.html (limited to 'themes/hugo-whisper-theme/layouts') diff --git a/themes/hugo-whisper-theme/layouts/404.html b/themes/hugo-whisper-theme/layouts/404.html new file mode 100644 index 0000000..b8d4c59 --- /dev/null +++ b/themes/hugo-whisper-theme/layouts/404.html @@ -0,0 +1,13 @@ +{{ define "header_css" }}{{ end }} +{{ define "body_classes" }}{{ end }} +{{ define "header_classes" }}{{ end }} + +{{ define "main" }} +
+
+
+

404 Page Not Found

+
+
+
+{{ end }} \ No newline at end of file diff --git a/themes/hugo-whisper-theme/layouts/_default/baseof.html b/themes/hugo-whisper-theme/layouts/_default/baseof.html new file mode 100644 index 0000000..650a098 --- /dev/null +++ b/themes/hugo-whisper-theme/layouts/_default/baseof.html @@ -0,0 +1,71 @@ + + + + + + + {{ block "title" . }}{{ .Title }} - {{ .Site.Title }}{{ end }} + + {{ block "meta_tags" . }}{{end}} + + + {{ if .Site.IsServer }} + {{ $style := resources.Get "scss/style.scss" | toCSS (dict "targetPath" "css/style.css" "enableSourceMap" true) }} + + {{ else }} + {{ $style := resources.Get "scss/style.scss" | toCSS (dict "targetPath" "css/style.css" "enableSourceMap" false) }} + + {{ end }} + + {{ block "header_css" . }}{{ end }} + + + + + {{ partial "main-menu-mobile.html" . }} +
+ {{ partial "header.html" . }} + + {{ $displaySidebar := false }} + {{ range .Site.Params.mainSections }} + {{ if eq $.Section . }} + {{ $displaySidebar = true }} + {{ end }} + {{ end }} + + {{ if $displaySidebar }} +
+
+
+ +
+
+ {{ block "main" . }} + {{ end }} +
+
+
+ {{ else }} + {{ block "main" . }} + {{ end }} + {{ end}} +
+ + {{ partial "sub-footer.html" . }} + + {{ $scripts := resources.Get "js/scripts.js" }} + + {{ block "footer_js" . }} + {{ end }} + + {{ if .Site.IsServer }} + + {{ else }} + + {{ end }} + + + + diff --git a/themes/hugo-whisper-theme/layouts/_default/list.html b/themes/hugo-whisper-theme/layouts/_default/list.html new file mode 100644 index 0000000..180e5ad --- /dev/null +++ b/themes/hugo-whisper-theme/layouts/_default/list.html @@ -0,0 +1,17 @@ +{{ define "header_css" }}{{ end }} +{{ define "body_classes" }}page-default-list{{ end }} +{{ define "header_classes" }}{{ end }} + +{{ define "main" }} + +Overview +

{{ .Title }}

+
+ {{ .Content }} +
+ +{{ range.Pages }} +{{ .Render "summary" }} +{{ end }} + +{{ end }} \ No newline at end of file diff --git a/themes/hugo-whisper-theme/layouts/_default/single.html b/themes/hugo-whisper-theme/layouts/_default/single.html new file mode 100644 index 0000000..67d1129 --- /dev/null +++ b/themes/hugo-whisper-theme/layouts/_default/single.html @@ -0,0 +1,11 @@ +{{ define "header_css" }}{{ end }} +{{ define "body_classes" }}page-default-single{{ end }} +{{ define "header_classes" }}{{ end }} + +{{ define "main" }} +

{{.Title}}

+
+ {{.Content}} +
+ +{{ end }} \ No newline at end of file diff --git a/themes/hugo-whisper-theme/layouts/_default/summary.html b/themes/hugo-whisper-theme/layouts/_default/summary.html new file mode 100644 index 0000000..1231103 --- /dev/null +++ b/themes/hugo-whisper-theme/layouts/_default/summary.html @@ -0,0 +1,7 @@ +
+ {{ if .Params.image }} + {{ .Title }} + {{ end}} +

{{ .Title }}

+

{{ .Summary }}

+
diff --git a/themes/hugo-whisper-theme/layouts/index.html b/themes/hugo-whisper-theme/layouts/index.html new file mode 100644 index 0000000..8730992 --- /dev/null +++ b/themes/hugo-whisper-theme/layouts/index.html @@ -0,0 +1,59 @@ +{{ define "title" }}{{ .Site.Title }}{{ end}} +{{ define "header_css" }}{{ end }} +{{ define "body_classes" }}page-home{{ end }} +{{ define "header_classes" }}{{ end }} + +{{ define "meta_tags" }} + + + + + + + + + +{{ end }} + +{{ define "main" }} +
+
+
+
+

{{ .Title | default .Site.Title }}

+
+ {{ if .Content }} + {{ .Content }} + {{ else }} +

{{ .Site.Params.homepage_intro }}

+ {{ end }} +
+ + {{ .Site.Params.homepage_button_text }} + +
+
+
+
+ +{{ if .Site.Params.homepage_image }} +
+
+
+
+
+ +
+{{ if .Site.Params.homepage_creds }} +

{{ .Site.Params.homepage_creds | safeHTML}} +{{ end }} +

+
+
+
+{{ end }} + +{{ end }} + +{{ define "footer_js" }} +{{ end }} diff --git a/themes/hugo-whisper-theme/layouts/partials/hamburger.html b/themes/hugo-whisper-theme/layouts/partials/hamburger.html new file mode 100644 index 0000000..a6d7de9 --- /dev/null +++ b/themes/hugo-whisper-theme/layouts/partials/hamburger.html @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/themes/hugo-whisper-theme/layouts/partials/header.html b/themes/hugo-whisper-theme/layouts/partials/header.html new file mode 100644 index 0000000..5f2c1f3 --- /dev/null +++ b/themes/hugo-whisper-theme/layouts/partials/header.html @@ -0,0 +1,12 @@ +
+
+ +
+ Logo +
+ {{ partial "main-menu.html" . }} + {{ partial "hamburger.html" . }} +
+
diff --git a/themes/hugo-whisper-theme/layouts/partials/main-menu-mobile.html b/themes/hugo-whisper-theme/layouts/partials/main-menu-mobile.html new file mode 100644 index 0000000..5211ea7 --- /dev/null +++ b/themes/hugo-whisper-theme/layouts/partials/main-menu-mobile.html @@ -0,0 +1,12 @@ + \ No newline at end of file diff --git a/themes/hugo-whisper-theme/layouts/partials/main-menu.html b/themes/hugo-whisper-theme/layouts/partials/main-menu.html new file mode 100644 index 0000000..7ea303c --- /dev/null +++ b/themes/hugo-whisper-theme/layouts/partials/main-menu.html @@ -0,0 +1,12 @@ + \ No newline at end of file diff --git a/themes/hugo-whisper-theme/layouts/partials/sidebar.html b/themes/hugo-whisper-theme/layouts/partials/sidebar.html new file mode 100644 index 0000000..dd1404d --- /dev/null +++ b/themes/hugo-whisper-theme/layouts/partials/sidebar.html @@ -0,0 +1,11 @@ +{{$currentNode := .}} +
+

{{ .Section | humanize }}

+ +
diff --git a/themes/hugo-whisper-theme/layouts/partials/sub-footer.html b/themes/hugo-whisper-theme/layouts/partials/sub-footer.html new file mode 100644 index 0000000..b9c51a9 --- /dev/null +++ b/themes/hugo-whisper-theme/layouts/partials/sub-footer.html @@ -0,0 +1,13 @@ + -- cgit v1.2.3