al_folio_core 1.0.5 → 1.0.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 566d64497199ae021c6b80241c4bf25791fb6447a7e22ee0232fb74e2cd915bb
4
- data.tar.gz: 149241d6a27b9e51737e6b437c339c270f64abc379e0c2664976c200af94fb37
3
+ metadata.gz: 06bef68d94bb7ef7fd6665e4aff60909a804ac2f039403dc23af465670735e0b
4
+ data.tar.gz: 4d2d13406b2bdb4e814d5a0b2a07762219e55767f04d4400b5adc2d2d1c9b1ec
5
5
  SHA512:
6
- metadata.gz: 2eba8f9aeebd03783e40e1833ceba8990bae51bb068065603c8f9bba6d24c8286c11f14d5366021a7295cbb3e8dd5a565bbc65a752868e8dbe758d1f34a284b1
7
- data.tar.gz: 6dccbdc6e0ab582dcf00a5fe0dc64ecb8418bc97f9d6051dbb214ca6a1a28f217429ca8c5d51ec0cbf472007ba4c2da1041da61d212e10c10f70bedc2723a4b4
6
+ metadata.gz: 9be84a54e9353e24a74b0d9618d59d0a6460f216e963694a752ae24b6e10c757e801ee09a86b7885c5d93758e8d12801a1d2513ddbc60a5f6fdec05aba67a887
7
+ data.tar.gz: 2b46a326939e4a12be6ec180cd36756d00bb26ba6e39f4b181a5da73dc38adc1522afae501382a65dd633aece00dc0194d7dba693ad5f33407f5f35a6f7e7949
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.7 - 2026-02-18
4
+
5
+ - Fixed Tocbot active indicator color to use al-folio theme color instead of Tocbot default green.
6
+ - Removed extra custom list rail styling from sidebar TOC to avoid duplicated/misaligned ridges.
7
+ - Added frontmatter-driven TOC collapse controls via `toc.collapse` (`expanded` or `auto`) and optional `toc.collapse_depth`.
8
+
9
+ ## 1.0.6 - 2026-02-18
10
+
11
+ - Removed unnecessary navbar menu cross-axis alignment to keep the theme toggle vertically aligned with adjacent controls.
12
+ - Updated Tocbot sidebar styling to a Tocbot-native single-rail hierarchy (with al-folio colors) and removed custom per-link ridge markers.
13
+
3
14
  ## 1.0.5 - 2026-02-18
4
15
 
5
16
  - Restored right-aligned desktop navbar menu layout with explicit core-owned alignment classes.
@@ -23,20 +23,34 @@
23
23
  <!-- Content -->
24
24
  <div class="container mt-5" role="main">
25
25
  {% if page.toc and page.toc.sidebar %}
26
+ {% assign toc_collapse = page.toc.collapse | default: 'expanded' %}
27
+ {% assign toc_collapse_depth = page.toc.collapse_depth | default: '' %}
26
28
  {% if page.toc.sidebar == 'right' %}
27
29
  <div class="row">
28
30
  <!-- main content area -->
29
31
  <div class="col-sm-9">{{ content }}</div>
30
32
  <!-- sidebar, which will move to the top on a small screen -->
31
33
  <div class="col-sm-3">
32
- <nav id="toc-sidebar" class="sticky-top toc toc-sidebar" aria-label="Table of contents"></nav>
34
+ <nav
35
+ id="toc-sidebar"
36
+ class="sticky-top toc toc-sidebar"
37
+ aria-label="Table of contents"
38
+ data-toc-collapse="{{ toc_collapse }}"
39
+ data-toc-collapse-depth="{{ toc_collapse_depth }}"
40
+ ></nav>
33
41
  </div>
34
42
  </div>
35
43
  {% else %}
36
44
  <div class="row">
37
45
  <!-- sidebar, which will move to the top on a small screen -->
38
46
  <div class="col-sm-3">
39
- <nav id="toc-sidebar" class="sticky-top toc toc-sidebar" aria-label="Table of contents"></nav>
47
+ <nav
48
+ id="toc-sidebar"
49
+ class="sticky-top toc toc-sidebar"
50
+ aria-label="Table of contents"
51
+ data-toc-collapse="{{ toc_collapse }}"
52
+ data-toc-collapse-depth="{{ toc_collapse_depth }}"
53
+ ></nav>
40
54
  </div>
41
55
  <!-- main content area -->
42
56
  <div class="col-sm-9">{{ content }}</div>
data/_sass/_navbar.scss CHANGED
@@ -17,7 +17,6 @@
17
17
 
18
18
  .navbar-menu-list {
19
19
  margin-left: auto;
20
- align-items: center;
21
20
  }
22
21
  }
23
22
 
@@ -288,43 +288,36 @@ table[data-toggle="table"].af-table-enhanced tbody tr.af-row-selected {
288
288
  top: 5rem;
289
289
 
290
290
  &.toc > .toc-list {
291
- overflow: hidden;
292
- position: relative;
291
+ overflow: visible;
292
+ padding-left: 0.8rem;
293
293
  }
294
294
 
295
295
  .toc-list {
296
296
  list-style: none;
297
297
  margin: 0;
298
- padding-left: 0.9rem;
298
+ padding-left: 0.8rem;
299
299
  }
300
300
 
301
301
  .toc-list .toc-list {
302
- margin-top: 0.15rem;
303
- margin-left: 0.55rem;
304
- padding-left: 0.8rem;
302
+ margin-top: 0.12rem;
303
+ margin-left: 0;
305
304
  }
306
305
 
307
306
  .toc-link {
308
307
  color: var(--global-text-color);
309
308
  display: block;
310
309
  position: relative;
311
- font-size: 0.78rem;
310
+ font-size: 0.8rem;
312
311
  line-height: 1.4;
313
- margin: 0.12rem 0;
314
- padding: 0.14rem 0.35rem 0.14rem 0.55rem;
315
- border-left: 0;
312
+ margin: 0;
313
+ padding: 0.14rem 0.25rem 0.14rem 0.4rem;
316
314
  transition:
317
315
  color 0.2s ease,
318
316
  font-weight 0.2s ease;
319
317
  transform: none;
320
318
 
321
319
  &::before {
322
- background-color: color-mix(in srgb, var(--global-divider-color) 85%, transparent);
323
- bottom: 0;
324
- left: 0;
325
- margin-top: 0;
326
- top: 0;
327
- width: 2px;
320
+ background-color: color-mix(in srgb, var(--global-divider-color) 80%, transparent) !important;
328
321
  }
329
322
 
330
323
  &:hover {
@@ -333,7 +326,7 @@ table[data-toggle="table"].af-table-enhanced tbody tr.af-row-selected {
333
326
  transform: none;
334
327
 
335
328
  &::before {
336
- background-color: var(--global-hover-color);
329
+ background-color: var(--global-hover-color) !important;
337
330
  }
338
331
  }
339
332
  }
@@ -344,14 +337,14 @@ table[data-toggle="table"].af-table-enhanced tbody tr.af-row-selected {
344
337
  transform: none;
345
338
 
346
339
  &::before {
347
- background-color: var(--global-theme-color);
340
+ background-color: var(--global-theme-color) !important;
348
341
  }
349
342
 
350
343
  &:hover {
351
344
  color: var(--global-hover-color);
352
345
 
353
346
  &::before {
354
- background-color: var(--global-hover-color);
347
+ background-color: var(--global-hover-color) !important;
355
348
  }
356
349
  }
357
350
  }
data/assets/js/common.js CHANGED
@@ -85,6 +85,21 @@ document.addEventListener("DOMContentLoaded", () => {
85
85
  };
86
86
 
87
87
  if (tocSidebar) {
88
+ const resolveTocCollapseDepth = () => {
89
+ const explicitDepth = Number.parseInt(tocSidebar.dataset.tocCollapseDepth || "", 10);
90
+ if (!Number.isNaN(explicitDepth) && explicitDepth >= 0) {
91
+ return explicitDepth;
92
+ }
93
+
94
+ const collapseMode = (tocSidebar.dataset.tocCollapse || "expanded").toLowerCase();
95
+ if (["auto", "scroll", "true", "collapsed"].includes(collapseMode)) {
96
+ // Keep top-level entries visible and expand nested branches while scrolling.
97
+ return 3;
98
+ }
99
+
100
+ return 6;
101
+ };
102
+
88
103
  document.querySelectorAll(".publications h2").forEach((heading) => {
89
104
  heading.setAttribute("data-toc-skip", "");
90
105
  });
@@ -126,7 +141,7 @@ document.addEventListener("DOMContentLoaded", () => {
126
141
  headingSelector: "h2, h3",
127
142
  ignoreSelector: "[data-toc-skip]",
128
143
  hasInnerContainers: true,
129
- collapseDepth: 6,
144
+ collapseDepth: resolveTocCollapseDepth(),
130
145
  orderedList: false,
131
146
  activeLinkClass: "is-active-link",
132
147
  scrollSmooth: true,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AlFolioCore
4
- VERSION = "1.0.5"
4
+ VERSION = "1.0.7"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: al_folio_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - al-folio maintainers