aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials
diff options
context:
space:
mode:
authorZach Berwaldt <zberwaldt@tutamail.com>2023-10-09 13:41:04 -0400
committerZach Berwaldt <zberwaldt@tutamail.com>2023-10-09 13:48:07 -0400
commit4e30ae95eaf52a7f427bdf020d118f40e00ab291 (patch)
treea270827b339c8c40274b41fabedcb0ec3b4afb3b /layouts/partials
parent93a4ba55f2159e69aa1fcdaa1cf87c09e7455017 (diff)
add some homemade svg, wpartials, and darkmode
Diffstat (limited to 'layouts/partials')
-rw-r--r--layouts/partials/func/GetSvg.html5
-rw-r--r--layouts/partials/head.html4
-rw-r--r--layouts/partials/scripts.html3
-rw-r--r--layouts/partials/site-actions.html12
4 files changed, 21 insertions, 3 deletions
diff --git a/layouts/partials/func/GetSvg.html b/layouts/partials/func/GetSvg.html
new file mode 100644
index 0000000..bff1fd1
--- /dev/null
+++ b/layouts/partials/func/GetSvg.html
@@ -0,0 +1,5 @@
1{{ $resource := dict }}
2{{ with resources.Get . | minify }}
3 {{ $resource = .Content | safeHTML }}
4{{ end }}
5{{ return $resource }} \ No newline at end of file
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 2106ef3..d7b2381 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -1,8 +1,8 @@
1<head> 1<head>
2 <title>{{ .Title }}</title> 2 <title>{{ .Title }}</title>
3 <!-- {{ with resources.Get "css/pico.min.css" }} 3 {{ with resources.Get "css/pico.min.css" }}
4 <link rel="stylesheet" href="{{ .RelPermalink }}"> 4 <link rel="stylesheet" href="{{ .RelPermalink }}">
5 {{ end }} --> 5 {{ end }}
6 {{ with resources.Get "css/main.css" }} 6 {{ with resources.Get "css/main.css" }}
7 <link rel="stylesheet" href="{{ .RelPermalink }}"> 7 <link rel="stylesheet" href="{{ .RelPermalink }}">
8 {{ end }} 8 {{ end }}
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html
index 152c32b..f7c95bd 100644
--- a/layouts/partials/scripts.html
+++ b/layouts/partials/scripts.html
@@ -1,4 +1,5 @@
1{{ $scripts := resources.Match "js/*.js" }} 1{{ $scripts := resources.Match "js/*.js" }}
2{{ range $script := $scripts }} 2{{ range $script := $scripts }}
3 {{ $script := $script | minify | fingerprint }}
3 <script src="{{ $script.RelPermalink }}" defer></script> 4 <script src="{{ $script.RelPermalink }}" defer></script>
4{{ end }} \ No newline at end of file 5{{ end }}
diff --git a/layouts/partials/site-actions.html b/layouts/partials/site-actions.html
new file mode 100644
index 0000000..b9afa66
--- /dev/null
+++ b/layouts/partials/site-actions.html
@@ -0,0 +1,12 @@
1<div id="actions" class="fixed flex row aligned right">
2 <button id="darkmode">Dark Mode</button>
3 <button id="fullscreen" class="flex row centered" title="fullscreen toggle">
4 <div class="icon" id="fullscreen-icon">
5 {{ partial "func/GetSvg" "Fullscreen.svg" }}
6 </div>
7 <div class="icon hide" id="smallscreen-icon">
8 {{ partial "func/GetSvg" "Smallscreen.svg" }}
9 </div>
10 or [/]
11 </button>
12</div> \ No newline at end of file