summaryrefslogtreecommitdiff
path: root/themes/hugo-whisper-theme/layouts/partials
diff options
context:
space:
mode:
Diffstat (limited to 'themes/hugo-whisper-theme/layouts/partials')
-rw-r--r--themes/hugo-whisper-theme/layouts/partials/google-analytics.html26
-rw-r--r--themes/hugo-whisper-theme/layouts/partials/hamburger.html5
-rw-r--r--themes/hugo-whisper-theme/layouts/partials/header.html12
-rw-r--r--themes/hugo-whisper-theme/layouts/partials/main-menu-mobile.html12
-rw-r--r--themes/hugo-whisper-theme/layouts/partials/main-menu.html12
-rw-r--r--themes/hugo-whisper-theme/layouts/partials/sidebar.html11
-rw-r--r--themes/hugo-whisper-theme/layouts/partials/sub-footer.html13
7 files changed, 91 insertions, 0 deletions
diff --git a/themes/hugo-whisper-theme/layouts/partials/google-analytics.html b/themes/hugo-whisper-theme/layouts/partials/google-analytics.html
new file mode 100644
index 0000000..63c84ab
--- /dev/null
+++ b/themes/hugo-whisper-theme/layouts/partials/google-analytics.html
@@ -0,0 +1,26 @@
+{{- if .Site.IsServer -}}
+ <!-- Dont add Google analytics to localhost -->
+{{ else }}
+ {{ $gid := (getenv "HUGO_GOOGLE_ANALYTICS_ID") }}
+ {{ if $gid }}
+ <!-- Global site tag (gtag.js) - Google Analytics -->
+ <script async src="https://www.googletagmanager.com/gtag/js?id={{- $gid -}}"></script>
+ <script>
+ window.dataLayer = window.dataLayer || [];
+ function gtag(){dataLayer.push(arguments);}
+ gtag('js', new Date());
+ gtag('config', '{{- $gid -}}');
+ </script>
+ {{ else }}
+ {{ if .Site.Params.google_analytics_id }}
+ <!-- Global site tag (gtag.js) - Google Analytics -->
+ <script async src="https://www.googletagmanager.com/gtag/js?id={{- .Site.Params.google_analytics_id -}}"></script>
+ <script>
+ window.dataLayer = window.dataLayer || [];
+ function gtag(){dataLayer.push(arguments);}
+ gtag('js', new Date());
+ gtag('config', '{{- .Site.Params.google_analytics_id -}}');
+ </script>
+ {{ end }}
+ {{ end}}
+{{ end }} \ No newline at end of file
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 @@
+<button id="toggle-main-menu-mobile" class="hamburger hamburger--slider" type="button">
+ <span class="hamburger-box">
+ <span class="hamburger-inner"></span>
+ </span>
+</button> \ 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 @@
+<div class='header'>
+ <div class="container">
+ <div class="logo">
+ <a href="{{ .Site.BaseURL }}"><img alt="Logo" src="{{ .Site.Params.logo.standard | relURL }}" /></a>
+ </div>
+ <div class="logo-mobile">
+ <a href="{{ .Site.BaseURL }}"><img alt="Logo" src="{{ .Site.Params.logo.mobile | relURL }}" /></a>
+ </div>
+ {{ partial "main-menu.html" . }}
+ {{ partial "hamburger.html" . }}
+ </div>
+</div>
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 @@
+<div id="main-menu-mobile" class="main-menu-mobile">
+ <ul>
+ {{ $currentPage := . }}
+ {{ range .Site.Menus.main }}
+ <li class="menu-item-{{ .Name | lower }}{{ if $currentPage.IsMenuCurrent "main" . }} active{{ end }}">
+ <a href="{{ .URL }}">
+ <span>{{ .Name }}</span>
+ </a>
+ </li>
+ {{end}}
+ </ul>
+</div> \ 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 @@
+<div id="main-menu" class="main-menu">
+ <ul>
+ {{ $currentPage := . }}
+ {{ range .Site.Menus.main }}
+ <li class="menu-item-{{ .Name | lower }}{{ if $currentPage.IsMenuCurrent "main" . }} active{{ end }}">
+ <a href="{{ .URL }}">
+ <span>{{ .Name }}</span>
+ </a>
+ </li>
+ {{end}}
+ </ul>
+</div> \ 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 := .}}
+<div class="docs-menu">
+ <h4>{{ .Section | humanize }}</h4>
+ <ul>
+ {{ range where .Site.RegularPages "Section" .Section }}
+ <li class="{{ if eq .File.UniqueID $currentNode.File.UniqueID }}active {{ end }}">
+ <a href="{{ .Permalink }}">{{ .Title }}</a>
+ </li>
+ {{ end }}
+ </ul>
+</div>
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..99cf2d0
--- /dev/null
+++ b/themes/hugo-whisper-theme/layouts/partials/sub-footer.html
@@ -0,0 +1,13 @@
+<div class="sub-footer">
+ <div class="container">
+ <div class="row">
+ <div class="col-12">
+ <div class="sub-footer-inner">
+ <ul>
+ <li class="zerostatic"><a href="https://www.zerostatic.io">www.zerostatic.io</a></li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>