jekyll-theme-yat 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/extensions/hashlocate.html +10 -7
- data/_includes/sidebar/article-menu.html +6 -3
- data/_sass/misc/common-list.scss +3 -1
- data/_sass/yat.scss +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93dc2f7abbfa41173758255019dbe3a682aac9ec78650e0f215c262c1c8a7a0c
|
4
|
+
data.tar.gz: 591a837850ff6cbf79b66103e7a7aaba845a62d539fe198a2565142b7aa7c1a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 543fbfe705ba586521ea4899f1f3d20efc27ded17fb4fd23116bd129c80227429fcd9773d2327c8a8de783c0f0e5e419288cc757177a19fbc25898e4c138bc13
|
7
|
+
data.tar.gz: 75c1cf6c57f51b4d08c2eb2afe69187a4e6fccdefe1188bfcfa6dc246184951d33a257acdd54eef9280dbd668ce9b1780e7b26e2fcd56408be0b9f6bc6f98314
|
@@ -7,18 +7,21 @@
|
|
7
7
|
return;
|
8
8
|
}
|
9
9
|
|
10
|
-
var header = document.querySelector('header');
|
10
|
+
var header = document.querySelector('header.site-header');
|
11
|
+
var headerRect = header.getBoundingClientRect();
|
12
|
+
var headerTop = Math.floor(headerRect.top);
|
13
|
+
var headerHeight = Math.floor(headerRect.height);
|
11
14
|
var scrollPos = getScrollPos();
|
12
|
-
var offsetY = element.offsetTop - (
|
15
|
+
var offsetY = element.offsetTop - (headerTop + headerHeight + 20);
|
13
16
|
|
14
|
-
if (offsetY
|
17
|
+
if (offsetY == scrollPos.y) {
|
15
18
|
return;
|
16
19
|
}
|
17
20
|
|
18
|
-
if (
|
19
|
-
offsetY +=
|
20
|
-
} else if (
|
21
|
-
offsetY -=
|
21
|
+
if (headerTop == 0 && offsetY > scrollPos.y) {
|
22
|
+
offsetY += headerHeight + 2;
|
23
|
+
} else if (headerTop < 0 && offsetY < scrollPos.y) {
|
24
|
+
offsetY -= headerHeight - 2;
|
22
25
|
}
|
23
26
|
|
24
27
|
smoothScrollTo(offsetY);
|
@@ -36,9 +36,12 @@
|
|
36
36
|
var changed = true;
|
37
37
|
for (var i = headings.length - 1; i >= 0; i--) {
|
38
38
|
var h = headings[i];
|
39
|
-
var
|
40
|
-
var
|
41
|
-
|
39
|
+
var headingRect = h.getBoundingClientRect();
|
40
|
+
var headerRect = header.getBoundingClientRect();
|
41
|
+
var headerTop = Math.floor(headerRect.top);
|
42
|
+
var headerHeight = Math.floor(headerRect.height);
|
43
|
+
var headerHeight = headerTop + headerHeight + 20;
|
44
|
+
if (headingRect.top <= headerHeight) {
|
42
45
|
var id = 'h-' + h.getAttribute('id');
|
43
46
|
var curActive = menu.querySelector('a[href="#' + id + '"]');
|
44
47
|
if (curActive) {
|
data/_sass/misc/common-list.scss
CHANGED
@@ -15,6 +15,8 @@
|
|
15
15
|
}
|
16
16
|
|
17
17
|
li {
|
18
|
+
border-bottom: solid 1px #fff;
|
19
|
+
|
18
20
|
&:last-child {
|
19
21
|
border-bottom: none;
|
20
22
|
}
|
@@ -29,7 +31,7 @@
|
|
29
31
|
transition: background 0.2s;
|
30
32
|
|
31
33
|
&:hover {
|
32
|
-
background: mix($theme-color, #
|
34
|
+
background: mix($theme-color, #eaeaea, 20%);
|
33
35
|
}
|
34
36
|
}
|
35
37
|
|
data/_sass/yat.scss
CHANGED
@@ -31,7 +31,7 @@ $footer-height: $header-height * 1.05 !default;
|
|
31
31
|
$footer-text-color: rgba(lighten(invert($theme-color), 30%), 50%) !default;
|
32
32
|
$footer-background-color: darken($theme-color, 5%) !default;
|
33
33
|
|
34
|
-
$banner-height:
|
34
|
+
$banner-height: 420px !default;
|
35
35
|
$banner-text-color: lighten($white-color, 0%) !default;
|
36
36
|
$banner-background: darken(#333, 5%) !default;
|
37
37
|
|