jekyll-theme-zer0 0.2.0 → 0.4.0

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 (56) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +56 -0
  3. data/README.md +455 -417
  4. data/_data/navigation/about.yml +2 -0
  5. data/_data/navigation/main.yml +17 -11
  6. data/_data/navigation/quickstart.yml +12 -0
  7. data/_includes/README.md +97 -0
  8. data/_includes/{info-section.html → components/info-section.html} +4 -4
  9. data/_includes/components/mermaid.html +101 -0
  10. data/_includes/content/giscus.html +60 -0
  11. data/_includes/content/intro.html +66 -0
  12. data/_includes/{sitemap.html → content/sitemap.html} +1 -1
  13. data/_includes/{toc.html → content/toc.html} +1 -1
  14. data/_includes/{branding.html → core/branding.html} +2 -2
  15. data/_includes/core/footer.html +167 -0
  16. data/_includes/core/head.html +163 -0
  17. data/_includes/core/header.html +125 -0
  18. data/_includes/landing/landing-install-cards.html +52 -0
  19. data/_includes/landing/landing-quick-links.html +28 -0
  20. data/_includes/navigation/navbar.html +96 -0
  21. data/_includes/navigation/sidebar-left.html +83 -0
  22. data/_includes/{sidebar-right.html → navigation/sidebar-right.html} +3 -10
  23. data/_layouts/README.md +8 -0
  24. data/_layouts/blog.html +2 -2
  25. data/_layouts/default.html +3 -3
  26. data/_layouts/journals.html +9 -80
  27. data/_layouts/landing.html +122 -45
  28. data/_layouts/root.html +6 -8
  29. data/assets/js/back-to-top.js +16 -19
  30. metadata +44 -69
  31. data/_includes/footer.html +0 -57
  32. data/_includes/giscus.html +0 -16
  33. data/_includes/head.html +0 -95
  34. data/_includes/header.html +0 -79
  35. data/_includes/intro.html +0 -68
  36. data/_includes/navbar.html +0 -34
  37. data/_includes/sidebar-left.html +0 -41
  38. data/_includes/toc +0 -7
  39. data/_layouts/javascript.html +0 -63
  40. /data/_includes/{google-analytics.html → analytics/google-analytics.html} +0 -0
  41. /data/_includes/{google-tag-manager-body.html → analytics/google-tag-manager-body.html} +0 -0
  42. /data/_includes/{google-tag-manager-head.html → analytics/google-tag-manager-head.html} +0 -0
  43. /data/_includes/{dev-shortcuts.html → components/dev-shortcuts.html} +0 -0
  44. /data/_includes/{halfmoon.html → components/halfmoon.html} +0 -0
  45. /data/_includes/{js-cdn.html → components/js-cdn.html} +0 -0
  46. /data/_includes/{powered-by.html → components/powered-by.html} +0 -0
  47. /data/_includes/{quick-index.html → components/quick-index.html} +0 -0
  48. /data/_includes/{searchbar.html → components/searchbar.html} +0 -0
  49. /data/_includes/{svg.html → components/svg.html} +0 -0
  50. /data/_includes/{zer0-env-var.html → components/zer0-env-var.html} +0 -0
  51. /data/_includes/{seo.html → content/seo.html} +0 -0
  52. /data/_includes/{style.html → docs/bootstrap-docs.html} +0 -0
  53. /data/_includes/{breadcrumbs.html → navigation/breadcrumbs.html} +0 -0
  54. /data/_includes/{nav_list.html → navigation/nav_list.html} +0 -0
  55. /data/_includes/{sidebar-categories.html → navigation/sidebar-categories.html} +0 -0
  56. /data/_includes/{sidebar-folders.html → navigation/sidebar-folders.html} +0 -0
@@ -0,0 +1,163 @@
1
+ <!--
2
+ ===================================================================
3
+ HEAD - HTML Document Head Section
4
+ ===================================================================
5
+
6
+ File: head.html
7
+ Path: _includes/head.html
8
+ Purpose: Complete HTML document head section with meta tags, styles,
9
+ and essential JavaScript libraries
10
+
11
+ Template Logic:
12
+ - Loads critical JavaScript libraries before page render
13
+ - Includes SEO optimization and social media meta tags
14
+ - Configures third-party integrations (Analytics, MathJax)
15
+ - Sets up progress bar and UI enhancement scripts
16
+
17
+ Dependencies:
18
+ - seo.html: SEO meta tags and Open Graph data
19
+ - google-analytics.html: Google Analytics tracking
20
+ - google-tag-manager-head.html: GTM head section
21
+
22
+ Performance Notes:
23
+ - Scripts loaded in head for immediate availability
24
+ - MathJax loaded asynchronously to prevent render blocking
25
+ - Nanobar provides visual loading feedback
26
+ ===================================================================
27
+ -->
28
+
29
+ <!-- ================================ -->
30
+ <!-- ANALYTICS AND TRACKING -->
31
+ <!-- ================================ -->
32
+ <!-- Google Tag Manager - Must be in head section for proper tracking -->
33
+ {% include analytics/google-tag-manager-head.html %}
34
+
35
+ <!-- ================================ -->
36
+ <!-- JAVASCRIPT LIBRARIES -->
37
+ <!-- ================================ -->
38
+ <!-- Custom theme JavaScript - Loaded early for UI functionality -->
39
+ <script src="{{ '/assets/js/myScript.js' | relative_url }}"></script>
40
+ <script src="{{ '/assets/js/auto-hide-nav.js' | relative_url }}"></script>
41
+ <script src="{{ '/assets/js/back-to-top.js' | relative_url }}"></script>
42
+ <script src="{{ '/assets/js/halfmoon.js' | relative_url }}"></script>
43
+ <script src="{{ '/assets/js/side-bar-folders.js' | relative_url }}"></script>
44
+ <script src="{{ '/assets/js/code-copy.js' | relative_url }}"></script>
45
+
46
+ <!-- ================================ -->
47
+ <!-- THIRD PARTY INTEGRATIONS -->
48
+ <!-- ================================ -->
49
+
50
+ <!-- Mermaid Diagrams - Conditional loading based on page front matter -->
51
+ {% if page.mermaid %}
52
+ {% include components/mermaid.html %}
53
+ {% endif %}
54
+
55
+ <!-- Nano Progress Bar - Visual loading indicator -->
56
+ <script src="{{'/assets/js/nanobar.min.js' | relative_url }}"></script>
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>
78
+
79
+ <!-- MathJax - Mathematical notation rendering (async for performance) -->
80
+ <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
81
+
82
+ <!-- ================================ -->
83
+ <!-- HTML DOCUMENT META DATA -->
84
+ <!-- ================================ -->
85
+ <!-- Essential meta tags for proper document rendering and mobile support -->
86
+ <meta charset="utf-8">
87
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
88
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
89
+
90
+ <!-- ================================ -->
91
+ <!-- SEO AND SOCIAL MEDIA META TAGS -->
92
+ <!-- ================================ -->
93
+ <!-- Comprehensive SEO optimization including Open Graph and Twitter Cards -->
94
+ {% include content/seo.html %}
95
+
96
+ <!-- ========================== -->
97
+ <!-- STRUCTURED DATA MARKUP -->
98
+ <!-- ========================== -->
99
+ <!-- Enhanced meta data for rich snippets and social media -->
100
+ {% if page.title %}
101
+ <meta itemprop="headline" content="{{ page.title | markdownify | strip_html | strip_newlines | escape_once }}">
102
+ {% endif %}
103
+ {% if page.description %}
104
+ <meta itemprop="description" content="{{ page.description | markdownify | strip_html | strip_newlines | escape_once }}">
105
+ {% elsif page.excerpt %}
106
+ <meta itemprop="description" content="{{ page.excerpt | markdownify | strip_html | strip_newlines | escape_once}} ">
107
+ {% endif %}
108
+ {% if page.date %}
109
+ <meta itemprop="datePublished" content="{{ page.date | date_to_xmlschema }}">
110
+ {% endif %}
111
+ {% if page.last_modified_at %}
112
+ <meta itemprop="dateModified" content="{{ page.lastmod | date_to_xmlschema }}">
113
+ {% endif %}
114
+
115
+ <!-- ========================== -->
116
+ <!-- ANALYTICS INTEGRATION -->
117
+ <!-- ========================== -->
118
+ <!-- Google Analytics tracking - Configured in _config.yml -->
119
+ {% include analytics/google-analytics.html %}
120
+
121
+
122
+ <!-- ================================ -->
123
+ <!-- CSS FRAMEWORKS AND LIBRARIES -->
124
+ <!-- ================================ -->
125
+
126
+ <!-- ========================== -->
127
+ <!-- BOOTSTRAP 5 FRAMEWORK -->
128
+ <!-- ========================== -->
129
+ <!-- Bootstrap 5.3.3 - Primary CSS framework via CDN for performance -->
130
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
131
+
132
+ <!-- Local Bootstrap Installation - Alternative for offline development -->
133
+ <!-- <script src="/assets/js/bootstrap.js"></script> -->
134
+
135
+ <!-- ========================== -->
136
+ <!-- ICON LIBRARIES -->
137
+ <!-- ========================== -->
138
+ <!-- Bootstrap Icons 1.10.3 - Complete icon set for UI elements -->
139
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.3/font/bootstrap-icons.css">
140
+
141
+ <!-- ========================== -->
142
+ <!-- CUSTOM THEME STYLES -->
143
+ <!-- ========================== -->
144
+ <!-- Primary theme stylesheet - Core styling and layout -->
145
+ <link rel="stylesheet" href="{{ '/assets/css/main.css' | relative_url }}">
146
+
147
+ <!-- Custom CSS overrides - Theme customizations and tweaks -->
148
+ <link rel="stylesheet" href="{{'/assets/css/custom.css' | relative_url }}">
149
+
150
+ <!-- Statistics page specific styles -->
151
+ {% if page.layout == 'stats' %}
152
+ <link rel="stylesheet" href="{{ '/assets/css/stats.css' | relative_url }}">
153
+ {% endif %}
154
+
155
+ <!-- ========================== -->
156
+ <!-- EXPERIMENTAL FRAMEWORKS -->
157
+ <!-- ========================== -->
158
+ <!-- Tailwind CSS - Currently disabled, enable for utility-first styling -->
159
+ <!-- <script src="https://cdn.tailwindcss.com"></script> -->
160
+
161
+ <!-- Docs CSS - Alternative stylesheet, currently disabled due to scroll spy issues -->
162
+ <!-- TODO: Replace with compiled Sass when scroll spy functionality is fixed -->
163
+ <!-- <link rel="stylesheet" href="/assets/css/docs.css"> -->
@@ -0,0 +1,125 @@
1
+ <!--
2
+ ===================================================================
3
+ HEADER - Main Navigation and Site Header
4
+ ===================================================================
5
+
6
+ File: header.html
7
+ Path: _includes/header.html
8
+ Purpose: Primary site navigation with responsive design and
9
+ offcanvas mobile menu integration
10
+
11
+ Template Logic:
12
+ - Responsive navigation bar with Bootstrap 5 components
13
+ - Offcanvas sidebars for mobile navigation
14
+ - Brand logo and home navigation integration
15
+ - Settings modal and navigation toggles
16
+
17
+ Dependencies:
18
+ - branding.html: Site title and logo display
19
+ - navbar.html: Main navigation menu items
20
+ - Bootstrap 5 offcanvas and navbar components
21
+
22
+ Responsive Behavior:
23
+ - Desktop: Full horizontal navigation bar
24
+ - Mobile: Collapsed navigation with hamburger menu
25
+ - Offcanvas panels for sidebar and navigation
26
+
27
+ TODO: Fix Nanobar progress bar positioning and animation
28
+ ===================================================================
29
+ -->
30
+
31
+ <header id="navbar" class="container-fluid text-center z-1" role="navigation">
32
+
33
+ <!-- ================================ -->
34
+ <!-- TOP NAVIGATION BAR -->
35
+ <!-- ================================ -->
36
+ <div class="navbar navbar-expand-lg bg-body-tertiary flex-nowrap justify-content-center bottom-shadow">
37
+
38
+ <!-- ========================== -->
39
+ <!-- PROGRESS BAR INDICATOR -->
40
+ <!-- ========================== -->
41
+ <!-- Fixed position progress bar for page loading feedback -->
42
+ <div class="nanobar" id="top-progress-bar" style="position: fixed;">
43
+ <div class="bar"></div>
44
+ </div>
45
+
46
+ <!-- ========================== -->
47
+ <!-- MAIN NAVIGATION CONTAINER -->
48
+ <!-- ========================== -->
49
+ <nav class="container-xl order-2 order-lg-1 grid gap-1">
50
+
51
+ <!-- ========================== -->
52
+ <!-- MOBILE MENU CONTROLS -->
53
+ <!-- ========================== -->
54
+
55
+ <!-- Left Sidebar Toggle - Mobile view only -->
56
+ <div class="bd-navbar-toggle">
57
+ <button class="navbar-toggler p-2"
58
+ type="button"
59
+ data-bs-toggle="offcanvas"
60
+ data-bs-target="#bdSidebar"
61
+ aria-controls="bdSidebar"
62
+ aria-label="Toggle navigation">
63
+ <span class="bi bi-list"></span>
64
+ </button>
65
+ </div>
66
+
67
+ <!-- ========================== -->
68
+ <!-- BRAND AND HOME NAVIGATION -->
69
+ <!-- ========================== -->
70
+ <div class="container d-inline-flex text-center">
71
+ <!-- Home Navigation Button -->
72
+ {%- for home in site.data.navigation.home -%}
73
+ <a class="btn" href="{{ home.url | relative_url }}">
74
+ <i class="{{ site.default_icon}} {{ home.icon }}"></i>
75
+ </a>
76
+ {% endfor %}
77
+
78
+ <!-- Brand Logo Link to Root -->
79
+ <!-- Logo path configured in _config.yml -->
80
+ {% capture logo_path %}{{ site.logo }}{% endcapture %}
81
+ <a class="navbar-brand" href="{{ site.baseurl }}/">
82
+ <img src="{{ logo_path | relative_url }}" alt="Logo" width="30" height="30">
83
+ </a>
84
+ </div>
85
+
86
+ <!-- ========================== -->
87
+ <!-- SITE BRANDING SECTION -->
88
+ <!-- ========================== -->
89
+ <!-- Site title and subtitle display -->
90
+ {% include core/branding.html %}
91
+
92
+ <!-- ========================== -->
93
+ <!-- MAIN NAVIGATION MENU -->
94
+ <!-- ========================== -->
95
+ <!-- Primary navigation items from _data/navigation.yml -->
96
+ {% include navigation/navbar.html %}
97
+
98
+ <!-- ========================== -->
99
+ <!-- UTILITY CONTROLS -->
100
+ <!-- ========================== -->
101
+
102
+ <!-- Settings Modal Toggle -->
103
+ <div class="btn"
104
+ data-bs-toggle="modal"
105
+ data-bs-target="#info-section"
106
+ aria-expanded="false"
107
+ aria-controls="#info-section"
108
+ role="button">
109
+ <i type="button" class="{{site.default_icon}} bi-gear"></i>
110
+ </div>
111
+
112
+ <!-- Navigation Menu Toggle - Mobile view -->
113
+ <div class="bd-navbar-toggle">
114
+ <button class="navbar-toggler p-2"
115
+ type="button"
116
+ data-bs-toggle="offcanvas"
117
+ data-bs-target="#bdNavbar"
118
+ aria-controls="bdNavbar"
119
+ aria-label="Toggle navigation">
120
+ <span class="bi bi-three-dots"></span>
121
+ </button>
122
+ </div>
123
+ </nav>
124
+ </div>
125
+ </header>
@@ -0,0 +1,52 @@
1
+ <!-- Installation method cards; uses site.resources.* and environment where helpful -->
2
+ <div class="row g-4 justify-content-center">
3
+ <div class="col-12 col-sm-10 col-md-6 col-lg-4">
4
+ <div class="card h-100 border-0 shadow-sm">
5
+ <div class="card-header bg-primary text-white">
6
+ <h5 class="card-title mb-0"><i class="bi bi-gem me-2"></i>Ruby Gem</h5>
7
+ </div>
8
+ <div class="card-body p-4 d-flex flex-column text-center">
9
+ <p class="card-text mb-3">Install the theme as a Ruby gem for classic Jekyll workflows.</p>
10
+ <pre class="bg-dark text-light p-3 rounded mb-3 small text-start overflow-auto"><code>gem install {{ site.resources.rubygems.name | default: 'zer0-mistakes' }}</code></pre>
11
+ <a class="btn btn-outline-primary btn-sm mt-auto" href="{{ site.resources.rubygems.url | default: '#' }}" target="_blank" rel="noopener">View on RubyGems</a>
12
+ </div>
13
+ </div>
14
+ </div>
15
+
16
+ <div class="col-12 col-sm-10 col-md-6 col-lg-4">
17
+ <div class="card h-100 border-0 shadow-sm">
18
+ <div class="card-header bg-info text-white">
19
+ <h5 class="card-title mb-0"><i class="bi bi-box-seam me-2"></i>Docker Image</h5>
20
+ </div>
21
+ <div class="card-body p-4 d-flex flex-column text-center">
22
+ <p class="card-text mb-3">Run locally with zero Ruby setup using Docker.</p>
23
+ <pre class="bg-dark text-light p-3 rounded mb-3 small text-start overflow-auto"><code>docker pull {{ site.resources.docker.image | default: 'bamr87/zer0-mistakes' }}
24
+ docker run -p 4000:4000 {{ site.resources.docker.image | default: 'bamr87/zer0-mistakes' }}</code></pre>
25
+ <a class="btn btn-outline-info btn-sm mt-auto" href="{{ site.resources.docker.hub_url | default: '#' }}" target="_blank" rel="noopener">View on Docker Hub</a>
26
+ </div>
27
+ </div>
28
+ </div>
29
+
30
+ <div class="col-12 col-sm-10 col-md-6 col-lg-4">
31
+ <div class="card h-100 border-0 shadow-sm">
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 Repository</h5>
34
+ </div>
35
+ <div class="card-body p-4 d-flex flex-column text-center">
36
+ <p class="card-text mb-3">Improve the theme by forking the repo and opening a PR.</p>
37
+ <pre class="bg-dark text-light p-3 rounded mb-3 small text-start overflow-auto"><code>git clone {{ site.resources.github_repo | default: site.github.repository_url }}
38
+ cd {{ site.local_repo | default: site.repository_name | default: 'repo' }}
39
+ git remote add upstream {{ site.resources.github_repo | default: site.github.repository_url }}
40
+ git checkout -b feature/your-change</code></pre>
41
+ <a class="btn btn-outline-secondary btn-sm mt-auto" href="{{ site.resources.github_fork | default: site.github.repository_url | append: '/fork' }}" target="_blank" rel="noopener">Fork on GitHub</a>
42
+ </div>
43
+ </div>
44
+ </div>
45
+ </div>
46
+
47
+ <!-- Contributing guide call-to-action placed below all cards -->
48
+ <div class="text-center mt-4">
49
+ <a class="btn btn-outline-secondary" href="{{ site.resources.contributing | default: '#' }}" target="_blank" rel="noopener">
50
+ <i class="bi bi-journal-text me-2"></i>Read the Contributing Guide
51
+ </a>
52
+ </div>
@@ -0,0 +1,28 @@
1
+ <!-- Quick Links bar for landing page; uses site.resources config -->
2
+ <div class="bg-dark text-white py-3">
3
+ <div class="container-xl px-4 px-md-5">
4
+ <div class="row g-3 justify-content-center text-center align-items-center">
5
+ <div class="col-6 col-md-3 d-flex justify-content-center">
6
+ <a class="btn btn-outline-light btn-sm w-100" href="{{ site.resources.github_repo | default: site.github.repository_url | default: '/' }}" target="_blank" rel="noopener">
7
+ <i class="bi bi-github me-2"></i> GitHub
8
+ </a>
9
+ </div>
10
+ <div class="col-6 col-md-3 d-flex justify-content-center">
11
+ <a class="btn btn-outline-light btn-sm w-100" href="{{ site.resources.rubygems.url | default: '#' }}" target="_blank" rel="noopener">
12
+ <i class="bi bi-gem me-2"></i> RubyGems
13
+ </a>
14
+ </div>
15
+ <div class="col-6 col-md-3 d-flex justify-content-center">
16
+ <a class="btn btn-outline-light btn-sm w-100" href="{{ site.resources.docker.hub_url | default: '#' }}" target="_blank" rel="noopener">
17
+ <i class="bi bi-box-seam me-2"></i> Docker Hub
18
+ </a>
19
+ </div>
20
+ <div class="col-6 col-md-3 d-flex justify-content-center">
21
+ <a class="btn btn-outline-light btn-sm w-100" href="{{ site.resources.github_fork | default: site.github.repository_url | append: '/fork' }}" target="_blank" rel="noopener">
22
+ <i class="bi bi-git me-2"></i> Fork Project
23
+ </a>
24
+ </div>
25
+ </div>
26
+ </div>
27
+
28
+ </div>
@@ -0,0 +1,96 @@
1
+ <!--
2
+ file: navbar.html
3
+ path: /includes/navbar.html
4
+ includes:
5
+ purpose: Offcanvas main navigation following Bootstrap 5 best practices
6
+ -->
7
+
8
+ <!-- Navigation Links - Offcanvas -->
9
+ <div class="offcanvas offcanvas-end col-lg-2" tabindex="-1" id="bdNavbar" aria-labelledby="mainNavOffcanvasLabel">
10
+
11
+ <!-- Main Navigation Header - Offcanvas -->
12
+ <div class="offcanvas-header border-bottom">
13
+ <h5 class="offcanvas-title" id="mainNavOffcanvasLabel">Main Navigation</h5>
14
+ <button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close" data-bs-target="#bdNavbar"></button>
15
+ </div>
16
+
17
+ <!-- Main Navigation Body - Offcanvas -->
18
+ <div class="offcanvas-body">
19
+ <ul class="navbar-nav justify-content-lg-center text-start flex-grow-1">
20
+ {%- for link in site.data.navigation.main -%}
21
+ {%- assign has_children = link.sublinks and link.sublinks.size > 0 -%}
22
+
23
+ {%- if has_children -%}
24
+ <li class="nav-item dropdown d-flex align-items-center">
25
+ <!-- Parent link navigates directly -->
26
+ <a
27
+ class="nav-link"
28
+ href="{{ link.url | relative_url }}"
29
+ {%- if link.url == page.url -%} aria-current="page"{%- endif -%}
30
+ >
31
+ {{ link.title }}
32
+ </a>
33
+
34
+ <!-- Split toggle opens the dropdown -->
35
+ <a
36
+ class="nav-link dropdown-toggle dropdown-toggle-split ms-2"
37
+ href="#"
38
+ id="dropdown-{{ link.title | slugify }}"
39
+ role="button"
40
+ data-bs-toggle="dropdown"
41
+ aria-expanded="false"
42
+ aria-label="Toggle {{ link.title }} menu"
43
+ >
44
+ <span class="visually-hidden">Toggle dropdown</span>
45
+ </a>
46
+
47
+ <ul class="dropdown-menu dropdown-menu-start w-100" aria-labelledby="dropdown-{{ link.title | slugify }}">
48
+ {%- for sublink in link.sublinks -%}
49
+ <li>
50
+ <a
51
+ class="dropdown-item"
52
+ href="{{ sublink.url | relative_url }}"
53
+ {%- if sublink.url == page.url -%} aria-current="page"{%- endif -%}
54
+ >
55
+ {{ sublink.title }}
56
+ </a>
57
+ </li>
58
+ {%- endfor -%}
59
+ </ul>
60
+ </li>
61
+ {%- else -%}
62
+ <li class="nav-item">
63
+ <a
64
+ class="nav-link"
65
+ href="{{ link.url | relative_url }}"
66
+ {%- if link.url == page.url -%} aria-current="page"{%- endif -%}
67
+ >
68
+ {{ link.title }}
69
+ </a>
70
+ </li>
71
+ {%- endif -%}
72
+ {%- endfor -%}
73
+ </ul>
74
+ </div>
75
+ </div>
76
+
77
+ <!-- Script to handle offcanvas navigation -->
78
+ <script>
79
+ document.addEventListener('DOMContentLoaded', function() {
80
+ // Get all navigation links in the offcanvas
81
+ const offcanvasLinks = document.querySelectorAll('#bdNavbar .nav-link[href]:not(.dropdown-toggle), #bdNavbar .dropdown-item[href]');
82
+
83
+ offcanvasLinks.forEach(link => {
84
+ link.addEventListener('click', function(e) {
85
+ // Allow the navigation to happen
86
+ // Then close the offcanvas after a brief delay
87
+ setTimeout(() => {
88
+ const offcanvas = bootstrap.Offcanvas.getInstance(document.getElementById('bdNavbar'));
89
+ if (offcanvas) {
90
+ offcanvas.hide();
91
+ }
92
+ }, 100);
93
+ });
94
+ });
95
+ });
96
+ </script>
@@ -0,0 +1,83 @@
1
+ <!--
2
+ ===================================================================
3
+ SIDEBAR LEFT - Dynamic Navigation Sidebar
4
+ ===================================================================
5
+
6
+ File: sidebar-left.html
7
+ Path: _includes/sidebar-left.html
8
+ Purpose: Left sidebar navigation with multiple content modes including
9
+ dynamic page listing, category browsing, and manual navigation
10
+
11
+ Template Logic:
12
+ - Responsive offcanvas sidebar for mobile devices
13
+ - Three navigation modes based on page.sidebar.nav:
14
+ * "dynamic": Auto-generated folder structure from pages
15
+ * "searchCats": Category-based navigation from site categories
16
+ * Manual: Predefined navigation from _data files
17
+
18
+ Dependencies:
19
+ - sidebar-folders.html: Dynamic folder structure generation
20
+ - sidebar-categories.html: Category-based navigation
21
+ - nav_list.html: Manual navigation list rendering
22
+ - Bootstrap 5 offcanvas component
23
+
24
+ Navigation Modes:
25
+ 1. Dynamic: Scans site.pages for index.md files to build folder structure
26
+ 2. Categories: Groups content by Jekyll categories
27
+ 3. Manual: Uses predefined navigation from _data/navigation.yml
28
+ ===================================================================
29
+ -->
30
+
31
+ <!-- ================================ -->
32
+ <!-- SIDEBAR NAVIGATION CONTAINER -->
33
+ <!-- ================================ -->
34
+ <!-- Responsive offcanvas sidebar - full-width on mobile, fixed on desktop -->
35
+ <div class="offcanvas-lg offcanvas-start" tabindex="-1" id="bdSidebar" aria-labelledby="bdSidebarOffcanvasLabel">
36
+
37
+ <!-- ========================== -->
38
+ <!-- SIDEBAR HEADER -->
39
+ <!-- ========================== -->
40
+ <!-- Mobile-only header with close button -->
41
+ <div class="offcanvas-header border-bottom">
42
+ <h5 class="offcanvas-title" id="bdSidebarOffcanvasLabel">Browse docs</h5>
43
+ <button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close" data-bs-target="#bdSidebar"></button>
44
+ </div>
45
+
46
+ <!-- ========================== -->
47
+ <!-- SIDEBAR CONTENT AREA -->
48
+ <!-- ========================== -->
49
+ <!-- Scrollable content area with dynamic navigation options -->
50
+ <div class="offcanvas-body overflow-auto">
51
+
52
+ <!-- ========================== -->
53
+ <!-- DYNAMIC PAGE LISTING -->
54
+ <!-- ========================== -->
55
+ <!-- Auto-generates folder structure from pages containing index.md -->
56
+ {% if page.sidebar.nav == "dynamic" %}
57
+ <div class="list-group" id="sidebar-content">
58
+ {% assign folders = site.pages | where_exp: "item", "item.path contains 'index.md'" | sort: 'path' %}
59
+ {% include navigation/sidebar-folders.html folders=folders %}
60
+ </div>
61
+
62
+ <!-- ========================== -->
63
+ <!-- CATEGORY-BASED NAVIGATION -->
64
+ <!-- ========================== -->
65
+ <!-- Creates navigation from Jekyll post/page categories -->
66
+ {% elsif page.sidebar.nav == "searchCats" %}
67
+ <div class="list-group" id="sidebar-content">
68
+ {% assign categories = site.categories | sort %}
69
+ {% include navigation/sidebar-categories.html categories=categories %}
70
+ </div>
71
+
72
+ <!-- ========================== -->
73
+ <!-- MANUAL NAVIGATION LIST -->
74
+ <!-- ========================== -->
75
+ <!-- Uses predefined navigation structure from _data files -->
76
+ {% elsif page.sidebar.nav %}
77
+ <nav class="w-100">
78
+ {% include navigation/nav_list.html nav=page.sidebar.nav %}
79
+ </nav>
80
+ {% endif %}
81
+
82
+ </div>
83
+ </div>
@@ -1,7 +1,7 @@
1
1
  <!--
2
2
  file: sidebar-right.html
3
3
  path: _includes/sidebar-right.html
4
- includes: nav_list.html, toc.html
4
+ includes: nav_list.html, content/toc.html
5
5
  -->
6
6
 
7
7
  <!-- TOC button in mobile view -->
@@ -32,16 +32,9 @@
32
32
  <!-- TOC list -->
33
33
 
34
34
  <!-- TOC list -->
35
- {% include toc.html sanitize=true html=content h_min=1 h_max=3 class="list-group-flush" item_class="list-group-item" anchor_class="" skip_no_ids=true %}
35
+ {% include content/toc.html sanitize=true html=content h_min=1 h_max=3 class="list-group-flush" item_class="list-group-item" anchor_class="" skip_no_ids=true %}
36
36
  </nav>
37
37
  </div>
38
38
  </div>
39
- <!-- Back to Top -->
40
- <div>
41
- <button onclick="topFunction()" id="backToTopBtn" title="Go to top">
42
- <span class="arrow">&uarr;</span>
43
- <span class="text">Back to Top</span>
44
- </button>
45
- </div>
39
+
46
40
 
47
-
data/_layouts/README.md CHANGED
@@ -15,6 +15,7 @@ root.html (base template)
15
15
  ├── home.html (homepage)
16
16
  ├── blog.html (blog homepage)
17
17
  ├── landing.html (landing pages)
18
+ ├── stats.html (statistics dashboard)
18
19
  └── index.html (search pages)
19
20
  ```
20
21
 
@@ -82,6 +83,13 @@ root.html (base template)
82
83
  - **Dependencies**: Search engine integration
83
84
  - **Usage**: Search results, site indexes
84
85
 
86
+ #### `stats.html`
87
+
88
+ - **Purpose**: Statistics and analytics dashboard
89
+ - **Features**: Full-width responsive layout, modular statistics components
90
+ - **Dependencies**: Bootstrap 5, Bootstrap Icons, Jekyll data files
91
+ - **Usage**: Site analytics, content metrics, performance dashboards
92
+
85
93
  #### `javascript.html`
86
94
 
87
95
  - **Purpose**: JavaScript demonstration pages
data/_layouts/blog.html CHANGED
@@ -82,7 +82,7 @@ source: "https://getbootstrap.com/docs/5.3/examples/blog/#"
82
82
  <div class="nav-scroller py-1 mb-3 border-bottom">
83
83
  <nav class="nav nav-underline justify-content-between">
84
84
  {% for item in site.data.navigation.posts %}
85
- <a class="nav-item nav-link link-body-emphasis" href="{{ item.url }}">
85
+ <a class="nav-item nav-link link-body-emphasis" href="{{ item.url | relative_url }}">
86
86
  {{ item.title }}
87
87
  </a>
88
88
  {% endfor %}
@@ -257,7 +257,7 @@ source: "https://getbootstrap.com/docs/5.3/examples/blog/#"
257
257
 
258
258
  <!-- Categories Section -->
259
259
  <div class="p-4">
260
- {% include sidebar-categories.html %}
260
+ {% include navigation/sidebar-categories.html %}
261
261
  </div>
262
262
 
263
263
  <!-- External Links Section -->
@@ -54,7 +54,7 @@ layout: root
54
54
  <!-- ================================ -->
55
55
  <!-- Site navigation, content outline, and offcanvas menu for mobile -->
56
56
  <aside class="bd-sidebar">
57
- {% include sidebar-left.html %}
57
+ {% include navigation/sidebar-left.html %}
58
58
  </aside>
59
59
 
60
60
  <!-- ================================ -->
@@ -64,14 +64,14 @@ layout: root
64
64
  <main class="bd-main order-1" data-spy="scroll" data-bs-target="toc-content" data-offset="0">
65
65
 
66
66
  <!-- Page introduction: title, breadcrumbs, metadata -->
67
- {% include intro.html %}
67
+ {% include content/intro.html %}
68
68
 
69
69
  <!-- =============================== -->
70
70
  <!-- RIGHT SIDEBAR - Table of Contents -->
71
71
  <!-- =============================== -->
72
72
  <!-- Page outline, shortcuts, and related links (hidden on mobile) -->
73
73
  <div class="bd-toc text-body-secondary">
74
- {% include sidebar-right.html %}
74
+ {% include navigation/sidebar-right.html %}
75
75
  </div>
76
76
 
77
77
  <!-- =============================== -->