diff options
author | Zach Berwaldt <zberwaldt@tutamail.com> | 2023-10-09 13:41:04 -0400 |
---|---|---|
committer | Zach Berwaldt <zberwaldt@tutamail.com> | 2023-10-09 13:48:07 -0400 |
commit | 4e30ae95eaf52a7f427bdf020d118f40e00ab291 (patch) | |
tree | a270827b339c8c40274b41fabedcb0ec3b4afb3b /layouts | |
parent | 93a4ba55f2159e69aa1fcdaa1cf87c09e7455017 (diff) |
add some homemade svg, wpartials, and darkmode
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/baseof.html | 2 | ||||
-rw-r--r-- | layouts/partials/func/GetSvg.html | 5 | ||||
-rw-r--r-- | layouts/partials/head.html | 4 | ||||
-rw-r--r-- | layouts/partials/scripts.html | 3 | ||||
-rw-r--r-- | layouts/partials/site-actions.html | 12 |
5 files changed, 22 insertions, 4 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index bb27232..cceaa25 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html | |||
@@ -2,7 +2,7 @@ | |||
2 | <html lang="en" data-theme="dark"> | 2 | <html lang="en" data-theme="dark"> |
3 | {{- partial "head.html" . -}} | 3 | {{- partial "head.html" . -}} |
4 | <body> | 4 | <body> |
5 | <button id="fullscreen">Fullscreen</button> | 5 | {{- partial "site-actions" . -}} |
6 | {{- partial "header.html" . -}} | 6 | {{- partial "header.html" . -}} |
7 | <div | 7 | <div |
8 | class='container' | 8 | class='container' |
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 | ||