jekyll-theme-amethyst 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_data/sidebar_api.yml +3 -1
- data/_includes/sidebar.html +16 -2
- data/amethyst.gemspec +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: 885f5b7a5ae2e9b5997b2fb05ef3cd16d41d836da975e255bd98f28b184e2b5d
|
4
|
+
data.tar.gz: a483603a8616df9defba29971850177b4a29697d764af354f04679039f6e8297
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69aba6c9b3385f9f11fa03752747f03168481ce74c9e8d9148da623b14fd1292f2db5ed44bf6d1149921ecdecf7974147a74349d506fcc3b0173ed749bdc0d61
|
7
|
+
data.tar.gz: 20d6ab32044f7ad93d4e358f32d95921ab2b05df7586412fe98c3b037e3026d22be8241531842eea08c1816046b1ecf8eed633e3defa1fc676281e49f6b1c778
|
data/_data/sidebar_api.yml
CHANGED
data/_includes/sidebar.html
CHANGED
@@ -33,11 +33,15 @@ Block data:
|
|
33
33
|
When using a "list" block, an array of objects with "title"
|
34
34
|
and "url" properties.
|
35
35
|
|
36
|
-
* expand: [Default: active]
|
36
|
+
* expand: [Default: "active"]
|
37
37
|
Whether a block should be expanded.
|
38
38
|
- true: Always expanded.
|
39
39
|
- false: Never expanded.
|
40
40
|
- active: Expand when the current page is in the list.
|
41
|
+
- initial: Expand on the home page, and when the current page is in the list.
|
42
|
+
|
43
|
+
* initial: [Default: "/"]
|
44
|
+
Override which address the "initial" expand mode will compare to.
|
41
45
|
|
42
46
|
{%- endcomment -%}
|
43
47
|
<aside class="sidebar" role="complementary">
|
@@ -47,9 +51,10 @@ Block data:
|
|
47
51
|
{%- assign block_url = block.url -%}
|
48
52
|
{%- assign block_contents = block.list -%}
|
49
53
|
{%- assign block_expand = block.expand -%}
|
50
|
-
{%- if block_expand != true and block_expand != false -%}
|
54
|
+
{%- if block_expand != true and block_expand != false and block_expand != "initial" -%}
|
51
55
|
{%- assign block_expand = "active" -%}
|
52
56
|
{%- endif -%}
|
57
|
+
{%- assign block_initial = block.initial | default: "/" -%}
|
53
58
|
|
54
59
|
{%- if block_type == "group" -%}
|
55
60
|
{%- assign group_page = site.pages | where: "layout", "group" | where: "group", block.group | first -%}
|
@@ -67,6 +72,15 @@ Block data:
|
|
67
72
|
{%- assign block_expand = false -%}
|
68
73
|
{%- endif -%}
|
69
74
|
|
75
|
+
{%- if block_expand == "initial" -%}
|
76
|
+
{%- assign block_expand = false -%}
|
77
|
+
{%- if page.url == block_initial -%}
|
78
|
+
{%- assign block_expand = true -%}
|
79
|
+
{%- else -%}
|
80
|
+
{%- assign block_expand = "active" -%}
|
81
|
+
{%- endif -%}
|
82
|
+
{%- endif -%}
|
83
|
+
|
70
84
|
{%- if block_expand == "active" -%}
|
71
85
|
{%- assign self_in_contents = block_contents | where: 'url', page.url | size -%}
|
72
86
|
{%- if page.url == block_url or self_in_contents > 0 -%}
|
data/amethyst.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "jekyll-theme-amethyst"
|
3
|
-
spec.version = "0.
|
3
|
+
spec.version = "0.4.0"
|
4
4
|
spec.summary = "https://github.com/qunitjs/jekyll-theme-amethyst"
|
5
5
|
spec.authors = ["Timo Tijhof", "Trent Willis"]
|
6
6
|
spec.files = `git ls-files -z`.split("\x0")
|