mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-10-29 00:15:47 -04:00
wrap dark mode stuff in an anonymous function like a big boy coder
This commit is contained in:
@@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
// inspired by https://codepen.io/kevinpowell/pen/EMdjOV
|
// inspired by https://codepen.io/kevinpowell/pen/EMdjOV
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
// lightbulb toggle re-appears now that we know user has JS enabled
|
// lightbulb toggle re-appears now that we know user has JS enabled
|
||||||
const toggle = document.querySelector('button#dark-mode-toggle');
|
const toggle = document.querySelector('button#dark-mode-toggle');
|
||||||
toggle.style.visibility = 'visible';
|
toggle.style.visibility = 'visible';
|
||||||
@@ -98,3 +101,4 @@ toggle.addEventListener('click', function() {
|
|||||||
localStorage.setItem('dark_mode_pref', 'false');
|
localStorage.setItem('dark_mode_pref', 'false');
|
||||||
}
|
}
|
||||||
}, true);
|
}, true);
|
||||||
|
})();
|
||||||
|
|||||||
6
assets/vendor/emoji/emoji.js
vendored
6
assets/vendor/emoji/emoji.js
vendored
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var emoji = (function (
|
(function (
|
||||||
|
|
||||||
// WARNING: this file is generated automatically via
|
// WARNING: this file is generated automatically via
|
||||||
// `node scripts/build.js`
|
// `node scripts/build.js`
|
||||||
@@ -570,6 +570,4 @@ var emoji = (function (
|
|||||||
return r.join(sep || '-');
|
return r.join(sep || '-');
|
||||||
}
|
}
|
||||||
|
|
||||||
}());
|
}()).parse(document.body);
|
||||||
|
|
||||||
emoji.parse(document.body);
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
{{ block "main" . }}{{ end }}
|
{{ block "main" . }}{{ end }}
|
||||||
</div>
|
</div>
|
||||||
{{ partialCached "page/footer" . }}
|
{{ partialCached "page/footer" . }}
|
||||||
|
{{ partial "scripts/_bundle" . }}
|
||||||
{{ partial "scripts/shortcodes" . }}
|
{{ partial "scripts/shortcodes" . }}
|
||||||
{{ if eq hugo.Environment "production" }}
|
{{ if eq hugo.Environment "production" }}
|
||||||
{{ partialCached "scripts/simple_analytics" . }}
|
{{ partialCached "scripts/simple_analytics" . }}
|
||||||
|
|||||||
@@ -8,5 +8,4 @@
|
|||||||
{{ partialCached "head/feeds" . -}}
|
{{ partialCached "head/feeds" . -}}
|
||||||
{{ partialCached "head/webmention" . -}}
|
{{ partialCached "head/webmention" . -}}
|
||||||
{{ partial "head/canonical" . -}}
|
{{ partial "head/canonical" . -}}
|
||||||
{{ partial "scripts/_bundle" . }}
|
|
||||||
{{ partial "head/schema" . -}}
|
{{ partial "head/schema" . -}}
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
<script async defer src="https://s.jarv.is/app.js" data-skip-dnt="true"></script>
|
<script async defer src="https://s.jarv.is/latest.js" data-skip-dnt="true"></script>
|
||||||
<noscript><img src="https://s.jarv.is/image.gif" alt=""></noscript>
|
<noscript><img src="https://s.jarv.is/image.gif" alt=""></noscript>
|
||||||
|
|||||||
Reference in New Issue
Block a user