jekyll-theme-zer0 0.16.0 → 0.17.2

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 (41) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +115 -10
  3. data/README.md +7 -7
  4. data/_data/authors.yml +2 -2
  5. data/_data/features.yml +676 -0
  6. data/_data/navigation/README.md +54 -0
  7. data/_data/navigation/about.yml +7 -5
  8. data/_data/navigation/docs.yml +77 -31
  9. data/_data/navigation/home.yml +4 -3
  10. data/_data/navigation/main.yml +16 -7
  11. data/_data/navigation/quickstart.yml +4 -2
  12. data/_includes/components/cookie-consent.html +81 -9
  13. data/_includes/components/js-cdn.html +2 -2
  14. data/_includes/components/mermaid.html +260 -14
  15. data/_includes/core/head.html +1 -0
  16. data/_includes/landing/landing-install-cards.html +8 -8
  17. data/_includes/landing/landing-quick-links.html +4 -4
  18. data/_includes/navigation/breadcrumbs.html +29 -6
  19. data/_includes/navigation/nav-tree.html +181 -0
  20. data/_includes/navigation/navbar.html +262 -9
  21. data/_includes/navigation/sidebar-left.html +22 -23
  22. data/_layouts/default.html +1 -1
  23. data/_layouts/landing.html +21 -21
  24. data/_layouts/notebook.html +4 -4
  25. data/_layouts/root.html +2 -2
  26. data/_sass/core/_nav-tree.scss +145 -0
  27. data/_sass/core/code-copy.scss +45 -6
  28. data/_sass/custom.scss +541 -1
  29. data/assets/js/code-copy.js +79 -13
  30. data/assets/js/modules/navigation/config.js +149 -0
  31. data/assets/js/modules/navigation/focus.js +189 -0
  32. data/assets/js/modules/navigation/gestures.js +179 -0
  33. data/assets/js/modules/navigation/index.js +227 -0
  34. data/assets/js/modules/navigation/keyboard.js +237 -0
  35. data/assets/js/modules/navigation/scroll-spy.js +219 -0
  36. data/assets/js/modules/navigation/sidebar-state.js +267 -0
  37. data/assets/js/modules/navigation/smooth-scroll.js +153 -0
  38. data/assets/js/ui-enhancements.js +194 -0
  39. data/scripts/migrate-nav-modes.sh +146 -0
  40. metadata +20 -7
  41. data/assets/js/sidebar.js +0 -511
@@ -0,0 +1,146 @@
1
+ #!/bin/bash
2
+ # ===================================================================
3
+ # MIGRATE NAV MODES - Update Front Matter Navigation Values
4
+ # ===================================================================
5
+ #
6
+ # File: migrate-nav-modes.sh
7
+ # Path: scripts/migrate-nav-modes.sh
8
+ # Purpose: Update front matter nav values from old to new modes
9
+ #
10
+ # Migration Map:
11
+ # dynamic → auto
12
+ # searchCats → categories
13
+ # docs → tree
14
+ # about → tree
15
+ # quickstart → tree
16
+ # main → tree
17
+ #
18
+ # Usage:
19
+ # ./scripts/migrate-nav-modes.sh # Dry run (preview changes)
20
+ # ./scripts/migrate-nav-modes.sh --apply # Apply changes
21
+ #
22
+ # ===================================================================
23
+
24
+ set -eo pipefail
25
+
26
+ # Colors for output
27
+ RED='\033[0;31m'
28
+ GREEN='\033[0;32m'
29
+ YELLOW='\033[1;33m'
30
+ BLUE='\033[0;34m'
31
+ NC='\033[0m' # No Color
32
+
33
+ # Script configuration
34
+ PAGES_DIR="pages"
35
+ DRY_RUN=true
36
+
37
+ # Parse arguments
38
+ if [[ "${1:-}" == "--apply" ]]; then
39
+ DRY_RUN=false
40
+ fi
41
+
42
+ echo -e "${BLUE}═══════════════════════════════════════════════════════════════${NC}"
43
+ echo -e "${BLUE} Navigation Mode Migration Script${NC}"
44
+ echo -e "${BLUE}═══════════════════════════════════════════════════════════════${NC}"
45
+ echo ""
46
+
47
+ if $DRY_RUN; then
48
+ echo -e "${YELLOW}Running in DRY RUN mode. No files will be modified.${NC}"
49
+ echo -e "${YELLOW}Use --apply to make actual changes.${NC}"
50
+ else
51
+ echo -e "${RED}Running in APPLY mode. Files will be modified.${NC}"
52
+ fi
53
+ echo ""
54
+
55
+ # Migration patterns (old → new)
56
+ # Using simple arrays instead of associative arrays for compatibility
57
+ OLD_PATTERNS=("nav: dynamic" "nav: searchCats")
58
+ NEW_PATTERNS=("nav: auto" "nav: categories")
59
+
60
+ # Files that explicitly set nav values (not inherited from _config.yml)
61
+ EXPLICIT_NAV_PATTERNS=(
62
+ "nav: dynamic"
63
+ "nav: searchCats"
64
+ "nav: docs"
65
+ "nav: about"
66
+ "nav: quickstart"
67
+ "nav: main"
68
+ )
69
+
70
+ # Count changes
71
+ TOTAL_FILES=0
72
+ TOTAL_CHANGES=0
73
+
74
+ echo -e "${BLUE}Scanning for files with explicit nav values...${NC}"
75
+ echo ""
76
+
77
+ # Find all markdown files
78
+ while IFS= read -r -d '' file; do
79
+ file_changes=0
80
+
81
+ # Check if file has any nav patterns
82
+ for pattern in "${EXPLICIT_NAV_PATTERNS[@]}"; do
83
+ if grep -q "$pattern" "$file" 2>/dev/null; then
84
+ ((file_changes++)) || true
85
+ fi
86
+ done
87
+
88
+ if [[ $file_changes -gt 0 ]]; then
89
+ ((TOTAL_FILES++)) || true
90
+ echo -e "${GREEN}Found:${NC} $file"
91
+
92
+ # Show what would change
93
+ for i in "${!OLD_PATTERNS[@]}"; do
94
+ old_pattern="${OLD_PATTERNS[$i]}"
95
+ new_pattern="${NEW_PATTERNS[$i]}"
96
+ if grep -q "$old_pattern" "$file" 2>/dev/null; then
97
+ echo -e " ${YELLOW}Change:${NC} '$old_pattern' → '$new_pattern'"
98
+ ((TOTAL_CHANGES++)) || true
99
+
100
+ if ! $DRY_RUN; then
101
+ # Apply the change using sed
102
+ if [[ "$OSTYPE" == "darwin"* ]]; then
103
+ sed -i '' "s/$old_pattern/$new_pattern/g" "$file"
104
+ else
105
+ sed -i "s/$old_pattern/$new_pattern/g" "$file"
106
+ fi
107
+ fi
108
+ fi
109
+ done
110
+
111
+ # Check for named nav files that should use tree mode
112
+ # Note: These are trickier because we want to keep the YAML file reference
113
+ # but change how the template interprets them
114
+ for named_nav in "docs" "about" "quickstart" "main"; do
115
+ if grep -q "nav: $named_nav" "$file" 2>/dev/null; then
116
+ echo -e " ${BLUE}Note:${NC} 'nav: $named_nav' - YAML file will be used with tree mode"
117
+ # No automatic migration - sidebar-left.html handles this via fallthrough
118
+ fi
119
+ done
120
+
121
+ echo ""
122
+ fi
123
+ done < <(find "$PAGES_DIR" -name "*.md" -print0 2>/dev/null)
124
+
125
+ echo -e "${BLUE}═══════════════════════════════════════════════════════════════${NC}"
126
+ echo -e "${BLUE} Summary${NC}"
127
+ echo -e "${BLUE}═══════════════════════════════════════════════════════════════${NC}"
128
+ echo ""
129
+ echo -e "Files scanned: ${GREEN}$(find "$PAGES_DIR" -name "*.md" 2>/dev/null | wc -l | tr -d ' ')${NC}"
130
+ echo -e "Files affected: ${GREEN}$TOTAL_FILES${NC}"
131
+ echo -e "Changes made: ${GREEN}$TOTAL_CHANGES${NC}"
132
+ echo ""
133
+
134
+ if $DRY_RUN; then
135
+ echo -e "${YELLOW}This was a dry run. To apply changes, run:${NC}"
136
+ echo -e " ${GREEN}./scripts/migrate-nav-modes.sh --apply${NC}"
137
+ else
138
+ echo -e "${GREEN}Migration complete!${NC}"
139
+ fi
140
+
141
+ echo ""
142
+ echo -e "${BLUE}Navigation Mode Reference:${NC}"
143
+ echo " auto - Auto-generated from collection documents"
144
+ echo " tree - YAML-defined hierarchical navigation"
145
+ echo " categories - Category-based grouping"
146
+ echo ""
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-zer0
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0
4
+ version: 0.17.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amr Abdel
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-12-20 00:00:00.000000000 Z
11
+ date: 2026-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -80,9 +80,11 @@ files:
80
80
  - _data/README.md
81
81
  - _data/authors.yml
82
82
  - _data/content_statistics.yml
83
+ - _data/features.yml
83
84
  - _data/generate_statistics.rb
84
85
  - _data/generate_statistics.sh
85
86
  - _data/github-actions-example.yml
87
+ - _data/navigation/README.md
86
88
  - _data/navigation/about.yml
87
89
  - _data/navigation/docs.yml
88
90
  - _data/navigation/home.yml
@@ -127,6 +129,7 @@ files:
127
129
  - _includes/landing/landing-install-cards.html
128
130
  - _includes/landing/landing-quick-links.html
129
131
  - _includes/navigation/breadcrumbs.html
132
+ - _includes/navigation/nav-tree.html
130
133
  - _includes/navigation/nav_list.html
131
134
  - _includes/navigation/navbar.html
132
135
  - _includes/navigation/sidebar-categories.html
@@ -157,6 +160,7 @@ files:
157
160
  - _plugins/preview_image_generator.rb
158
161
  - _plugins/theme_version.rb
159
162
  - _sass/core/_docs.scss
163
+ - _sass/core/_nav-tree.scss
160
164
  - _sass/core/_syntax.scss
161
165
  - _sass/core/_theme.scss
162
166
  - _sass/core/_variables.scss
@@ -202,12 +206,20 @@ files:
202
206
  - assets/js/color-modes.js
203
207
  - assets/js/docs.min.js
204
208
  - assets/js/halfmoon.js
209
+ - assets/js/modules/navigation/config.js
210
+ - assets/js/modules/navigation/focus.js
211
+ - assets/js/modules/navigation/gestures.js
212
+ - assets/js/modules/navigation/index.js
213
+ - assets/js/modules/navigation/keyboard.js
214
+ - assets/js/modules/navigation/scroll-spy.js
215
+ - assets/js/modules/navigation/sidebar-state.js
216
+ - assets/js/modules/navigation/smooth-scroll.js
205
217
  - assets/js/myScript.js
206
218
  - assets/js/nanobar.min.js
207
219
  - assets/js/particles-source.js
208
220
  - assets/js/particles.js
209
221
  - assets/js/side-bar-folders.js
210
- - assets/js/sidebar.js
222
+ - assets/js/ui-enhancements.js
211
223
  - assets/particles.json
212
224
  - scripts/README.md
213
225
  - scripts/analyze-commits.sh
@@ -231,6 +243,7 @@ files:
231
243
  - scripts/lib/preview_generator.py
232
244
  - scripts/lib/validation.sh
233
245
  - scripts/lib/version.sh
246
+ - scripts/migrate-nav-modes.sh
234
247
  - scripts/release
235
248
  - scripts/setup.sh
236
249
  - scripts/test-auto-version.sh
@@ -259,7 +272,7 @@ metadata:
259
272
  changelog_uri: https://github.com/bamr87/zer0-mistakes/blob/main/CHANGELOG.md
260
273
  documentation_uri: https://github.com/bamr87/zer0-mistakes#readme
261
274
  allowed_push_host: https://rubygems.org
262
- post_install_message:
275
+ post_install_message:
263
276
  rdoc_options: []
264
277
  require_paths:
265
278
  - lib
@@ -274,8 +287,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
274
287
  - !ruby/object:Gem::Version
275
288
  version: '0'
276
289
  requirements: []
277
- rubygems_version: 3.0.3.1
278
- signing_key:
290
+ rubygems_version: 3.5.22
291
+ signing_key:
279
292
  specification_version: 4
280
293
  summary: Jekyll theme based on bootstrap and compatible with github pages
281
294
  test_files: []