jekyll-theme-doodle 5.0.0 → 5.1.0

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: 4f54e781724a253f9055444a13e1b501c9b51f4d4ade8dde1d653c84f1ec2ea8
4
- data.tar.gz: 103b8d681748a321120af21c2342836bed54034fafc24b9af2f9dd3945f42173
3
+ metadata.gz: 27b09237629b1b40332548fc3d357cbf9fedd050fd4f0e6d80a28adeb9dfab24
4
+ data.tar.gz: 873ef4144e6f89cc1d2f3704b1a5b8170c66fe7298a8585d8f1b684c94902d2e
5
5
  SHA512:
6
- metadata.gz: 0a182eeb11c80d47d624a91036fad0632cc58ca06b34df9e99578bf5a7804378efb6e57d0eb8ca7bc60cbeddacd7ca8bb846da6c6957d0d99705a822d5006cd5
7
- data.tar.gz: af99d8d27b1a62c82068021051d6416d90192fc29f534f47da1e75050672ba515a8810f0b3a164dcf9a2df6a7417b7e84a7be1bde64ef209ae171b3bc9561d92
6
+ metadata.gz: 5b7d98a564d066204c50596b6bd4b11ff6deeaf4e2d946af09db8a29e0d5d97bfd43b47e73556051ea41ba8645a78e7b88c795616bf227cfe061dbdd329b3d2f
7
+ data.tar.gz: 2558906289d9789bfdee5da1eb9a8998bef779c0b84ca169179a38fab497e887958482ebc92509f5e02cc04d871b98032146c831275329faad73d88f958082c2
data/README.md CHANGED
@@ -10,6 +10,7 @@
10
10
  - [Pin a post](#pin-a-post)
11
11
  - [Add tagline in header](#add-tagline-in-header)
12
12
  - [Google analytics](#google-analytics)
13
+ - [Adding icons to naviagtion links](#adding-icons-to-naviagtion-links)
13
14
  - [Contributing](#contributing)
14
15
  - [License](#license)
15
16
 
@@ -62,7 +63,7 @@ remote_theme: "gulnoor/jekyll-theme-doodle"
62
63
 
63
64
  - Remove any other theme: or remote_theme: entry.
64
65
 
65
- ## Alternate Method
66
+ ### Alternate Method
66
67
 
67
68
  Add this line to your Jekyll site's `Gemfile`:
68
69
 
@@ -120,6 +121,17 @@ add your google analytics tracking id to \_config.yml
120
121
  ```yaml
121
122
  google_analytics: UA-NNNNNNNN-N
122
123
  ```
124
+ ### Adding icons to naviagtion links
125
+ add the icon path to the page front matter e.g
126
+
127
+ ```yaml
128
+ ---
129
+ layout: page
130
+ title: "About"
131
+ permalink: /about/
132
+ icon: "/assets/icons/about.svg"
133
+ ---
134
+ ```
123
135
 
124
136
  ## TODO
125
137
 
data/_layouts/home.html CHANGED
@@ -7,8 +7,16 @@ layout: default
7
7
  {%- endif -%}
8
8
 
9
9
  {{ content }}
10
+ {% assign has_pinned_post = false %}
10
11
 
11
- {%- if site.posts.size > 0 -%}
12
+ {% for post in site.posts %}
13
+ {% if post.status == 'pinned' %}
14
+ {% assign has_pinned_post = true %}
15
+ {% break %}
16
+ {% endif %}
17
+ {% endfor %}
18
+
19
+ {% if has_pinned_post %}
12
20
  <h1 class="post-title">{{ page.list_title | default: 'Pinned Posts' }}</h1>
13
21
  <ul class="pinned-post-list">
14
22
  {%- for post in site.posts -%}
@@ -32,7 +40,7 @@ layout: default
32
40
  <path
33
41
  fill="none"
34
42
  class="pin-path"
35
- d="M-0.92 0.05 C-0.85 -7.96, -1.61 -37.45, 0.46 -48.12 C2.52 -58.8, 8.31 -63.66, 11.46 -64.01 C14.61 -64.36, 17.92 -61.96, 19.34 -50.21 C20.76 -38.46, 20.48 -4.19, 20 6.49 C19.52 17.16, 20.01 12.99, 16.44 13.85 C12.87 14.71, 2.49 13.98, -1.43 11.64 C-5.36 9.29, -6.38 13.15, -7.1 -0.21 C-7.81 -13.57, -8.39 -54.05, -5.72 -68.55 C-3.06 -83.05, 3.85 -87.21, 8.89 -87.23 C13.93 -87.26, 21.52 -74.71, 24.52 -68.68 C27.52 -62.66, 26.27 -53.89, 26.87 -51.11 M0.8 -0.97 C0.75 -9.29, -1.95 -39.43, -0.23 -49.77 C1.5 -60.1, 7.79 -63.14, 11.17 -62.99 C14.54 -62.84, 18.74 -60.01, 20.02 -48.88 C21.29 -37.74, 19.22 -6.54, 18.81 3.8 C18.39 14.14, 21.3 11.55, 17.53 13.15 C13.75 14.76, -0.1 15.77, -3.84 13.45 C-7.59 11.12, -4.38 13.08, -4.95 -0.79 C-5.52 -14.66, -9.58 -55.22, -7.24 -69.77 C-4.91 -84.32, 3.68 -88.43, 9.08 -88.08 C14.47 -87.73, 22.38 -73.79, 25.11 -67.69 C27.84 -61.59, 25.42 -54.5, 25.45 -51.48"
43
+ d="M-0.92 0.05 C-0.85 -7.96, -1.61 -37.45, 0.46 -48.12 C2.52 -58.8, 8.31 -63.66, 11.46 -64.01 C14.61 -64.36, 17.92 -61.96, 19.34 -50.21 C20.76 -38.46, 20.48 -4.19, 20 6.49 C19.52 17.16, 20.01 12.99, 16.44 13.85 C12.87 14.71, 2.49 13.98, -1.43 11.64 C-5.36 9.29, -6.38 13.15, -7.1 -0.21 C-7.81 -13.57, -8.39 -54.05, -5.72 -68.55 C-3.06 -83.05,style -87.21, 8.89 -87.23 C13.93 -87.26, 21.52 -74.71, 24.52 -68.68 C27.52 -62.66, 26.27 -53.89, 26.87 -51.11 M0.8 -0.97 C0.75 -9.29, -1.95 -39.43, -0.23 -49.77 C1.5 -60.1, 7.79 -63.14, 11.17 -62.99 C14.54 -62.84, 18.74 -60.01, 20.02 -48.88 C21.29 -37.74, 19.22 -6.54, 18.81 3.8 C18.39 14.14, 21.3 11.55, 17.53 13.15 C13.75 14.76, -0.1 15.77, -3.84 13.45 C-7.59 11.12, -4.38 13.08, -4.95 -0.79 C-5.52 -14.66, -9.58 -55.22, -7.24 -69.77 C-4.91 -84.32, 3.68 -88.43, 9.08 -88.08 C14.47 -87.73, 22.38 -73.79, 25.11 -67.69 C27.84 -61.59, 25.42 -54.5, 25.45 -51.48"
36
44
  ></path>
37
45
  </g>
38
46
  </g>
@@ -56,7 +64,7 @@ layout: default
56
64
  {%- endif -%}
57
65
  <div class="all-post-wrapper">
58
66
  {%- if site.posts.size > 0 -%}
59
- <h1 class="post-title">{{ page.list_title | default: 'All Posts' }}</h1>
67
+ <h1 class="post-title">{{ page.list_title | default: 'Recent Posts' }}</h1>
60
68
  <ul class="post-list">
61
69
  {%- for post in site.posts -%}
62
70
  <li class="post-card custom-border">
@@ -258,7 +258,8 @@ table {
258
258
  padding: ($spacing-unit / 3) ($spacing-unit / 2);
259
259
  }
260
260
  th {
261
- background-color: var(--md-sys-color-surface-container-highest);
261
+ background-color: var(--md-sys-color-secondary-container);
262
+ color: var(--md-sys-color-on-secondary-container);
262
263
  // border: 1px solid darken($grey-color-light, 4%);
263
264
  // border-bottom-color: darken($grey-color-light, 12%);
264
265
  }
@@ -75,5 +75,5 @@
75
75
  }
76
76
  .divider-path {
77
77
  stroke: var(--md-sys-color-outline);
78
- stroke-width: 2;
78
+ stroke-width: 1.5;
79
79
  }
@@ -2,6 +2,7 @@
2
2
  display: flex;
3
3
  justify-content: center;
4
4
  flex-direction: column;
5
+ padding-top: 24px;
5
6
  }
6
7
  .site-header {
7
8
  min-height: $spacing-unit * 1.865;
@@ -3,6 +3,8 @@
3
3
  }
4
4
  .theme-wrapper {
5
5
  display: flex;
6
+ position: absolute;
7
+ right: 0;
6
8
  justify-content: flex-end;
7
9
  align-items: flex-start;
8
10
  margin-left: auto;
@@ -17,13 +19,14 @@
17
19
  position: fixed;
18
20
  z-index: 103;
19
21
  bottom: 10px;
22
+ right: auto;
20
23
  left: 9px;
21
24
  }
22
25
  }
23
26
 
24
27
  .current-theme {
25
- height: 26px;
26
- width: 26px;
28
+ height: 24px;
29
+ width: 24px;
27
30
  border-radius: 50%;
28
31
  background-color: var(--current-color); /* Initial theme color */
29
32
  margin-right: 10px;
@@ -72,15 +75,17 @@
72
75
  }
73
76
  .slider:before {
74
77
  position: absolute;
75
- content: "";
78
+ content: url("/assets/theme-assets/theme-icons/sun.svg");
76
79
  height: 20px;
77
80
  width: 20px;
78
81
  left: 2px;
79
82
  bottom: 2px;
80
- background-color: var(--md-sys-color-on-primary);
83
+ background-color: var(--md-sys-color-surface-container-highest);
81
84
  transition: 0.4s;
82
85
  border-radius: 50%;
83
86
  }
84
87
  input:checked + .slider:before {
85
88
  transform: translateX(20px);
89
+ content: url("/assets/theme-assets/theme-icons/moon.svg");
90
+
86
91
  }
@@ -6,8 +6,10 @@
6
6
 
7
7
  function clickHandler(color) {
8
8
  return (event) => {
9
- window.localStorage.setItem("theme", color);
10
- root.className = color;
9
+ const mode = root.className.split("-")[0];
10
+ const newTheme = `${mode}-${color.split("-")[1]}`;
11
+ window.localStorage.setItem("theme", newTheme);
12
+ root.className = newTheme;
11
13
  const selectedColor = event.target.getAttribute("data-color");
12
14
  currentTheme.style.backgroundColor = selectedColor;
13
15
  };
@@ -19,26 +21,13 @@
19
21
  : themeOptions.style.maxWidth === "0px"
20
22
  ? "800px"
21
23
  : "0px";
22
- // themeOptions.style.marginRight = themeOptions.style.maxWidth !== "0px" ? "20px" : "0px";
23
24
  themeOptions.style.paddingTop =
24
25
  themeOptions.style.maxWidth !== "0px" ? "50px" : "0px";
25
- // currentTheme.style.display =
26
- // currentTheme.style.display !== "none" ? "none" : "block";
27
26
  });
28
27
 
29
28
  document.querySelectorAll(".theme-option").forEach((option) => {
30
29
  option.addEventListener("click", clickHandler(option.dataset.themeClass));
31
30
  });
32
- // document.querySelector(".night-mode-button").addEventListener("click", () => {
33
- // let activeMode = root.className;
34
- // if (activeMode.startsWith("dark")) {
35
- // activeMode = root.className.replace("dark", "light");
36
- // } else {
37
- // activeMode = root.className.replace("light", "dark");
38
- // }
39
- // root.className = activeMode;
40
- // window.localStorage.setItem("theme", activeMode);
41
- // });
42
31
 
43
32
  const darkModeToggle = document.getElementById("darkModeToggle");
44
33
 
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40">
2
+ <path d="M20 11a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z" fill="none" stroke="#ffffff" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
@@ -0,0 +1,18 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40">
2
+ <g transform="translate(8 8)">
3
+ <circle cx="12" cy="12" r="4" fill="none" stroke="#000000" stroke-width="1.5" stroke-linecap="round"
4
+ stroke-linejoin="round" />
5
+ <path d="M12 2v2" stroke="#000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
6
+ <path d="M12 20v2" stroke="#000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
7
+ <path d="m4.93 4.93 1.41 1.41" stroke="#000000" stroke-width="1.5" stroke-linecap="round"
8
+ stroke-linejoin="round" />
9
+ <path d="m17.66 17.66 1.41 1.41" stroke="#000000" stroke-width="1.5" stroke-linecap="round"
10
+ stroke-linejoin="round" />
11
+ <path d="M2 12h2" stroke="#000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
12
+ <path d="M20 12h2" stroke="#000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
13
+ <path d="m6.34 17.66-1.41 1.41" stroke="#000000" stroke-width="1.5" stroke-linecap="round"
14
+ stroke-linejoin="round" />
15
+ <path d="m19.07 4.93-1.41 1.41" stroke="#000000" stroke-width="1.5" stroke-linecap="round"
16
+ stroke-linejoin="round" />
17
+ </g>
18
+ </svg>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-doodle
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 5.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gul Noor
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-04 00:00:00.000000000 Z
11
+ date: 2024-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -99,7 +99,9 @@ files:
99
99
  - assets/theme-assets/theme-icons/home.svg
100
100
  - assets/theme-assets/theme-icons/home2.svg
101
101
  - assets/theme-assets/theme-icons/info.svg
102
+ - assets/theme-assets/theme-icons/moon.svg
102
103
  - assets/theme-assets/theme-icons/pin.svg
104
+ - assets/theme-assets/theme-icons/sun.svg
103
105
  - assets/theme-assets/theme-images/border-thick.svg
104
106
  - assets/theme-assets/theme-images/box-filled-2.svg
105
107
  - assets/theme-assets/theme-images/box-filled.svg