jekyll-theme-doodle 5.1.3 → 5.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 23ab2d2f12328ffbffef8be68643e39a26644df315116d8559a52b7cda6d8a0f
4
- data.tar.gz: 7af0b64ef6b2b95336e392b6504ad74f16480de4bf27c3749410f32e6dc7ca3a
3
+ metadata.gz: 8f5c2581eddb6a321216172bbf503c653b18d019f4e4a2b0276438ea6227fd04
4
+ data.tar.gz: 9ad7204f78346de6fddeac448dffbbbf21846050b0319ccdc3333ad6f1273a88
5
5
  SHA512:
6
- metadata.gz: bcd514ecfc9cb612dc3ff2f65e912491f832464040f5dbf9e51c5dfeedeb507f5fabe375c546139ecdd9d2479d0335ce379af58466c909ee95008553983e9d52
7
- data.tar.gz: a7ed5ccd68d3b9ac4adb9759c2ae09a028604ef3ddd572122d1c5e5d1b8ba1615e3ac3c7e85f883ca21e777a7d88466b8113b9a6c382162d89ae01a636af54f7
6
+ metadata.gz: 84638d5c2b5d6bcc318fefa451e80059e22a90f91e54009fae7fd3761d2441f2037ebd9221d1113f0438a922dd70de0f8d760e56fa8d5694fdec0f3983361099
7
+ data.tar.gz: 5f6244d395607cba0e4a6e0a4fa472ccadb2ff7584be36eba22fdacff38707acf524c5234f3af2d104f0d572352066ab2388778e5c31b6ab39186531642ed84a
data/_includes/head.html CHANGED
@@ -19,26 +19,27 @@
19
19
  {%- seo -%} <link rel="stylesheet" href=" {{ "/assets/main.css" | relative_url
20
20
  }} " >
21
21
  <script>
22
- const colors = {
23
- "dark-pink": "#f0b3e7",
24
- "dark-green": "#b1d18a",
25
- "dark-yellow": "#dbc66e",
26
- "dark-blue": "#aac7ff",
27
- "dark-cyan": "#81d5cd",
28
- "light-pink": "#f0b3e7",
29
- "light-green": "#b1d18a",
30
- "light-yellow": "#dbc66e",
31
- "light-blue": "#aac7ff",
32
- "light-cyan": "#81d5cd",
33
- };
34
- const root = document.querySelector("html");
35
- const theme = window.localStorage.getItem("theme");
36
- if (theme === null) {
37
- const theme = "dark-pink";
38
- window.localStorage.setItem("theme", theme);
39
- }
40
- root.className = theme;
41
- // root.style.setProperty("--current-color", colors[theme]);
22
+ (function () {
23
+ const colors = {
24
+ "dark-pink": "#f0b3e7",
25
+ "dark-green": "#b1d18a",
26
+ "dark-yellow": "#dbc66e",
27
+ "dark-blue": "#aac7ff",
28
+ "dark-cyan": "#81d5cd",
29
+ "light-pink": "#f0b3e7",
30
+ "light-green": "#b1d18a",
31
+ "light-yellow": "#dbc66e",
32
+ "light-blue": "#aac7ff",
33
+ "light-cyan": "#81d5cd",
34
+ };
35
+ const root = document.querySelector("html");
36
+ const theme = window.localStorage.getItem("theme");
37
+ if (theme === null || !(theme in colors)) {
38
+ const theme = "dark-pink";
39
+ window.localStorage.setItem("theme", theme);
40
+ }
41
+ root.className = theme;
42
+ })();
42
43
  </script>
43
44
  <script src="/assets/theme-assets/js/theme.js" defer></script>
44
45
  {%- feed_meta -%} {%- if jekyll.environment == 'production' and
@@ -2,6 +2,7 @@
2
2
  const themeSelector = document.getElementById("themeSelector");
3
3
  const themeOptions = document.getElementById("themeOptions");
4
4
  const root = document.querySelector("html");
5
+ const theme = root.className;
5
6
 
6
7
  function clickHandler(color) {
7
8
  return (event) => {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-doodle
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.3
4
+ version: 5.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gul Noor