jekyll-theme-doodle 5.1.2 → 5.1.5

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: 5c2e8925677961dab657cef28643b06ae41cfa9c8d2e5263e5d4b01d92739888
4
- data.tar.gz: afd2a535a74f0de155f4336bd2bb366f3ab896dcdd34bf313d9b3925007b5ff5
3
+ metadata.gz: bac0d7854086dcb0a939a8e61e8a1e249f95bee8dd3d8c2a9fd4d5a9c2aad7f3
4
+ data.tar.gz: 7a126d3b2442fbe651852851c16ee113a0954d621631f3432e633fd3dd2dbdb2
5
5
  SHA512:
6
- metadata.gz: 9ad698c67dae1217abfedb48d041289db52b6a967fa3e84e412be3c0b019ffb099b40bb622ea32d0b05a2508b83b1f65157ad0d84a39eedd730aaaf311a2d4c9
7
- data.tar.gz: 4d75a9366dc64571d313742f08d41890f7e8d519666c930058fd006bf8793fdc09cdf15a59dbedd6823fc291849f406b38e596dc680244bfa643dffbe5af36d0
6
+ metadata.gz: 99da5747741ad7f9b04a857b8c8e0b62bdbcbcf66ca97ee843c631ab4027496793ef1f3750ae43492c871f4100fe2817ded3e0e6507eea188565271e311bbfc5
7
+ data.tar.gz: 5b1d30e5c83d099e652e411cb15ea8442b3e5f26121bbc6e57f34dc2e68ffe4707a2e5883dccc92c69776a9ead207419c468e6769823612dfc68f3f40810cf5a
data/_includes/head.html CHANGED
@@ -19,31 +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
-
37
- if (theme === null) {
38
- theme = "dark-pink";
39
- window.localStorage.setItem("theme", 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
+ }
40
41
  root.className = theme;
41
- root.style.setProperty("--current-color", colors[theme]);
42
- } else {
43
- root.className = theme;
44
- root.style.setProperty("--current-color", colors[theme]);
45
- }
46
-
42
+ })();
47
43
  </script>
48
44
  <script src="/assets/theme-assets/js/theme.js" defer></script>
49
45
  {%- feed_meta -%} {%- if jekyll.environment == 'production' and
@@ -28,7 +28,7 @@
28
28
  height: 24px;
29
29
  width: 24px;
30
30
  border-radius: 50%;
31
- background-color: var(--current-color); /* Initial theme color */
31
+ background-color: var(--md-sys-color-primary); /* Initial theme color */
32
32
  margin-right: 10px;
33
33
  cursor: pointer;
34
34
  transition: transform 0.3s;
@@ -1,6 +1,5 @@
1
1
  (function () {
2
2
  const themeSelector = document.getElementById("themeSelector");
3
- const currentTheme = document.getElementById("currentTheme");
4
3
  const themeOptions = document.getElementById("themeOptions");
5
4
  const root = document.querySelector("html");
6
5
 
@@ -11,7 +10,6 @@
11
10
  window.localStorage.setItem("theme", newTheme);
12
11
  root.className = newTheme;
13
12
  const selectedColor = event.target.getAttribute("data-color");
14
- currentTheme.style.backgroundColor = selectedColor;
15
13
  };
16
14
  }
17
15
 
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.2
4
+ version: 5.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gul Noor