jekyll-theme-doodle 5.1.9 → 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 +3 -3
- data/_layouts/post.html +34 -17
- data/_sass/minima/_base.scss +2 -0
- data/_sass/minima/_footer.scss +2 -0
- data/_sass/minima/_posts.scss +3 -0
- data/_sass/minima/_toc.scss +41 -0
- data/_sass/minima.scss +1 -1
- 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
|
|
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
data/_sass/minima/_footer.scss
CHANGED
data/_sass/minima/_posts.scss
CHANGED
@@ -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
@@ -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
|