jekyll-theme-doodle 5.1.8 → 5.2.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: 4748233467f5f2977302946ebbb1e4a9e3a99f0e86face1e207752c8de4d6943
4
- data.tar.gz: 5157679940ba27bc2dad87e20d9d547ed7c5f4b0bc6b169ad78984b6205aac73
3
+ metadata.gz: 18a9a55074a8a22ed0b3e3bb3fa0e24a749217a71118ce4a8a864d4b07d54c6b
4
+ data.tar.gz: b8653371ee46f39f9cc01f78df94b7d04a36b99ba36c82baff4a3b4a03f60348
5
5
  SHA512:
6
- metadata.gz: 8be9a0677ab819cafdac50cb4a39b7bed9b7b438334c156847969712f3b82c1637571bea4798f9569a35f88c99afd9aa4d1533ee119dbabf6ba7c183f0fbef69
7
- data.tar.gz: 70b9de3e0d3066134e78a7f1be5915beaa6d8d07cad91d96ab815edc68fb9a00a26e70b85cd43ec210bfe01411557406f871ad223bee93d15286682db7486df7
6
+ metadata.gz: 833120d18cae14e8744d74357111c8d5bf8c8416485501e64725beeb4d0d19579b25a97112464a9730b1459d94f2cddc353d9c953065b4eb76b82efb71793381
7
+ data.tar.gz: 0b885e10752f19e9d1e0045ca4b35374dbef5900b514aea2eaf762f7167e63d42ea38bb2e9749b2bc3ec6745c74a608b0190f1b2181a5a19036a224b21ee7485
data/README.md CHANGED
@@ -17,9 +17,9 @@
17
17
 
18
18
  ## Features
19
19
 
20
- - dark mode
21
- - 5 color schemes
22
- - pinned posts
20
+ - automatic table of contents generation
21
+ - dark mode with 5 color schemes
22
+ - pinned/featured posts at top of home page
23
23
  - handwriting fonts
24
24
  - google analytics support
25
25
 
@@ -149,6 +149,7 @@ icon: "/assets/icons/about.svg"
149
149
  - [ ] Add support for comments
150
150
  - [ ] Search functionality
151
151
  - [ ] automatic table of contents generation (button in mobile view/ sidebar in desktop view)
152
+ - [ ] scroll progress indicator
152
153
 
153
154
  ## Contributing
154
155
 
data/_layouts/post.html CHANGED
@@ -1,35 +1,52 @@
1
1
  ---
2
2
  layout: default
3
3
  ---
4
+
4
5
  <div class="wrapper">
5
- <article class="post h-entry" itemscope itemtype="http://schema.org/BlogPosting">
6
+ <article
7
+ class="post h-entry"
8
+ itemscope
9
+ itemtype="http://schema.org/BlogPosting"
10
+ >
6
11
  <header class="post-header">
7
- <h1 class="post-title p-name" itemprop="name headline">{{ page.title | escape }}</h1>
12
+ <h1 class="post-title p-name" itemprop="name headline">
13
+ {{ page.title | escape }}
14
+ </h1>
8
15
  {%- if page.image -%}
9
- <img src="{{- page.image | relative_url -}}" alt="" class="featured-image">
16
+ <img
17
+ src="{{- page.image | relative_url -}}"
18
+ alt=""
19
+ class="featured-image"
20
+ />
10
21
  {%- endif -%}
11
22
  <p class="post-meta">
12
- <time class="dt-published" datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
13
- {%- assign date_format = site.minima.date_format | default: '%b %-d, %Y' -%}
14
- {{ page.date | date: date_format }}
23
+ <time
24
+ class="dt-published"
25
+ datetime="{{ page.date | date_to_xmlschema }}"
26
+ itemprop="datePublished"
27
+ >
28
+ {%- assign date_format = site.minima.date_format | default: '%b %-d,
29
+ %Y' -%} {{ page.date | date: date_format }}
15
30
  </time>
16
- {%- if page.author -%}
17
-
18
- <span itemprop="author" itemscope itemtype="http://schema.org/Person"
19
- ><span class="p-author h-card" itemprop="name">{{ page.author }}</span></span
20
- >
31
+ {%- if page.author -%}
32
+ <span itemprop="author" itemscope itemtype="http://schema.org/Person"
33
+ ><span class="p-author h-card" itemprop="name"
34
+ >{{ page.author }}</span
35
+ ></span
36
+ >
21
37
  {%- endif -%}
22
38
  </p>
39
+ <div id="toc">
40
+ </div>
23
41
  </header>
24
-
42
+
25
43
  <div class="post-content e-content" itemprop="articleBody">
26
44
  {{ content }}
27
45
  </div>
28
-
29
- {%- if site.disqus.shortname -%}
30
- {%- include disqus_comments.html -%}
31
- {%- endif -%}
32
-
46
+
47
+ {%- if site.disqus.shortname -%} {%- include disqus_comments.html -%} {%-
48
+ endif -%}
49
+
33
50
  <a class="u-url" href="{{ page.url | relative_url }}" hidden></a>
34
51
  </article>
35
52
  </div>
@@ -143,44 +143,24 @@ a {
143
143
  * Blockquotes
144
144
  */
145
145
  blockquote {
146
- color: var(--md-sys-color-primary);
147
- border-left: 3px solid $grey-color-light;
148
- padding-left: $spacing-unit / 2;
149
- margin-left: 12px;
150
- margin-right: 12px;
146
+ background-color: var(--md-sys-color-tertiary-container);
147
+ color: var(--md-sys-color-on-tertiary-container);
148
+ padding: $spacing-unit;
149
+ margin-left: 10px;
150
+ margin-right: 10px;
151
+ border-radius: 16px;
151
152
  @include relative-font-size(1.125);
152
153
  letter-spacing: -1px;
153
154
 
154
155
  > :last-child {
155
156
  margin-bottom: 0;
156
157
  }
158
+ > p {
159
+ text-align: left;
160
+ }
157
161
  }
158
162
 
159
- /**
160
- * Code formatting
161
- */
162
- pre,
163
- code {
164
- @include relative-font-size(0.9375);
165
- border: 1px solid var(--md-sys-color-outline);
166
- border-radius: 3px;
167
- background-color: var(--md-sys-color-surface-container-high);
168
- }
169
-
170
- code {
171
- padding: 1px 5px;
172
- }
173
-
174
- pre {
175
- padding: 8px 12px;
176
- overflow-x: auto;
177
163
 
178
- > code {
179
- border: 0;
180
- padding-right: 0;
181
- padding-left: 0;
182
- }
183
- }
184
164
 
185
165
  /**
186
166
  * Wrapper
@@ -202,6 +182,8 @@ pre {
202
182
  }
203
183
  @include media-query($on-palm) {
204
184
  padding-left: $spacing-unit/2;
185
+ padding-left: 0px;
186
+ padding-right: 0px;
205
187
  }
206
188
  }
207
189
 
@@ -2,6 +2,8 @@
2
2
  padding: $spacing-unit 0;
3
3
  @include media-query($on-palm) {
4
4
  padding-bottom: 100px;
5
+ padding-left: 10px;
6
+ padding-right: 10px
5
7
  }
6
8
  }
7
9
 
@@ -120,6 +120,7 @@
120
120
  flex-direction: column;
121
121
  width: 100%;
122
122
  justify-content: center;
123
+ text-align: center;
123
124
  align-items: center;
124
125
  color: var(--md-sys-color-on-surface);
125
126
  }
@@ -59,6 +59,7 @@
59
59
  flex-wrap: wrap;
60
60
  justify-content: space-around;
61
61
  padding-top: 12px;
62
+ gap:8px;
62
63
  list-style: none;
63
64
  background-color: var(--md-sys-color-surface-container-highest);
64
65
  border-radius: 24px;
@@ -36,22 +36,26 @@
36
36
  @include media-query($on-laptop) {
37
37
  @include relative-font-size(2.25);
38
38
  }
39
+ @include media-query($on-palm) {
40
+ margin: 12px;
41
+ }
39
42
  }
40
43
  .post {
41
44
  background: var(--md-sys-color-surface);
42
45
  border-radius: 24px;
43
46
  padding: 24px;
44
- @include media-query($on-palm){
47
+ @include media-query($on-palm) {
45
48
  padding: 8px;
46
49
  }
47
50
  }
51
+
52
+ p {
53
+ text-align: justify;
54
+ }
48
55
  .post-content {
49
56
  margin-bottom: $spacing-unit;
50
57
 
51
58
  // text-align: justify;
52
- p {
53
- text-align: justify;
54
- }
55
59
 
56
60
  h2 {
57
61
  @include relative-font-size(2);
@@ -76,6 +80,9 @@
76
80
  @include relative-font-size(1.125);
77
81
  }
78
82
  }
83
+ a{
84
+ text-decoration: underline;
85
+ }
79
86
  }
80
87
 
81
88
  .post-list {
@@ -1,68 +1,299 @@
1
+ pre,
2
+ code {
3
+ @include relative-font-size(0.9375);
4
+ border: 1px solid var(--md-sys-color-outline);
5
+ border-radius: 3px;
6
+ background-color: var(--md-sys-color-surface-container);
7
+ }
8
+
9
+ code {
10
+ padding: 1px 5px;
11
+ }
12
+
13
+ pre {
14
+ padding: 8px 12px;
15
+ overflow-x: auto;
16
+
17
+ > code {
18
+ border: 0;
19
+ padding-right: 0;
20
+ padding-left: 0;
21
+ }
22
+ }
1
23
  .highlight {
2
- background: var(--md-sys-color-surface-container-high);
24
+ background: var(--md-sys-color-surface-container);
3
25
  @extend %vertical-rhythm;
4
26
 
5
27
  .highlighter-rouge & {
6
- background: var(--md-sys-color-surface-container-high);
28
+ background: var(--md-sys-color-surface-container);
7
29
  }
30
+ }
31
+ // .language-plaintext{
32
+ // background-color: var(--md-sys-color-secondary-container);
33
+ // color: var(--md-sys-color-on-secondary-container);
34
+ // }
35
+ :root {
36
+ /* Light mode colors */
37
+ --light-comment: #8e908c;
38
+ --light-error: #c82829;
39
+ --light-keyword: #8959a8;
40
+ --light-operator: #3e999f;
41
+ --light-comment-preproc: #eab700;
42
+ --light-deleted: #c82829;
43
+ --light-deleted-bg: #ffdad9;
44
+ --light-inserted: #718c00;
45
+ --light-inserted-bg: #e6ffed;
46
+ --light-output: #4d4d4c;
47
+ --light-prompt: #8959a8;
48
+ --light-strong: #000000;
49
+ --light-traceback: #c82829;
50
+ --light-number: #f5871f;
51
+ --light-string: #718c00;
52
+ --light-attribute: #3e999f;
53
+ --light-builtin: #4271ae;
54
+ --light-class: #8959a8;
55
+ --light-constant: #f5871f;
56
+ --light-entity: #3e999f;
57
+ --light-exception: #c82829;
58
+ --light-function: #4271ae;
59
+ --light-namespace: #4d4d4c;
60
+ --light-tag: #c82829;
61
+ --light-variable: #f5871f;
62
+ --light-whitespace: #ffffff;
63
+ --light-regex: #3e999f;
64
+ --light-symbol: #8959a8;
65
+
66
+ /* Dark mode colors */
67
+ --dark-comment: #999999;
68
+ --dark-error: #ff6c6b;
69
+ --dark-error-bg: #2c2c2c;
70
+ --dark-keyword: #c5a5c5;
71
+ --dark-operator: #56b6c2;
72
+ --dark-comment-preproc: #e6c07b;
73
+ --dark-deleted: #e06c75;
74
+ --dark-deleted-bg: #3c2a2a;
75
+ --dark-inserted: #98c379;
76
+ --dark-inserted-bg: #2a3c2a;
77
+ --dark-output: #5c6370;
78
+ --dark-prompt: #c678dd;
79
+ --dark-strong: #e6c07b;
80
+ --dark-traceback: #e06c75;
81
+ --dark-number: #d19a66;
82
+ --dark-string: #98c379;
83
+ --dark-attribute: #56b6c2;
84
+ --dark-builtin: #61aeee;
85
+ --dark-class: #c678dd;
86
+ --dark-constant: #d19a66;
87
+ --dark-entity: #56b6c2;
88
+ --dark-exception: #e06c75;
89
+ --dark-function: #61aeee;
90
+ --dark-namespace: #abb2bf;
91
+ --dark-tag: #e06c75;
92
+ --dark-variable: #d19a66;
93
+ --dark-whitespace: #5c6370;
94
+ --dark-regex: #56b6c2;
95
+ --dark-symbol: #c678dd;
96
+ }
97
+
98
+ .light-pink,
99
+ .light-yellow,
100
+ .light-cyan,
101
+ .light-blue,
102
+ .light-green {
103
+ /* Light mode (default) */
8
104
 
9
- .c { color: #999; font-style: italic } // Comment
10
- .err { color: #ff6c6b; background-color: #2c2c2c } // Error
11
- .k { font-weight: bold; color: #c5a5c5 } // Keyword
12
- .o { font-weight: bold; color: #56b6c2 } // Operator
13
- .cm { color: #999; font-style: italic } // Comment.Multiline
14
- .cp { color: #e6c07b; font-weight: bold } // Comment.Preproc
15
- .c1 { color: #999; font-style: italic } // Comment.Single
16
- .cs { color: #999; font-weight: bold; font-style: italic } // Comment.Special
17
- .gd { color: #e06c75; background-color: #3c2a2a } // Generic.Deleted
18
- .gd .x { color: #e06c75; background-color: #3c2a2a } // Generic.Deleted.Specific
19
- .ge { font-style: italic; color: #abb2bf } // Generic.Emph
20
- .gr { color: #e06c75 } // Generic.Error
21
- .gh { color: #e6c07b } // Generic.Heading
22
- .gi { color: #98c379; background-color: #2a3c2a } // Generic.Inserted
23
- .gi .x { color: #98c379; background-color: #2a3c2a } // Generic.Inserted.Specific
24
- .go { color: #5c6370 } // Generic.Output
25
- .gp { color: #c678dd } // Generic.Prompt
26
- .gs { font-weight: bold; color: #e6c07b } // Generic.Strong
27
- .gu { color: #56b6c2 } // Generic.Subheading
28
- .gt { color: #e06c75 } // Generic.Traceback
29
- .kc { font-weight: bold; color: #c5a5c5 } // Keyword.Constant
30
- .kd { font-weight: bold; color: #c5a5c5 } // Keyword.Declaration
31
- .kp { font-weight: bold; color: #c5a5c5 } // Keyword.Pseudo
32
- .kr { font-weight: bold; color: #c5a5c5 } // Keyword.Reserved
33
- .kt { color: #c678dd; font-weight: bold } // Keyword.Type
34
- .m { color: #d19a66 } // Literal.Number
35
- .s { color: #98c379 } // Literal.String
36
- .na { color: #56b6c2 } // Name.Attribute
37
- .nb { color: #61aeee } // Name.Builtin
38
- .nc { color: #c678dd; font-weight: bold } // Name.Class
39
- .no { color: #d19a66 } // Name.Constant
40
- .ni { color: #56b6c2 } // Name.Entity
41
- .ne { color: #e06c75; font-weight: bold } // Name.Exception
42
- .nf { color: #61aeee; font-weight: bold } // Name.Function
43
- .nn { color: #abb2bf } // Name.Namespace
44
- .nt { color: #e06c75 } // Name.Tag
45
- .nv { color: #d19a66 } // Name.Variable
46
- .ow { font-weight: bold; color: #56b6c2 } // Operator.Word
47
- .w { color: #5c6370 } // Text.Whitespace
48
- .mf { color: #d19a66 } // Literal.Number.Float
49
- .mh { color: #d19a66 } // Literal.Number.Hex
50
- .mi { color: #d19a66 } // Literal.Number.Integer
51
- .mo { color: #d19a66 } // Literal.Number.Oct
52
- .sb { color: #98c379 } // Literal.String.Backtick
53
- .sc { color: #98c379 } // Literal.String.Char
54
- .sd { color: #98c379 } // Literal.String.Doc
55
- .s2 { color: #98c379 } // Literal.String.Double
56
- .se { color: #98c379 } // Literal.String.Escape
57
- .sh { color: #98c379 } // Literal.String.Heredoc
58
- .si { color: #98c379 } // Literal.String.Interpol
59
- .sx { color: #98c379 } // Literal.String.Other
60
- .sr { color: #56b6c2 } // Literal.String.Regex
61
- .s1 { color: #98c379 } // Literal.String.Single
62
- .ss { color: #c678dd } // Literal.String.Symbol
63
- .bp { color: #e06c75 } // Name.Builtin.Pseudo
64
- .vc { color: #d19a66 } // Name.Variable.Class
65
- .vg { color: #d19a66 } // Name.Variable.Global
66
- .vi { color: #d19a66 } // Name.Variable.Instance
67
- .il { color: #d19a66 } // Literal.Number.Integer.Long
105
+ --comment: var(--light-comment);
106
+ --error: var(--light-error);
107
+ --keyword: var(--light-keyword);
108
+ --operator: var(--light-operator);
109
+ --comment-preproc: var(--light-comment-preproc);
110
+ --deleted: var(--light-deleted);
111
+ --deleted-bg: var(--light-deleted-bg);
112
+ --inserted: var(--light-inserted);
113
+ --inserted-bg: var(--light-inserted-bg);
114
+ --output: var(--light-output);
115
+ --prompt: var(--light-prompt);
116
+ --strong: var(--light-strong);
117
+ --traceback: var(--light-traceback);
118
+ --number: var(--light-number);
119
+ --string: var(--light-string);
120
+ --attribute: var(--light-attribute);
121
+ --builtin: var(--light-builtin);
122
+ --class: var(--light-class);
123
+ --constant: var(--light-constant);
124
+ --entity: var(--light-entity);
125
+ --exception: var(--light-exception);
126
+ --function: var(--light-function);
127
+ --namespace: var(--light-namespace);
128
+ --tag: var(--light-tag);
129
+ --variable: var(--light-variable);
130
+ --whitespace: var(--light-whitespace);
131
+ --regex: var(--light-regex);
132
+ --symbol: var(--light-symbol);
133
+ }
134
+
135
+ /* Dark mode */
136
+ .dark-pink,
137
+ .dark-yellow,
138
+ .dark-cyan,
139
+ .dark-blue,
140
+ .dark-green {
141
+ --comment: var(--dark-comment);
142
+ --error: var(--dark-error);
143
+ --error-bg: var(--dark-error-bg);
144
+ --keyword: var(--dark-keyword);
145
+ --operator: var(--dark-operator);
146
+ --comment-preproc: var(--dark-comment-preproc);
147
+ --deleted: var(--dark-deleted);
148
+ --deleted-bg: var(--dark-deleted-bg);
149
+ --inserted: var(--dark-inserted);
150
+ --inserted-bg: var(--dark-inserted-bg);
151
+ --output: var(--dark-output);
152
+ --prompt: var(--dark-prompt);
153
+ --strong: var(--dark-strong);
154
+ --traceback: var(--dark-traceback);
155
+ --number: var(--dark-number);
156
+ --string: var(--dark-string);
157
+ --attribute: var(--dark-attribute);
158
+ --builtin: var(--dark-builtin);
159
+ --class: var(--dark-class);
160
+ --constant: var(--dark-constant);
161
+ --entity: var(--dark-entity);
162
+ --exception: var(--dark-exception);
163
+ --function: var(--dark-function);
164
+ --namespace: var(--dark-namespace);
165
+ --tag: var(--dark-tag);
166
+ --variable: var(--dark-variable);
167
+ --whitespace: var(--dark-whitespace);
168
+ --regex: var(--dark-regex);
169
+ --symbol: var(--dark-symbol);
170
+ }
171
+
172
+ /* Syntax highlighting classes */
173
+ .c,
174
+ .cm,
175
+ .c1 {
176
+ color: var(--comment);
177
+ font-style: italic;
178
+ }
179
+ .err {
180
+ color: var(--error);
181
+ background-color: var(--error-bg);
182
+ }
183
+ .k,
184
+ .kc,
185
+ .kd,
186
+ .kp,
187
+ .kr {
188
+ font-weight: bold;
189
+ color: var(--keyword);
190
+ }
191
+ .o,
192
+ .ow {
193
+ font-weight: bold;
194
+ color: var(--operator);
195
+ }
196
+ .cp {
197
+ color: var(--comment-preproc);
198
+ font-weight: bold;
199
+ }
200
+ .cs {
201
+ color: var(--comment);
202
+ font-weight: bold;
203
+ font-style: italic;
204
+ }
205
+ .gd,
206
+ .gd .x {
207
+ color: var(--deleted);
208
+ background-color: var(--deleted-bg);
209
+ }
210
+ .gi,
211
+ .gi .x {
212
+ color: var(--inserted);
213
+ background-color: var(--inserted-bg);
214
+ }
215
+ .go {
216
+ color: var(--output);
217
+ }
218
+ .gp {
219
+ color: var(--prompt);
220
+ }
221
+ .gs {
222
+ font-weight: bold;
223
+ color: var(--strong);
224
+ }
225
+ .gu {
226
+ color: var(--builtin);
227
+ }
228
+ .gt {
229
+ color: var(--traceback);
230
+ }
231
+ .kt {
232
+ color: var(--class);
233
+ font-weight: bold;
234
+ }
235
+ .m,
236
+ .mf,
237
+ .mh,
238
+ .mi,
239
+ .mo,
240
+ .il {
241
+ color: var(--number);
242
+ }
243
+ .s,
244
+ .sb,
245
+ .sc,
246
+ .sd,
247
+ .s2,
248
+ .se,
249
+ .sh,
250
+ .si,
251
+ .sx,
252
+ .s1 {
253
+ color: var(--string);
254
+ }
255
+ .na {
256
+ color: var(--attribute);
257
+ }
258
+ .nb {
259
+ color: var(--builtin);
260
+ }
261
+ .nc {
262
+ color: var(--class);
263
+ font-weight: bold;
264
+ }
265
+ .no {
266
+ color: var(--constant);
267
+ }
268
+ .ni {
269
+ color: var(--entity);
270
+ }
271
+ .ne {
272
+ color: var(--exception);
273
+ font-weight: bold;
274
+ }
275
+ .nf {
276
+ color: var(--function);
277
+ font-weight: bold;
278
+ }
279
+ .nn {
280
+ color: var(--namespace);
281
+ }
282
+ .nt {
283
+ color: var(--tag);
284
+ }
285
+ .nv,
286
+ .vc,
287
+ .vg,
288
+ .vi {
289
+ color: var(--variable);
290
+ }
291
+ .w {
292
+ color: var(--whitespace);
293
+ }
294
+ .sr {
295
+ color: var(--regex);
296
+ }
297
+ .ss {
298
+ color: var(--symbol);
68
299
  }
@@ -0,0 +1,41 @@
1
+ #toc {
2
+ &::-webkit-scrollbar {
3
+ display: none;
4
+ }
5
+
6
+ /* Hide scrollbar for IE, Edge and Firefox */
7
+ -ms-overflow-style: none; /* IE and Edge */
8
+ scrollbar-width: none; /* Firefox */
9
+ @media screen and (min-width: 1440px) {
10
+ position: fixed;
11
+ right: 12px;
12
+ top: 0px;
13
+ display: flex;
14
+ flex-direction: column;
15
+ align-items: center;
16
+ justify-content: center;
17
+ width: calc(100vw - 1230px);
18
+
19
+ height: 100vh;
20
+ overflow-y: scroll;
21
+ }
22
+ }
23
+ .toc {
24
+ list-style-type: none;
25
+ margin-left: 8px;
26
+ a {
27
+ color: var(--md-sys-color-tertiary);
28
+ }
29
+ }
30
+ .toc-H1 {
31
+ font-size: 17px;
32
+ }
33
+
34
+ .toc-H2 {
35
+ padding-left: 14px;
36
+ font-size: 16px;
37
+ }
38
+ .toc-H3 {
39
+ padding-left: 30px;
40
+ font-size: 16px;
41
+ }
data/_sass/minima.scss CHANGED
@@ -4,7 +4,7 @@
4
4
  $base-font-family: "Lexend", -apple-system, BlinkMacSystemFont, "Segoe UI",
5
5
  Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
6
6
  "Segoe UI Symbol" !default;
7
- $base-font-size: 18px !default;
7
+ $base-font-size: 17px !default;
8
8
  $base-font-weight: 400 !default;
9
9
  $small-font-size: $base-font-size * 0.875 !default;
10
10
  $base-line-height: 1.5 !default;
@@ -46,6 +46,6 @@ $on-laptop: 800px !default;
46
46
 
47
47
  // Import partials.
48
48
  @import "minima/fonts", "minima/theme", "minima/base", "minima/header",
49
- "minima/page", "minima/posts", "minima/syntax-highlighting",
49
+ "minima/page", "minima/posts","minima/toc", "minima/syntax-highlighting",
50
50
  "minima/navigation-bar", "minima/pinned-post", "minima/theme-selector",
51
51
  "minima/footer";
@@ -39,4 +39,33 @@
39
39
  root.className = activeMode;
40
40
  window.localStorage.setItem("theme", activeMode);
41
41
  });
42
+
43
+ document.addEventListener("DOMContentLoaded", function () {
44
+ const toc = document.getElementById("toc");
45
+ if (toc) {
46
+ const content = document.querySelector(".post");
47
+ const headings = content.querySelectorAll("h1, h2, h3");
48
+
49
+ const ul = document.createElement("ul");
50
+ ul.className = "toc";
51
+
52
+ if (headings.length > 0) {
53
+ const title = document.createElement("h3");
54
+ title.innerText = "Table of contents";
55
+ toc.appendChild(title);
56
+
57
+ headings.forEach((heading) => {
58
+ const li = document.createElement("li");
59
+ const a = document.createElement("a");
60
+ a.href = "#" + heading.id;
61
+ a.textContent = heading.textContent;
62
+ li.appendChild(a);
63
+ li.className = `toc-${heading.tagName}`;
64
+ ul.appendChild(li);
65
+ });
66
+
67
+ toc.appendChild(ul);
68
+ }
69
+ }
70
+ });
42
71
  })();
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.8
4
+ version: 5.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gul Noor
@@ -82,6 +82,7 @@ files:
82
82
  - _sass/minima/_syntax-highlighting.scss
83
83
  - _sass/minima/_theme-selector.scss
84
84
  - _sass/minima/_theme.scss
85
+ - _sass/minima/_toc.scss
85
86
  - assets/main.scss
86
87
  - assets/minima-social-icons.svg
87
88
  - assets/theme-assets/js/theme.js