alembic-jekyll-theme 3.0.10 → 3.0.11
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/_includes/nav-header.html +24 -24
- data/_sass/_theme.scss +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96f8bf0b791d7e961bd4d3cd97e03d7ece509c68
|
4
|
+
data.tar.gz: 800d6d25ed3d39c5b9282c7ace66c81aeb354cd7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57d47b1836f1dc56f0068bef6141ac4d94c90a7ffe5efe9e27d37a6ae55fd3f01708e9db91d2421d2c3954cec5ef8a0e556f7f3c48e9f6d8018b0bc4c3d6a1ae
|
7
|
+
data.tar.gz: 3fb4420bd4c61c6938e4945d7ae66f3870b2e31314ee8b89757a380abbb9a6b03133d893bdb3e474bbfbf233f711e4c853c3b4ecf17a6c19c178bac1d0a7d9ce
|
data/_includes/nav-header.html
CHANGED
@@ -14,41 +14,41 @@
|
|
14
14
|
</li>
|
15
15
|
{% endfor %}
|
16
16
|
</ul>
|
17
|
+
<button class="button button--nav" aria-label="Menu toggle">
|
18
|
+
{% include icon.html id="nav" title="Menu" %}
|
19
|
+
</button>
|
17
20
|
</nav>
|
18
21
|
{% else %}
|
19
22
|
{% include nav-default.html %}
|
20
23
|
{% endif %}
|
21
24
|
|
22
|
-
<template id="buttontoggle">
|
23
|
-
<button class="button button--nav" aria-label="Menu toggle">
|
24
|
-
{% include icon.html id="nav" title="Menu" %}
|
25
|
-
</button>
|
26
|
-
</template>
|
27
|
-
|
28
25
|
<script type="text/javascript">
|
26
|
+
// Get list and button
|
27
|
+
const navList = document.querySelector('.header .list--nav')
|
28
|
+
const button = document.querySelector('.header .button--nav')
|
29
|
+
|
30
|
+
// Hide nav and apply toggle
|
31
|
+
const collapseNav = () => {
|
32
|
+
if (document.body.clientWidth < 640) {
|
33
|
+
navList.style.setProperty('--listHeight', `-${navList.offsetHeight}px`)
|
34
|
+
} else {
|
35
|
+
navList.removeAttribute('style')
|
36
|
+
}
|
29
37
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
const applyToggle = (list, button, breakpoint) => {
|
36
|
-
const navList = document.querySelector(list)
|
37
|
-
if (document.body.clientWidth < breakpoint) {
|
38
|
-
const navHeight = navList.clientHeight
|
39
|
-
const navButton = document.querySelector(button)
|
40
|
-
navList.style.maxHeight = '0px'
|
41
|
-
|
42
|
-
navButton.onclick = () => {
|
43
|
-
if (navList.style.maxHeight == '0px') {
|
44
|
-
navList.style.maxHeight = `${navHeight}px`
|
38
|
+
button.onclick = () => {
|
39
|
+
navList.style.setProperty('transition', `margin .1s`)
|
40
|
+
if (navList.style.getPropertyValue('--listHeight')) {
|
41
|
+
navList.style.removeProperty('--listHeight')
|
45
42
|
} else {
|
46
|
-
navList.style.
|
43
|
+
navList.style.setProperty('--listHeight', `-${navList.offsetHeight}px`)
|
47
44
|
}
|
48
45
|
}
|
49
46
|
}
|
50
|
-
}
|
51
47
|
|
52
|
-
|
48
|
+
collapseNav()
|
53
49
|
|
50
|
+
// Check on resize if to collapse nav
|
51
|
+
window.addEventListener('resize', () => {
|
52
|
+
collapseNav()
|
53
|
+
})
|
54
54
|
</script>
|
data/_sass/_theme.scss
CHANGED
@@ -39,6 +39,8 @@ body {
|
|
39
39
|
display: flex;
|
40
40
|
flex-direction: column-reverse;
|
41
41
|
align-items: flex-end;
|
42
|
+
justify-content: flex-end;
|
43
|
+
overflow: hidden;
|
42
44
|
}
|
43
45
|
|
44
46
|
.feature {
|
@@ -175,7 +177,7 @@ body {
|
|
175
177
|
list-style: none;
|
176
178
|
&--nav {
|
177
179
|
overflow: hidden;
|
178
|
-
|
180
|
+
margin-bottom: var(--listHeight, 0);
|
179
181
|
}
|
180
182
|
.item--post,
|
181
183
|
.item--result,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alembic-jekyll-theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Darnes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|