jekyll-theme-doctored 0.3.9 → 0.3.10

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.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/_data/foot.yml +1 -0
  3. data/_data/nav.yml +1 -0
  4. data/_includes/head.html +37 -7
  5. data/_includes/icon.html +28 -0
  6. data/_includes/nav.html +6 -2
  7. data/_includes/palettes/main.amber.html +1 -1
  8. data/_includes/palettes/main.blue.html +1 -1
  9. data/_includes/palettes/main.cyan.html +1 -1
  10. data/_includes/palettes/main.emerald.html +1 -1
  11. data/_includes/palettes/main.fuchsia.html +1 -1
  12. data/_includes/palettes/main.gray.html +1 -1
  13. data/_includes/palettes/main.green.html +1 -1
  14. data/_includes/palettes/main.indigo.html +1 -1
  15. data/_includes/palettes/main.lime.html +1 -1
  16. data/_includes/palettes/main.neutral.html +1 -1
  17. data/_includes/palettes/main.orange.html +1 -1
  18. data/_includes/palettes/main.pink.html +1 -1
  19. data/_includes/palettes/main.purple.html +1 -1
  20. data/_includes/palettes/main.red.html +1 -1
  21. data/_includes/palettes/main.rose.html +1 -1
  22. data/_includes/palettes/main.sky.html +1 -1
  23. data/_includes/palettes/main.slate.html +1 -1
  24. data/_includes/palettes/main.stone.html +1 -1
  25. data/_includes/palettes/main.teal.html +1 -1
  26. data/_includes/palettes/main.violet.html +1 -1
  27. data/_includes/palettes/main.yellow.html +1 -1
  28. data/_includes/palettes/main.zinc.html +1 -1
  29. data/_includes/post-card.html +13 -13
  30. data/_includes/toc-card.html +8 -8
  31. data/_layouts/default.html +20 -2
  32. data/_layouts/project.html +11 -19
  33. data/_pages/index.md +17 -0
  34. data/assets/icons/fa-sprite.svg +32 -0
  35. metadata +5 -3
  36. /data/assets/{images → _images}/favicon.ico +0 -0
  37. /data/assets/{images → _images}/favicon.png +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c46d9cd94255ff8429728fdcb2b99f91b446cd2e4014ccef6eaae3134214440f
4
- data.tar.gz: a7c030856f57735a7328ed13262e2288bd433824d264a7339c9b5433d4b64736
3
+ metadata.gz: 007f8fbec9ff39c83a10f3af544775c6d46f2849a9849fcdafaed78a62143393
4
+ data.tar.gz: ba3d10d60c17a7b876d578b52d42627f920c53a789177ab941b9e2c93f97c9da
5
5
  SHA512:
6
- metadata.gz: 37f66377a5464d186d26295e14b25e31903063981440d17fa0c1f63001f99493c331faa40d72a0e377cd9ed2fe20e5ca011b502cf1d9ab42f5ce105faad41fbe
7
- data.tar.gz: 4ddbe59647a95b640507ab77571a835ec7546304efe1f37f3df4fa932c1ac7e410935432c7bd4c4bd89465f6c9abdf17c558c9b0a42c4ce56dc4472d070f5b78
6
+ metadata.gz: cb821f32bd71857f2d2eecdfdc672d5852e3268a02885513b9cc73e127f55633393ae264fb84ad4d8087e749647be78925296e512ec6a16361ef62ae1089d41e
7
+ data.tar.gz: 1e6d4bf023667e9c49930ddad493e6629b2c8dcad895511fffbdddeb13cd0c259957259c12b0041b63d50f50959dd28ff8c48e67996d80a0ce6b2cb6cfe96b32
data/_data/foot.yml CHANGED
@@ -1,5 +1,6 @@
1
1
  title: Doctored
2
2
  emoji: 🧪
3
+ # logo: /assets/images/logo.png
3
4
  pages:
4
5
  - title: about
5
6
  url: /about
data/_data/nav.yml CHANGED
@@ -1,5 +1,6 @@
1
1
  title: Doctored
2
2
  emoji: 🎩
3
+ # logo: /assets/images/logo.png
3
4
  description: A Jekyll blog theme which prioritizes uniqueness, technical complexity, and sophistication.
4
5
  pages:
5
6
  - title: about
data/_includes/head.html CHANGED
@@ -6,17 +6,18 @@
6
6
  <script>
7
7
  function applyTheme(newTheme, triggeredByDropdown = false) {
8
8
  const isDarkMode = newTheme === 'dark' || (localStorage.theme == 'dark' && !(newTheme === 'light')) || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches);
9
- document.documentElement.classList.toggle(
10
- 'dark',
11
- isDarkMode
12
- )
9
+ document.documentElement.classList.toggle('dark', isDarkMode);
13
10
 
14
11
  const toggle = document.getElementById('theme-toggle');
15
12
  const dropdown = document.getElementById('theme-dropdown');
16
13
 
17
14
  if (toggle) {
18
15
  toggle.innerHTML =
19
- localStorage.theme == "dark" ? '<i class="fas fa-moon"></i>' : !localStorage.theme ? '<i class="fas fa-laptop"></i>' : '<i class="fas fa-sun"></i>';
16
+ localStorage.theme == "dark"
17
+ ? '{% capture t %}{% include icon.html name="fa-moon" class="w-4 h-4 inline-block" %}{% endcapture %}{{ t | strip_newlines }}'
18
+ : !localStorage.theme
19
+ ? '{% capture t %}{% include icon.html name="fa-laptop" class="w-4 h-4 inline-block" %}{% endcapture %}{{ t | strip_newlines }}'
20
+ : '{% capture t %}{% include icon.html name="fa-sun" class="w-4 h-4 inline-block" %}{% endcapture %}{{ t | strip_newlines }}';
20
21
  }
21
22
  if (dropdown) {
22
23
  if (!triggeredByDropdown) {
@@ -29,7 +30,36 @@
29
30
  </script>
30
31
  {%- assign palette = site.color | default: 'stone' -%}
31
32
  {% include palette_styles.html palette=palette %}
33
+ <style>
34
+ a[href^="http://"]:not(.no-external-icon):not([data-no-external-icon])::after,
35
+ a[href^="https://"]:not(.no-external-icon):not([data-no-external-icon])::after {
36
+ content: "↗" !important;
37
+ font-family: inherit !important;
38
+ margin-left: 3px;
39
+ padding-left: 3px;
40
+ text-decoration: none;
41
+ }
42
+
43
+ .icon-fa {
44
+ display: inline-block;
45
+ width: 1em;
46
+ height: 1em;
47
+ flex-shrink: 0;
48
+ vertical-align: -0.125em;
49
+ fill: currentColor;
50
+ overflow: visible;
51
+ }
52
+
53
+ .icon-fa.w-3.h-3 {
54
+ width: 0.75rem;
55
+ height: 0.75rem;
56
+ }
57
+
58
+ .icon-fa.w-4.h-4 {
59
+ width: 1rem;
60
+ height: 1rem;
61
+ }
62
+ </style>
32
63
  <link rel="icon" href="{{ '/assets/images/favicon.ico' | relative_url }}" type="image/x-icon">
33
- <script defer src="https://kit.fontawesome.com/a7b73c75c9.js" crossorigin="anonymous"></script>
34
64
  {% seo %}
35
- </head>
65
+ </head>
@@ -0,0 +1,28 @@
1
+ {%- assign icon_raw = include.name | default: '' | strip -%}
2
+ {%- assign cls = include.class | default: '' | strip -%}
3
+
4
+ {%- assign icon_class = icon_raw
5
+ | replace: 'fas ', 'fa-solid '
6
+ | replace: 'far ', 'fa-regular '
7
+ | replace: 'fab ', 'fa-brands ' -%}
8
+
9
+ {%- assign style = 'fa-solid' -%}
10
+ {%- if icon_class contains 'fa-brands' -%}
11
+ {%- assign style = 'fa-brands' -%}
12
+ {%- elsif icon_class contains 'fa-regular' -%}
13
+ {%- assign style = 'fa-regular' -%}
14
+ {%- endif -%}
15
+
16
+ {%- assign icon_name = '' -%}
17
+ {%- assign icon_tokens = icon_class | split: ' ' -%}
18
+ {%- for token in icon_tokens -%}
19
+ {%- if token contains 'fa-' and token != 'fa' and token != 'fa-solid' and token != 'fa-regular' and token != 'fa-brands' and token != 'fa-fw' -%}
20
+ {%- assign icon_name = token | replace: 'fa-', '' -%}
21
+ {%- endif -%}
22
+ {%- endfor -%}
23
+
24
+ {%- if icon_name == '' -%}
25
+ {%- assign icon_name = 'circle' -%}
26
+ {%- endif -%}
27
+
28
+ <svg class="icon-fa {{ cls }}" aria-hidden="true" focusable="false"><use href="{{ '/assets/icons/fa-sprite.svg' | relative_url }}#{{ style }}-{{ icon_name }}"></use></svg>
data/_includes/nav.html CHANGED
@@ -1,6 +1,10 @@
1
1
  <div class="flex flex-row flex-wrap justify-between w-full gap-4">
2
- <div class="flex flex-row gap-1">
3
- {{site.data.nav.emoji}}
2
+ <div class="flex flex-row gap-1 items-center">
3
+ {% if site.data.nav.logo %}
4
+ <img src="{{ site.data.nav.logo | relative_url }}" alt="logo" class="h-6 w-6">
5
+ {% else %}
6
+ <span>{{ site.data.nav.emoji }}</span>
7
+ {% endif %}
4
8
  <a href="{{ '/' | relative_url }}">
5
9
  <h3 class="font-sans">{{ site.data.nav.title }}</h3>
6
10
  </a>