1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-18 22:15:32 -04:00

*actually* fix utteranc.es dark/light theme-ing

This commit is contained in:
2020-04-26 15:07:35 -04:00
parent 6360e58f60
commit c3f46dd9db
7 changed files with 61 additions and 47 deletions

View File

@@ -10,7 +10,6 @@
{{ block "main" . }}{{ end }}
</div>
{{ partialCached "page/footer" . }}
{{ partial "scripts/_bundle" . }}
{{ partial "scripts/shortcodes" . }}
{{ if eq hugo.Environment "production" }}
{{ partialCached "scripts/simple_analytics" . }}

View File

@@ -12,9 +12,7 @@
</div>
{{ if and (ne .Params.comments false) (eq hugo.Environment "production") }}
<div id="comments">
{{ partial "scripts/utterances" . }}
</div>
<div id="comments"></div>
{{ end }}
</article>
</main>

View File

@@ -8,4 +8,5 @@
{{ partialCached "head/feeds" . -}}
{{ partialCached "head/webmention" . -}}
{{ partial "head/canonical" . -}}
{{ partial "scripts/_bundle" . }}
{{ partial "head/schema" . -}}

View File

@@ -1,5 +1,5 @@
{{ $darkmode := resources.Get "js/dark-mode.js" }}
{{ $darkmode := resources.Get "js/dark-mode.js" | resources.ExecuteAsTemplate "vendor/emoji/dark-mode.js" . }}
{{ $twemoji := resources.Get "vendor/emoji/emoji.js" | resources.ExecuteAsTemplate "vendor/emoji/emoji.min.js" . }}
{{ $js := slice $darkmode $twemoji | resources.Concat "/js/main.js" | resources.Minify | resources.Fingerprint "sha256" }}
<script src="{{ $js.Permalink }}" integrity="{{ $js.Data.Integrity }}"></script>
<script defer src="{{ $js.Permalink }}" integrity="{{ $js.Data.Integrity }}"></script>

View File

@@ -1,7 +0,0 @@
<script async defer
src="https://utteranc.es/client.js"
data-repo="{{ .Site.Params.github }}"
data-issue-term="og:title"
data-label="comments"
data-theme="github-light"
crossorigin></script>