crane-theme 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/footer.html +27 -0
- data/_includes/head.html +1 -0
- data/assets/css/style.css +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3f320ac1a511c822f276b64501c93ab2451ef40f112bdb712f81a2f1e586b90
|
4
|
+
data.tar.gz: 747f1b3b552122d4b8cf6c733e301fd123b9a1bb1d6d988c40f2231b165c6dd7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3c2938bbc3657d76386994d38c1feab338ce1cd135e2fb734e554aa0f143ffc041f24ef6986a3415cbcae3eb213d5f2fcf217df0366213b7dcdeed728a13b19
|
7
|
+
data.tar.gz: c0715e1d9fc684fc082ec1e3a2fb917a77558e5addb4b2e09abfa6804db20f2c44f771bfe884f42462fd0949f91526d4e67fce6762ead078d4f7c9aab9dbc8ab
|
data/_includes/footer.html
CHANGED
@@ -28,3 +28,30 @@
|
|
28
28
|
</div>
|
29
29
|
|
30
30
|
</footer>
|
31
|
+
<script type="text/javascript">
|
32
|
+
// highlight table of contents items if available
|
33
|
+
// get all headers referenced in the table of contents
|
34
|
+
const anchors =$("#markdown-toc")
|
35
|
+
.find("a")
|
36
|
+
.toArray()
|
37
|
+
.map(a => "#"+a.href.split('#')[1])
|
38
|
+
.map(id => $('body').find(id)[0]);
|
39
|
+
|
40
|
+
// highlight the lowest scrolled-to anchor
|
41
|
+
$(window).scroll(function(){
|
42
|
+
var scrollTop = $(document).scrollTop();
|
43
|
+
|
44
|
+
// so first set everything to inactive
|
45
|
+
for (var i=0; i<anchors.length; i++){
|
46
|
+
$('#markdown-toc a[href="#' + $(anchors[i]).attr('id')).parent().removeClass('active');
|
47
|
+
}
|
48
|
+
|
49
|
+
// then iterate backwards, matching on the first one and stopping
|
50
|
+
for (var i=anchors.length-1; i>=0; i--){
|
51
|
+
if (scrollTop > $(anchors[i]).offset().top - 50) {
|
52
|
+
$('#markdown-toc a[href="#' + $(anchors[i]).attr('id')).parent().addClass('active');
|
53
|
+
break;
|
54
|
+
}
|
55
|
+
}
|
56
|
+
});
|
57
|
+
</script>
|
data/_includes/head.html
CHANGED
@@ -6,6 +6,7 @@
|
|
6
6
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
7
7
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
8
8
|
<link href="https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Edu+VIC+WA+NT+Beginner&family=Fira+Mono&family=Fira+Sans:wght@400;500;800&display=swap" rel="stylesheet">
|
9
|
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
9
10
|
<link rel="stylesheet" href="{{ "/assets/css/style.css" | relative_url }}">
|
10
11
|
<link rel="stylesheet" href="{{ "/assets/css/code.css" | relative_url }}">
|
11
12
|
{% if page.usemathjax %}
|
data/assets/css/style.css
CHANGED
@@ -178,6 +178,7 @@ blockquote {
|
|
178
178
|
|
179
179
|
.post-list {
|
180
180
|
padding: 0;
|
181
|
+
margin-top: 5rem;
|
181
182
|
}
|
182
183
|
|
183
184
|
.site-header {
|
@@ -205,3 +206,12 @@ blockquote {
|
|
205
206
|
text-align: center;
|
206
207
|
color: var(--lighter-color);
|
207
208
|
}
|
209
|
+
|
210
|
+
#markdown-toc li {
|
211
|
+
transition: color 0.1s;
|
212
|
+
color: var(--main-color);
|
213
|
+
}
|
214
|
+
|
215
|
+
#markdown-toc .active {
|
216
|
+
color: var(--secondary-highlight);
|
217
|
+
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crane-theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adrian Garza
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|