jekyll-theme-amethyst 2.8.0 → 2.8.1

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/sidebar.html +8 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d7bc014f3e7b88c3d75ac915dd7f40e7c3ab9034fd5f2f079bf5021b62430d9a
4
- data.tar.gz: a57427dae152217ce9ff7edc81a26bc10b48d270d474a6ae5e8c40dcf5807bed
3
+ metadata.gz: a611912772176a08c7973ae7018a9cf095a6a04c73748a3782ae896513e87deb
4
+ data.tar.gz: 9b254986dc3210c5a3ac6376eaccbd98b4c015c0e32792bdc305a6965755c982
5
5
  SHA512:
6
- metadata.gz: 1cbe973d795c46c42e196514a9e5a3fd804de62cb043f1eb90cac83047d569ec4f5f7ddacc758b93b232106de9b2694e05975c877bda7c6db98b972352f484f0
7
- data.tar.gz: eb9aa6ad3022132e0d38d0240175a5eb2159087e15a0ad122c03922a737d0b572f0a3fc3505d26c6f435fd7ace68fb4e4ed9ceca38fdbc0bdeab13947b0affd1
6
+ metadata.gz: a5c76aa25e6c99c6bc978a2123d000035153713682b246f72af666891969e7fc26ff038abbc3abe594e12781868eb67d6667c1de3f2e4a3c578e843b476e5657
7
+ data.tar.gz: '090b92ba43ebe3d94eb33f1165b701e4eca1e3219e1b5b26e23f4cd392b6a3c59d2236ff0ded83a6044d28a1b0490155c8357d7fbefcad8bf5b74efaabad284a'
@@ -41,7 +41,11 @@ Block data:
41
41
  Whether a block should be expanded.
42
42
  - true: Always expanded.
43
43
  - false: Never expanded.
44
- - active: Expand when the current page is in the list.
44
+ - active: Expand when the current page is in the list,
45
+ unless another block has already been expanded for the current page.
46
+ (If a page is in multiple categories, only expand the first and
47
+ presumed most-important once. The others can be navigated by clicking
48
+ on the category atop the page and/or in the sidebar instead.)
45
49
  - initial: Expand on the home page, and when the current page is in the list.
46
50
 
47
51
  * initial: [Default: "/"]
@@ -49,6 +53,7 @@ Block data:
49
53
 
50
54
  {%- endcomment -%}
51
55
  <aside class="sidebar" role="complementary">
56
+ {%- assign block_expand_active_once = false -%}
52
57
  {%- for block in site.data[include.blocks] -%}
53
58
  {%- assign block_type = block.type | default: "group" -%}
54
59
  {%- assign block_title = block.title -%}
@@ -94,8 +99,9 @@ Block data:
94
99
 
95
100
  {%- if block_expand == "active" -%}
96
101
  {%- assign self_in_contents = block_contents | where: 'url', page.url | size -%}
97
- {%- if page.url == block_url or self_in_contents > 0 -%}
102
+ {%- if page.url == block_url or self_in_contents > 0 and block_expand_active_once == false -%}
98
103
  {%- assign block_expand = true -%}
104
+ {%- assign block_expand_active_once = true -%}
99
105
  {%- else -%}
100
106
  {%- assign block_expand = false -%}
101
107
  {%- endif -%}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-amethyst
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.0
4
+ version: 2.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Timo Tijhof