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 +4 -4
- data/README.md +4 -3
- data/_layouts/post.html +34 -17
- data/_sass/minima/_base.scss +11 -29
- data/_sass/minima/_footer.scss +2 -0
- data/_sass/minima/_navigation-bar.scss +1 -0
- data/_sass/minima/_pinned-post.scss +1 -0
- data/_sass/minima/_posts.scss +11 -4
- data/_sass/minima/_syntax-highlighting.scss +292 -61
- data/_sass/minima/_toc.scss +41 -0
- data/_sass/minima.scss +2 -2
- data/assets/theme-assets/js/theme.js +29 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18a9a55074a8a22ed0b3e3bb3fa0e24a749217a71118ce4a8a864d4b07d54c6b
|
4
|
+
data.tar.gz: b8653371ee46f39f9cc01f78df94b7d04a36b99ba36c82baff4a3b4a03f60348
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
-
|
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
|
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">
|
12
|
+
<h1 class="post-title p-name" itemprop="name headline">
|
13
|
+
{{ page.title | escape }}
|
14
|
+
</h1>
|
8
15
|
{%- if page.image -%}
|
9
|
-
|
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
|
13
|
-
|
14
|
-
{{ page.date |
|
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
|
-
|
19
|
-
|
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
|
-
|
31
|
-
|
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>
|
data/_sass/minima/_base.scss
CHANGED
@@ -143,44 +143,24 @@ a {
|
|
143
143
|
* Blockquotes
|
144
144
|
*/
|
145
145
|
blockquote {
|
146
|
-
color: var(--md-sys-color-
|
147
|
-
|
148
|
-
padding
|
149
|
-
margin-left:
|
150
|
-
margin-right:
|
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
|
|
data/_sass/minima/_footer.scss
CHANGED
data/_sass/minima/_posts.scss
CHANGED
@@ -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
|
24
|
+
background: var(--md-sys-color-surface-container);
|
3
25
|
@extend %vertical-rhythm;
|
4
26
|
|
5
27
|
.highlighter-rouge & {
|
6
|
-
|
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
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
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:
|
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.
|
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
|