jekyll-theme-zer0 0.22.5 → 0.22.20
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/CHANGELOG.md +196 -0
- data/README.md +66 -19
- data/_data/navigation/admin.yml +53 -0
- data/_data/theme_backgrounds.yml +121 -0
- data/_includes/components/admin-tabs.html +59 -0
- data/_includes/components/analytics-dashboard.html +232 -0
- data/_includes/components/background-customizer.html +159 -0
- data/_includes/components/background-settings.html +137 -0
- data/_includes/components/collection-manager.html +151 -0
- data/_includes/components/component-showcase.html +452 -0
- data/_includes/components/config-editor.html +207 -0
- data/_includes/components/config-viewer.html +479 -0
- data/_includes/components/cookie-consent.html +35 -100
- data/_includes/components/env-dashboard.html +154 -0
- data/_includes/components/feature-card.html +94 -0
- data/_includes/components/info-section.html +172 -149
- data/_includes/components/js-cdn.html +4 -1
- data/_includes/components/nanobar.html +117 -0
- data/_includes/components/nav-editor.html +99 -0
- data/_includes/components/setup-banner.html +28 -0
- data/_includes/components/setup-check.html +53 -0
- data/_includes/components/svg-background.html +42 -0
- data/_includes/components/theme-customizer.html +46 -0
- data/_includes/content/seo.html +68 -135
- data/_includes/core/footer.html +10 -12
- data/_includes/core/head.html +7 -27
- data/_includes/core/header.html +30 -17
- data/_includes/landing/landing-install-cards.html +18 -7
- data/_includes/navigation/admin-nav.html +95 -0
- data/_includes/navigation/navbar.html +45 -6
- data/_includes/navigation/sidebar-left.html +1 -1
- data/_includes/setup/wizard.html +330 -0
- data/_layouts/admin.html +166 -0
- data/_layouts/landing.html +15 -9
- data/_layouts/root.html +12 -6
- data/_layouts/setup.html +73 -0
- data/_plugins/preview_image_generator.rb +26 -12
- data/_sass/core/_navbar.scss +8 -2
- data/_sass/custom.scss +65 -10
- data/_sass/theme/_background-mixins.scss +95 -0
- data/_sass/theme/_backgrounds.scss +156 -0
- data/_sass/theme/_color-modes.scss +2 -1
- data/assets/backgrounds/gradients/air.svg +15 -0
- data/assets/backgrounds/gradients/aqua.svg +15 -0
- data/assets/backgrounds/gradients/contrast.svg +15 -0
- data/assets/backgrounds/gradients/dark.svg +15 -0
- data/assets/backgrounds/gradients/dirt.svg +15 -0
- data/assets/backgrounds/gradients/mint.svg +15 -0
- data/assets/backgrounds/gradients/neon.svg +15 -0
- data/assets/backgrounds/gradients/plum.svg +15 -0
- data/assets/backgrounds/gradients/sunrise.svg +15 -0
- data/assets/backgrounds/noise/air.svg +8 -0
- data/assets/backgrounds/noise/aqua.svg +8 -0
- data/assets/backgrounds/noise/contrast.svg +8 -0
- data/assets/backgrounds/noise/dark.svg +8 -0
- data/assets/backgrounds/noise/dirt.svg +8 -0
- data/assets/backgrounds/noise/mint.svg +8 -0
- data/assets/backgrounds/noise/neon.svg +8 -0
- data/assets/backgrounds/noise/plum.svg +8 -0
- data/assets/backgrounds/noise/sunrise.svg +8 -0
- data/assets/backgrounds/patterns/air.svg +7 -0
- data/assets/backgrounds/patterns/aqua.svg +7 -0
- data/assets/backgrounds/patterns/contrast.svg +4 -0
- data/assets/backgrounds/patterns/dark.svg +5 -0
- data/assets/backgrounds/patterns/dirt.svg +5 -0
- data/assets/backgrounds/patterns/mint.svg +6 -0
- data/assets/backgrounds/patterns/neon.svg +6 -0
- data/assets/backgrounds/patterns/plum.svg +6 -0
- data/assets/backgrounds/patterns/sunrise.svg +5 -0
- data/assets/js/background-customizer.js +73 -0
- data/assets/js/code-copy.js +18 -47
- data/assets/js/config-utility.js +307 -0
- data/assets/js/nanobar-init.js +63 -0
- data/assets/js/nav-editor.js +39 -0
- data/assets/js/palette-generator.js +415 -0
- data/assets/js/search-modal.js +31 -11
- data/assets/js/setup-wizard.js +306 -0
- data/assets/js/skin-editor.js +645 -0
- data/assets/js/theme-customizer.js +102 -0
- data/assets/js/ui-enhancements.js +2 -24
- data/assets/vendor/bootstrap/css/bootstrap.min.css +1 -0
- data/assets/vendor/bootstrap/js/bootstrap.bundle.min.js +1 -0
- data/scripts/README.md +45 -0
- data/scripts/features/generate-preview-images +297 -7
- data/scripts/features/install-preview-generator +51 -33
- data/scripts/fork-cleanup.sh +92 -19
- data/scripts/github-setup.sh +284 -0
- data/scripts/init_setup.sh +0 -1
- data/scripts/lib/frontmatter.sh +543 -0
- data/scripts/lib/migrate.sh +265 -0
- data/scripts/lib/preview_generator.py +607 -32
- data/scripts/lint-pages +508 -0
- data/scripts/migrate.sh +201 -0
- data/scripts/platform/setup-linux.sh +244 -0
- data/scripts/platform/setup-macos.sh +187 -0
- data/scripts/platform/setup-wsl.sh +196 -0
- metadata +73 -6
data/_includes/core/head.html
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
- Loads critical JavaScript libraries before page render
|
|
13
13
|
- Includes SEO optimization and social media meta tags
|
|
14
14
|
- Configures third-party integrations (Analytics, MathJax)
|
|
15
|
-
- Sets up progress bar
|
|
15
|
+
- Sets up progress bar via components/nanobar.html include
|
|
16
16
|
|
|
17
17
|
Dependencies:
|
|
18
18
|
- seo.html: SEO meta tags and Open Graph data
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
Performance Notes:
|
|
23
23
|
- Scripts loaded in head for immediate availability
|
|
24
24
|
- MathJax loaded asynchronously to prevent render blocking
|
|
25
|
-
- Nanobar provides visual loading feedback
|
|
25
|
+
- Nanobar provides visual loading feedback (see components/nanobar.html)
|
|
26
26
|
===================================================================
|
|
27
27
|
-->
|
|
28
28
|
|
|
@@ -52,29 +52,8 @@
|
|
|
52
52
|
{% include components/mermaid.html %}
|
|
53
53
|
{% endif %}
|
|
54
54
|
|
|
55
|
-
<!-- Nano Progress Bar - Visual loading indicator -->
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
<!-- Progress Bar Initialization - Creates visual loading feedback -->
|
|
59
|
-
<script>
|
|
60
|
-
// Wait for DOM to be ready before initializing Nanobar
|
|
61
|
-
document.addEventListener('DOMContentLoaded', function() {
|
|
62
|
-
// Check if the progress bar element exists before initializing
|
|
63
|
-
var progressElement = document.getElementById('top-progress-bar');
|
|
64
|
-
if (progressElement) {
|
|
65
|
-
var options = {
|
|
66
|
-
classname: 'nanobar',
|
|
67
|
-
id: 'top-progress-bar'
|
|
68
|
-
};
|
|
69
|
-
var nanobar = new Nanobar(options);
|
|
70
|
-
nanobar.go( 30 ); // Initial loading state
|
|
71
|
-
nanobar.go( 76 ); // Partial completion
|
|
72
|
-
nanobar.go(100); // Complete loading
|
|
73
|
-
} else {
|
|
74
|
-
console.warn('Progress bar element #top-progress-bar not found. Skipping Nanobar initialization.');
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
</script>
|
|
55
|
+
<!-- Nano Progress Bar - Visual loading indicator (config-driven) -->
|
|
56
|
+
{% include components/nanobar.html %}
|
|
78
57
|
|
|
79
58
|
<!-- MathJax - Mathematical notation rendering (async; bundled under assets/vendor) -->
|
|
80
59
|
<script id="MathJax-script" async src="{{ '/assets/vendor/mathjax/es5/tex-mml-chtml.js' | relative_url }}"></script>
|
|
@@ -88,9 +67,10 @@
|
|
|
88
67
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
89
68
|
|
|
90
69
|
<!-- ================================ -->
|
|
91
|
-
<!-- SEO
|
|
70
|
+
<!-- SEO SUPPLEMENT -->
|
|
92
71
|
<!-- ================================ -->
|
|
93
|
-
<!--
|
|
72
|
+
<!-- Additional SEO tags not covered by jekyll-seo-tag plugin ( in root.html).
|
|
73
|
+
Outputs custom og:image with assets_prefix normalisation and non-Google site verification. -->
|
|
94
74
|
{% include content/seo.html %}
|
|
95
75
|
|
|
96
76
|
<!-- ========================== -->
|
data/_includes/core/header.html
CHANGED
|
@@ -30,7 +30,10 @@
|
|
|
30
30
|
- ARIA labels for screen readers
|
|
31
31
|
- Focus management for offcanvas
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
Nanobar:
|
|
34
|
+
- Configured via `site.nanobar.*` in _config.yml
|
|
35
|
+
- When `position: navbar`, the bar mounts inside `#top-progress-target` below
|
|
36
|
+
- Otherwise it floats fixed to the viewport (top or bottom)
|
|
34
37
|
===================================================================
|
|
35
38
|
-->
|
|
36
39
|
|
|
@@ -48,15 +51,7 @@
|
|
|
48
51
|
<!-- TOP NAVIGATION BAR -->
|
|
49
52
|
<!-- ================================ -->
|
|
50
53
|
<div class="navbar navbar-expand-lg bg-body-tertiary flex-nowrap justify-content-center bottom-shadow">
|
|
51
|
-
|
|
52
|
-
<!-- ========================== -->
|
|
53
|
-
<!-- PROGRESS BAR INDICATOR -->
|
|
54
|
-
<!-- ========================== -->
|
|
55
|
-
<!-- Fixed position progress bar for page loading feedback -->
|
|
56
|
-
<div class="nanobar" id="top-progress-bar" style="position: fixed;" role="progressbar" aria-label="Page loading progress" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">
|
|
57
|
-
<div class="bar"></div>
|
|
58
|
-
</div>
|
|
59
|
-
|
|
54
|
+
|
|
60
55
|
<!-- ========================== -->
|
|
61
56
|
<!-- MAIN NAVIGATION CONTAINER -->
|
|
62
57
|
<!-- ========================== -->
|
|
@@ -105,11 +100,18 @@
|
|
|
105
100
|
<div class="navbar-brand-group d-inline-flex align-items-center gap-2">
|
|
106
101
|
<!-- Home Navigation Button (Desktop only) -->
|
|
107
102
|
<div class="navbar-home-links d-none d-lg-inline-flex" role="navigation" aria-label="Quick navigation">
|
|
108
|
-
{%-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
103
|
+
{%- assign nav_home = site.data.navigation.home -%}
|
|
104
|
+
{%- if nav_home and nav_home.size > 0 -%}
|
|
105
|
+
{%- for home in nav_home -%}
|
|
106
|
+
<a class="btn" href="{{ home.url | relative_url }}" aria-label="{{ home.title }}" title="{{ home.title }}" {%- if home.url == page.url %} aria-current="page"{% endif %}>
|
|
107
|
+
<i class="{{ site.default_icon}} {{ home.icon }}"></i>
|
|
108
|
+
</a>
|
|
109
|
+
{%- endfor -%}
|
|
110
|
+
{%- else -%}
|
|
111
|
+
<a class="btn" href="{{ '/' | relative_url }}" aria-label="Home" title="Home — {{ site.title }}">
|
|
112
|
+
<i class="{{ site.default_icon }} bi-house"></i>
|
|
113
|
+
</a>
|
|
114
|
+
{%- endif -%}
|
|
113
115
|
</div>
|
|
114
116
|
|
|
115
117
|
<!-- Brand Logo Link to Root -->
|
|
@@ -151,11 +153,11 @@
|
|
|
151
153
|
<span class="nav-link-text d-none d-xl-inline ms-1">Search</span>
|
|
152
154
|
</button>
|
|
153
155
|
|
|
154
|
-
<!-- Settings
|
|
156
|
+
<!-- Settings Offcanvas Toggle -->
|
|
155
157
|
<button
|
|
156
158
|
class="btn nav-settings-button d-none d-lg-inline-flex"
|
|
157
159
|
type="button"
|
|
158
|
-
data-bs-toggle="
|
|
160
|
+
data-bs-toggle="offcanvas"
|
|
159
161
|
data-bs-target="#info-section"
|
|
160
162
|
aria-label="Open settings"
|
|
161
163
|
aria-haspopup="dialog"
|
|
@@ -179,4 +181,15 @@
|
|
|
179
181
|
</div>
|
|
180
182
|
</nav>
|
|
181
183
|
</div>
|
|
184
|
+
|
|
185
|
+
<!-- ========================== -->
|
|
186
|
+
<!-- PROGRESS BAR MOUNT POINT -->
|
|
187
|
+
<!-- ========================== -->
|
|
188
|
+
<!-- Nanobar mounts here when site.nanobar.position == "navbar" so the bar
|
|
189
|
+
renders as a thin strip directly under the header. For "top" / "bottom"
|
|
190
|
+
the bar floats fixed to the viewport and no mount is needed. -->
|
|
191
|
+
{%- assign _nb_pos = site.nanobar.position | default: "top" -%}
|
|
192
|
+
{%- if site.nanobar.enabled != false and _nb_pos == "navbar" -%}
|
|
193
|
+
<div id="top-progress-target" class="nanobar-mount" aria-hidden="true"></div>
|
|
194
|
+
{%- endif -%}
|
|
182
195
|
</header>
|
|
@@ -30,15 +30,26 @@ docker run -p 4000:4000 {{ site.resources.docker.image | default: '' | join: ''
|
|
|
30
30
|
<div class="col-12 col-sm-10 col-md-6 col-lg-4">
|
|
31
31
|
<div class="card h-100 border-0 shadow-sm">
|
|
32
32
|
<div class="card-header bg-secondary text-white">
|
|
33
|
-
<h5 class="card-title mb-0"><i class="bi bi-git me-2"></i>Fork
|
|
33
|
+
<h5 class="card-title mb-0"><i class="bi bi-git me-2"></i>Fork & Deploy</h5>
|
|
34
34
|
</div>
|
|
35
35
|
<div class="card-body p-4 d-flex flex-column text-center">
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
{% assign github_fork_base = site.resources.github_fork | default: site.github.repository_url | join: '' %}
|
|
37
|
+
{% assign github_fork_suffix = github_fork_base | slice: -5, 5 %}
|
|
38
|
+
{% if github_fork_suffix == '/fork' %}
|
|
39
|
+
{% assign github_fork_url = github_fork_base %}
|
|
40
|
+
{% else %}
|
|
41
|
+
{% assign github_fork_url = github_fork_base | append: '/fork' %}
|
|
42
|
+
{% endif %}
|
|
43
|
+
<p class="card-text mb-3">Fork into <code><username>.github.io</code> for a personal site in minutes.</p>
|
|
44
|
+
<ol class="text-start small mb-3">
|
|
45
|
+
<li>Fork <a href="{{ github_fork_url }}" target="_blank" rel="noopener">bamr87/zer0-mistakes</a></li>
|
|
46
|
+
<li>Name it <code><your-username>.github.io</code></li>
|
|
47
|
+
<li>Enable GitHub Pages in Settings</li>
|
|
48
|
+
</ol>
|
|
49
|
+
<pre class="bg-dark text-light p-3 rounded mb-3 small text-start overflow-auto"><code>git clone https://github.com/<you>/<you>.github.io.git
|
|
50
|
+
cd <you>.github.io
|
|
51
|
+
./scripts/fork-cleanup.sh</code></pre>
|
|
52
|
+
<a class="btn btn-outline-secondary btn-sm mt-auto" href="{{ github_fork_url }}" target="_blank" rel="noopener">Fork on GitHub</a>
|
|
42
53
|
</div>
|
|
43
54
|
</div>
|
|
44
55
|
</div>
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
===================================================================
|
|
3
|
+
ADMIN NAV — Data-driven sidebar navigation for admin/settings pages
|
|
4
|
+
===================================================================
|
|
5
|
+
|
|
6
|
+
File: admin-nav.html
|
|
7
|
+
Path: _includes/navigation/admin-nav.html
|
|
8
|
+
Purpose: Renders a vertical nav list for administrative pages.
|
|
9
|
+
Items are read from _data/navigation/admin.yml.
|
|
10
|
+
Highlights the active page based on page.url or
|
|
11
|
+
page.admin_section matching.
|
|
12
|
+
|
|
13
|
+
Dependencies: Bootstrap 5 nav component, Bootstrap Icons,
|
|
14
|
+
_data/navigation/admin.yml
|
|
15
|
+
Used by: _layouts/admin.html
|
|
16
|
+
===================================================================
|
|
17
|
+
-->
|
|
18
|
+
|
|
19
|
+
{% assign current_path = page.url %}
|
|
20
|
+
{% assign admin_items = site.data.navigation.admin %}
|
|
21
|
+
|
|
22
|
+
<ul class="nav nav-pills flex-column">
|
|
23
|
+
|
|
24
|
+
{% assign rendered_separator = false %}
|
|
25
|
+
{% for item in admin_items %}
|
|
26
|
+
|
|
27
|
+
{% if item.external and rendered_separator == false %}
|
|
28
|
+
{% assign rendered_separator = true %}
|
|
29
|
+
<li role="separator"><hr class="my-2"></li>
|
|
30
|
+
{% endif %}
|
|
31
|
+
|
|
32
|
+
{% comment %} Active detection: exact URL match or admin_section match {% endcomment %}
|
|
33
|
+
{% assign is_active = false %}
|
|
34
|
+
{% if current_path == item.url %}
|
|
35
|
+
{% assign is_active = true %}
|
|
36
|
+
{% elsif page.admin_section and page.admin_section == item.title %}
|
|
37
|
+
{% assign is_active = true %}
|
|
38
|
+
{% endif %}
|
|
39
|
+
|
|
40
|
+
{% comment %} Dynamic badges when no static badge is set {% endcomment %}
|
|
41
|
+
{% assign dynamic_badge = nil %}
|
|
42
|
+
{% assign badge_class = "bg-secondary" %}
|
|
43
|
+
{% unless item.badge or item.external %}
|
|
44
|
+
{% if item.url == "/about/settings/collections/" %}
|
|
45
|
+
{% assign dynamic_badge = site.collections | size %}
|
|
46
|
+
{% elsif item.url == "/about/settings/analytics/" %}
|
|
47
|
+
{% if site.posthog.enabled %}
|
|
48
|
+
{% assign dynamic_badge = "On" %}
|
|
49
|
+
{% assign badge_class = "bg-success" %}
|
|
50
|
+
{% else %}
|
|
51
|
+
{% assign dynamic_badge = "Off" %}
|
|
52
|
+
{% assign badge_class = "bg-secondary" %}
|
|
53
|
+
{% endif %}
|
|
54
|
+
{% elsif item.url == "/about/settings/environment/" %}
|
|
55
|
+
{% if jekyll.environment == "production" %}
|
|
56
|
+
{% assign dynamic_badge = "Prod" %}
|
|
57
|
+
{% assign badge_class = "bg-success" %}
|
|
58
|
+
{% else %}
|
|
59
|
+
{% assign dynamic_badge = "Dev" %}
|
|
60
|
+
{% assign badge_class = "bg-warning text-dark" %}
|
|
61
|
+
{% endif %}
|
|
62
|
+
{% endif %}
|
|
63
|
+
{% endunless %}
|
|
64
|
+
|
|
65
|
+
<li class="nav-item">
|
|
66
|
+
{% if item.external %}
|
|
67
|
+
{% comment %} Resolve placeholder tokens for external URLs {% endcomment %}
|
|
68
|
+
{% assign resolved_url = item.url
|
|
69
|
+
| replace: '{github_user}', site.github_user
|
|
70
|
+
| replace: '{repository_name}', site.repository_name %}
|
|
71
|
+
<a class="nav-link d-flex align-items-center text-body-secondary"
|
|
72
|
+
href="{{ resolved_url }}"
|
|
73
|
+
target="_blank" rel="noopener">
|
|
74
|
+
<i class="{{ item.icon }} me-2"></i>
|
|
75
|
+
{{ item.title }}
|
|
76
|
+
<i class="bi bi-box-arrow-up-right ms-auto small"></i>
|
|
77
|
+
</a>
|
|
78
|
+
{% else %}
|
|
79
|
+
<a class="nav-link d-flex align-items-center{% if is_active %} active{% endif %}"
|
|
80
|
+
href="{{ item.url | relative_url }}"
|
|
81
|
+
{% if item.description %}title="{{ item.description }}"{% endif %}>
|
|
82
|
+
<i class="{{ item.icon }} me-2"></i>
|
|
83
|
+
{{ item.title }}
|
|
84
|
+
{% if item.badge %}
|
|
85
|
+
<span class="badge bg-secondary ms-auto">{{ item.badge }}</span>
|
|
86
|
+
{% elsif dynamic_badge %}
|
|
87
|
+
<span class="badge {{ badge_class }} ms-auto">{{ dynamic_badge }}</span>
|
|
88
|
+
{% endif %}
|
|
89
|
+
</a>
|
|
90
|
+
{% endif %}
|
|
91
|
+
</li>
|
|
92
|
+
|
|
93
|
+
{% endfor %}
|
|
94
|
+
|
|
95
|
+
</ul>
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
with hover-activated dropdowns for desktop and accessible interactions
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
|
-
<!-- Navigation Links - Offcanvas -->
|
|
10
|
-
<div class="offcanvas offcanvas-end
|
|
9
|
+
<!-- Navigation Links - Responsive Offcanvas (inline at lg+, offcanvas below) -->
|
|
10
|
+
<div class="offcanvas-lg offcanvas-end" tabindex="-1" id="bdNavbar" aria-labelledby="mainNavOffcanvasLabel">
|
|
11
11
|
|
|
12
12
|
<!-- Main Navigation Header - Offcanvas -->
|
|
13
13
|
<div class="offcanvas-header border-bottom">
|
|
@@ -26,8 +26,19 @@
|
|
|
26
26
|
Home
|
|
27
27
|
</a>
|
|
28
28
|
</li>
|
|
29
|
-
{%-
|
|
29
|
+
{%- comment -%}
|
|
30
|
+
Navigation: data-driven when _data/navigation/main.yml exists;
|
|
31
|
+
otherwise auto-generated from site.collections as a fallback so
|
|
32
|
+
a consumer repo needs only markdown files and _config.yml.
|
|
33
|
+
Exclude a collection from auto-nav by setting nav_exclude: true
|
|
34
|
+
under its entry in _config.yml collections:.
|
|
35
|
+
{%- endcomment -%}
|
|
36
|
+
{%- assign nav_main = site.data.navigation.main -%}
|
|
37
|
+
{%- if nav_main and nav_main.size > 0 -%}
|
|
38
|
+
|
|
39
|
+
{%- for link in nav_main -%}
|
|
30
40
|
{%- assign has_children = link.children and link.children.size > 0 -%}
|
|
41
|
+
{%- assign items_remaining = nav_main.size | minus: forloop.index -%}
|
|
31
42
|
|
|
32
43
|
{%- if has_children -%}
|
|
33
44
|
<li class="nav-item dropdown d-flex align-items-center nav-hover-dropdown" role="none">
|
|
@@ -59,7 +70,7 @@
|
|
|
59
70
|
<span class="visually-hidden">Toggle {{ link.title }} submenu</span>
|
|
60
71
|
</button>
|
|
61
72
|
|
|
62
|
-
<ul class="dropdown-menu dropdown-menu-start" aria-labelledby="dropdown-{{ link.title | slugify }}" role="menu">
|
|
73
|
+
<ul class="dropdown-menu {% if items_remaining < 2 %}dropdown-menu-end{% else %}dropdown-menu-start{% endif %}" aria-labelledby="dropdown-{{ link.title | slugify }}" role="menu">
|
|
63
74
|
{%- for child in link.children -%}
|
|
64
75
|
<li role="none">
|
|
65
76
|
<a
|
|
@@ -93,7 +104,35 @@
|
|
|
93
104
|
</a>
|
|
94
105
|
</li>
|
|
95
106
|
{%- endif -%}
|
|
96
|
-
|
|
107
|
+
{%- endfor -%}
|
|
108
|
+
|
|
109
|
+
{%- else -%}
|
|
110
|
+
{%- comment -%}
|
|
111
|
+
Dynamic navigation: one nav item per collection that has output
|
|
112
|
+
documents. The "pages" collection is skipped (structural only).
|
|
113
|
+
Set nav_exclude: true on a collection in _config.yml to hide it.
|
|
114
|
+
{%- endcomment -%}
|
|
115
|
+
{%- for collection in site.collections -%}
|
|
116
|
+
{%- unless collection.label == "pages" or collection.nav_exclude -%}
|
|
117
|
+
{%- if collection.docs.size > 0 -%}
|
|
118
|
+
{%- assign col_title = collection.label | replace: "-", " " | replace: "_", " " | capitalize -%}
|
|
119
|
+
{%- assign col_url = "/" | append: collection.label | append: "/" -%}
|
|
120
|
+
<li class="nav-item" role="none">
|
|
121
|
+
<a
|
|
122
|
+
class="nav-link"
|
|
123
|
+
href="{{ col_url | relative_url }}"
|
|
124
|
+
role="menuitem"
|
|
125
|
+
title="{{ col_title }}"
|
|
126
|
+
{%- if page.collection == collection.label -%} aria-current="page"{%- endif -%}
|
|
127
|
+
>
|
|
128
|
+
<span class="nav-link-text">{{ col_title }}</span>
|
|
129
|
+
</a>
|
|
130
|
+
</li>
|
|
131
|
+
{%- endif -%}
|
|
132
|
+
{%- endunless -%}
|
|
133
|
+
{%- endfor -%}
|
|
134
|
+
|
|
135
|
+
{%- endif -%}
|
|
97
136
|
<li class="nav-item d-lg-none" role="none">
|
|
98
137
|
<button
|
|
99
138
|
class="nav-link btn btn-link text-start w-100"
|
|
@@ -110,7 +149,7 @@
|
|
|
110
149
|
<button
|
|
111
150
|
class="nav-link btn btn-link text-start w-100"
|
|
112
151
|
type="button"
|
|
113
|
-
data-bs-toggle="
|
|
152
|
+
data-bs-toggle="offcanvas"
|
|
114
153
|
data-bs-target="#info-section"
|
|
115
154
|
aria-controls="info-section"
|
|
116
155
|
aria-haspopup="dialog"
|