feat[dark]: Fixed dark-mode selector

I corrected the dark-mode selector so that it appears on each page.

I also corrected the ugly tag boxes.
This commit is contained in:
Judah Sotomayor 2023-11-13 19:49:36 -05:00
parent 3c62bce75c
commit 3a64fb5f38
Signed by: judahsotomayor
SSH Key Fingerprint: SHA256:9Dq4ppxhfAjbX+7HLXEt+ROMiIojI6kqQgUyFUJb9lI
6 changed files with 5 additions and 23 deletions

View File

@ -15,9 +15,9 @@
<!-- The part of the page that begins to differ between templates -->
{{ end }}
<script src="/js/dark.js"></script>
{{ block "footer" . }}
<!-- More shared code, perhaps a footer but that can be overridden if need be in -->
<script src="/js/dark.js" defer="" ></script>
<script type="text/javascript"
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">

View File

@ -10,4 +10,5 @@
<h3><a href="{{ .Site.BaseURL }}categories">Back to all categories</a></h3>
</div>
<script src="/js/dark.js"></script>
{{ end }}

View File

@ -1,15 +0,0 @@
{{/* layouts/_default/index.json */}}
{{- $index := slice -}}
{{- range where .Site.RegularPages.ByDate.Reverse "Type" "not in" (slice "page" "json") -}}
{{ if .Params.dateCreated }}
{{ $.Scratch.Set "date" (.Params.dateCreated) }}
{{ else }}
{{- if isset site.Params "date_format" -}}
{{- $.Scratch.Set "date" (.Date.Format site.Params.date_format) -}}
{{- else -}}
{{- $.Scratch.Set "date" (.Date.Format "2006-01-02") -}}
{{- end -}}
{{ end }}
{{- $index = $index | append (dict "title" ( .Title | plainify ) "permalink" .Permalink "section" (i18n (.Section | title)) "tags" (apply .Params.tags "i18n" "." ) "categories" (apply .Params.categories "i18n" "." ) "summary" (.Params.summary | markdownify | htmlUnescape | plainify) "date" ($.Scratch.Get "date") ) -}}
{{- end -}}
{{- $index | jsonify -}}

View File

@ -43,6 +43,7 @@
<h3><a href="posts/">View all posts</a></h3>
<h3><a href="categories/"> View all categories</a></h3>
<h3><a href="tags/"> View all tags</a></h3>
<script src="/js/dark.js"></script>
</div>
</body>

View File

@ -1,5 +1,4 @@
<footer>
<div>
<h3><a href="{{ .Site.BaseURL }}posts">Back to all posts</a></h3>
</div>
@ -9,5 +8,4 @@
{{partial "tags.html" .}}
{{partial "categories.html" .}}
<script src="/js/dark.js" defer="" ></script>
</footer>

View File

@ -51,9 +51,6 @@ white-space: pre-wrap;
.taglist {
border: solid;
border-weight: 2pt;
padding: 4pt;
}