docyard 0.7.0 → 0.9.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.
- checksums.yaml +4 -4
- data/.rubocop.yml +5 -1
- data/CHANGELOG.md +43 -1
- data/lib/docyard/build/asset_bundler.rb +22 -7
- data/lib/docyard/build/file_copier.rb +49 -27
- data/lib/docyard/build/sitemap_generator.rb +6 -6
- data/lib/docyard/build/static_generator.rb +85 -12
- data/lib/docyard/builder.rb +6 -6
- data/lib/docyard/components/aliases.rb +12 -0
- data/lib/docyard/components/processors/abbreviation_processor.rb +72 -0
- data/lib/docyard/components/processors/accordion_processor.rb +81 -0
- data/lib/docyard/components/processors/badge_processor.rb +72 -0
- data/lib/docyard/components/processors/callout_processor.rb +8 -2
- data/lib/docyard/components/processors/cards_processor.rb +100 -0
- data/lib/docyard/components/processors/code_block_options_preprocessor.rb +23 -2
- data/lib/docyard/components/processors/code_block_processor.rb +6 -0
- data/lib/docyard/components/processors/code_group_processor.rb +198 -0
- data/lib/docyard/components/processors/code_snippet_import_preprocessor.rb +6 -1
- data/lib/docyard/components/processors/custom_anchor_processor.rb +42 -0
- data/lib/docyard/components/processors/file_tree_processor.rb +151 -0
- data/lib/docyard/components/processors/image_caption_processor.rb +96 -0
- data/lib/docyard/components/processors/include_processor.rb +86 -0
- data/lib/docyard/components/processors/steps_processor.rb +89 -0
- data/lib/docyard/components/processors/tabs_processor.rb +9 -1
- data/lib/docyard/components/processors/tooltip_processor.rb +57 -0
- data/lib/docyard/components/processors/video_embed_processor.rb +196 -0
- data/lib/docyard/components/support/code_group/html_builder.rb +122 -0
- data/lib/docyard/components/support/markdown_code_block_helper.rb +56 -0
- data/lib/docyard/config/branding_resolver.rb +121 -17
- data/lib/docyard/config/constants.rb +6 -4
- data/lib/docyard/config/logo_detector.rb +39 -0
- data/lib/docyard/config/validator.rb +122 -99
- data/lib/docyard/config.rb +40 -42
- data/lib/docyard/initializer.rb +15 -76
- data/lib/docyard/navigation/breadcrumb_builder.rb +133 -0
- data/lib/docyard/navigation/prev_next_builder.rb +4 -1
- data/lib/docyard/navigation/sidebar/children_discoverer.rb +51 -0
- data/lib/docyard/navigation/sidebar/config_parser.rb +136 -108
- data/lib/docyard/navigation/sidebar/file_resolver.rb +90 -0
- data/lib/docyard/navigation/sidebar/file_system_scanner.rb +2 -1
- data/lib/docyard/navigation/sidebar/item.rb +50 -7
- data/lib/docyard/navigation/sidebar/local_config_loader.rb +51 -0
- data/lib/docyard/navigation/sidebar/metadata_extractor.rb +71 -0
- data/lib/docyard/navigation/sidebar/metadata_reader.rb +51 -0
- data/lib/docyard/navigation/sidebar/path_prefixer.rb +34 -0
- data/lib/docyard/navigation/sidebar/renderer.rb +60 -38
- data/lib/docyard/navigation/sidebar/sorter.rb +21 -0
- data/lib/docyard/navigation/sidebar/tree_builder.rb +100 -26
- data/lib/docyard/navigation/sidebar/tree_filter.rb +55 -0
- data/lib/docyard/navigation/sidebar_builder.rb +105 -36
- data/lib/docyard/rendering/icon_helpers.rb +13 -0
- data/lib/docyard/rendering/icons/phosphor.rb +26 -1
- data/lib/docyard/rendering/markdown.rb +29 -1
- data/lib/docyard/rendering/renderer.rb +75 -34
- data/lib/docyard/rendering/template_resolver.rb +172 -0
- data/lib/docyard/routing/fallback_resolver.rb +92 -0
- data/lib/docyard/search/build_indexer.rb +1 -1
- data/lib/docyard/search/dev_indexer.rb +51 -6
- data/lib/docyard/search/pagefind_support.rb +2 -0
- data/lib/docyard/server/asset_handler.rb +25 -19
- data/lib/docyard/server/pagefind_handler.rb +63 -0
- data/lib/docyard/server/preview_server.rb +1 -1
- data/lib/docyard/server/rack_application.rb +81 -64
- data/lib/docyard/templates/assets/css/code.css +18 -51
- data/lib/docyard/templates/assets/css/components/abbreviation.css +86 -0
- data/lib/docyard/templates/assets/css/components/accordion.css +138 -0
- data/lib/docyard/templates/assets/css/components/badges.css +47 -0
- data/lib/docyard/templates/assets/css/components/banner.css +202 -0
- data/lib/docyard/templates/assets/css/components/breadcrumbs.css +143 -0
- data/lib/docyard/templates/assets/css/components/callout.css +67 -67
- data/lib/docyard/templates/assets/css/components/cards.css +100 -0
- data/lib/docyard/templates/assets/css/components/code-block.css +190 -282
- data/lib/docyard/templates/assets/css/components/code-group.css +281 -0
- data/lib/docyard/templates/assets/css/components/figure.css +22 -0
- data/lib/docyard/templates/assets/css/components/file-tree.css +124 -0
- data/lib/docyard/templates/assets/css/components/heading-anchor.css +36 -15
- data/lib/docyard/templates/assets/css/components/icon.css +0 -1
- data/lib/docyard/templates/assets/css/components/lightbox.css +65 -0
- data/lib/docyard/templates/assets/css/components/logo.css +0 -2
- data/lib/docyard/templates/assets/css/components/nav-menu.css +237 -0
- data/lib/docyard/templates/assets/css/components/navigation.css +193 -167
- data/lib/docyard/templates/assets/css/components/prev-next.css +68 -48
- data/lib/docyard/templates/assets/css/components/search.css +186 -174
- data/lib/docyard/templates/assets/css/components/steps.css +122 -0
- data/lib/docyard/templates/assets/css/components/tab-bar.css +163 -0
- data/lib/docyard/templates/assets/css/components/table-of-contents.css +127 -114
- data/lib/docyard/templates/assets/css/components/tabs.css +119 -160
- data/lib/docyard/templates/assets/css/components/theme-toggle.css +48 -44
- data/lib/docyard/templates/assets/css/components/tooltip.css +113 -0
- data/lib/docyard/templates/assets/css/components/video.css +41 -0
- data/lib/docyard/templates/assets/css/landing.css +815 -0
- data/lib/docyard/templates/assets/css/layout.css +489 -87
- data/lib/docyard/templates/assets/css/main.css +1 -3
- data/lib/docyard/templates/assets/css/markdown.css +113 -93
- data/lib/docyard/templates/assets/css/reset.css +0 -3
- data/lib/docyard/templates/assets/css/typography.css +43 -41
- data/lib/docyard/templates/assets/css/variables.css +268 -208
- data/lib/docyard/templates/assets/favicon.svg +7 -8
- data/lib/docyard/templates/assets/fonts/Inter-Variable.ttf +0 -0
- data/lib/docyard/templates/assets/js/components/abbreviation.js +85 -0
- data/lib/docyard/templates/assets/js/components/banner.js +81 -0
- data/lib/docyard/templates/assets/js/components/code-block.js +24 -42
- data/lib/docyard/templates/assets/js/components/code-group.js +283 -0
- data/lib/docyard/templates/assets/js/components/file-tree.js +39 -0
- data/lib/docyard/templates/assets/js/components/heading-anchor.js +26 -24
- data/lib/docyard/templates/assets/js/components/lightbox.js +72 -0
- data/lib/docyard/templates/assets/js/components/navigation.js +181 -70
- data/lib/docyard/templates/assets/js/components/search.js +0 -75
- data/lib/docyard/templates/assets/js/components/sidebar-toggle.js +29 -0
- data/lib/docyard/templates/assets/js/components/tab-navigation.js +145 -0
- data/lib/docyard/templates/assets/js/components/table-of-contents.js +153 -66
- data/lib/docyard/templates/assets/js/components/tabs.js +31 -69
- data/lib/docyard/templates/assets/js/components/tooltip.js +118 -0
- data/lib/docyard/templates/assets/js/theme.js +0 -3
- data/lib/docyard/templates/assets/logo-dark.svg +8 -2
- data/lib/docyard/templates/assets/logo.svg +7 -4
- data/lib/docyard/templates/config/docyard.yml.erb +37 -34
- data/lib/docyard/templates/errors/404.html.erb +1 -1
- data/lib/docyard/templates/errors/500.html.erb +1 -1
- data/lib/docyard/templates/layouts/default.html.erb +19 -67
- data/lib/docyard/templates/layouts/splash.html.erb +177 -0
- data/lib/docyard/templates/partials/_accordion.html.erb +9 -0
- data/lib/docyard/templates/partials/_banner.html.erb +27 -0
- data/lib/docyard/templates/partials/_breadcrumbs.html.erb +24 -0
- data/lib/docyard/templates/partials/_card.html.erb +23 -0
- data/lib/docyard/templates/partials/_code_block.html.erb +5 -3
- data/lib/docyard/templates/partials/_doc_footer.html.erb +25 -0
- data/lib/docyard/templates/partials/_features.html.erb +15 -0
- data/lib/docyard/templates/partials/_footer.html.erb +42 -0
- data/lib/docyard/templates/partials/_head.html.erb +22 -0
- data/lib/docyard/templates/partials/_header.html.erb +49 -0
- data/lib/docyard/templates/partials/_heading_anchor.html.erb +3 -1
- data/lib/docyard/templates/partials/_hero.html.erb +27 -0
- data/lib/docyard/templates/partials/_nav_group.html.erb +31 -11
- data/lib/docyard/templates/partials/_nav_leaf.html.erb +4 -1
- data/lib/docyard/templates/partials/_nav_menu.html.erb +42 -0
- data/lib/docyard/templates/partials/_nav_nested_section.html.erb +11 -0
- data/lib/docyard/templates/partials/_nav_section.html.erb +1 -1
- data/lib/docyard/templates/partials/_prev_next.html.erb +8 -2
- data/lib/docyard/templates/partials/_scripts.html.erb +7 -0
- data/lib/docyard/templates/partials/_search_modal.html.erb +2 -6
- data/lib/docyard/templates/partials/_search_trigger.html.erb +2 -6
- data/lib/docyard/templates/partials/_sidebar.html.erb +21 -4
- data/lib/docyard/templates/partials/_step.html.erb +14 -0
- data/lib/docyard/templates/partials/_tab_bar.html.erb +25 -0
- data/lib/docyard/templates/partials/_table_of_contents.html.erb +12 -12
- data/lib/docyard/templates/partials/_table_of_contents_toggle.html.erb +1 -3
- data/lib/docyard/templates/partials/_tabs.html.erb +2 -2
- data/lib/docyard/templates/partials/_theme_toggle.html.erb +2 -11
- data/lib/docyard/version.rb +1 -1
- metadata +70 -5
- data/lib/docyard/templates/markdown/getting-started/installation.md.erb +0 -77
- data/lib/docyard/templates/markdown/guides/configuration.md.erb +0 -202
- data/lib/docyard/templates/markdown/guides/markdown-features.md.erb +0 -247
- data/lib/docyard/templates/markdown/index.md.erb +0 -82
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TabsManager - Manages tab component interactions
|
|
3
|
-
*
|
|
4
|
-
* @class TabsManager
|
|
5
|
-
*/
|
|
6
1
|
class TabsManager {
|
|
7
|
-
|
|
8
|
-
* Create a TabsManager instance
|
|
9
|
-
* @param {HTMLElement} container - The .docyard-tabs container element
|
|
10
|
-
*/
|
|
2
|
+
|
|
11
3
|
constructor(container) {
|
|
12
4
|
if (!container) return;
|
|
13
5
|
|
|
@@ -28,9 +20,7 @@ class TabsManager {
|
|
|
28
20
|
this.init();
|
|
29
21
|
}
|
|
30
22
|
|
|
31
|
-
|
|
32
|
-
* Initialize the tabs component
|
|
33
|
-
*/
|
|
23
|
+
|
|
34
24
|
init() {
|
|
35
25
|
if (!this.tabList || this.tabs.length === 0 || this.panels.length === 0) {
|
|
36
26
|
return;
|
|
@@ -41,12 +31,15 @@ class TabsManager {
|
|
|
41
31
|
this.attachEventListeners();
|
|
42
32
|
this.activateTab(this.activeIndex, false);
|
|
43
33
|
this.updateIndicator();
|
|
44
|
-
|
|
34
|
+
|
|
35
|
+
requestAnimationFrame(() => {
|
|
36
|
+
requestAnimationFrame(() => {
|
|
37
|
+
this.updateScrollIndicators();
|
|
38
|
+
});
|
|
39
|
+
});
|
|
45
40
|
}
|
|
46
41
|
|
|
47
|
-
|
|
48
|
-
* Create scroll indicator elements
|
|
49
|
-
*/
|
|
42
|
+
|
|
50
43
|
createScrollIndicators() {
|
|
51
44
|
if (!this.tabListWrapper || !this.tabList) return;
|
|
52
45
|
|
|
@@ -59,9 +52,7 @@ class TabsManager {
|
|
|
59
52
|
this.tabListWrapper.appendChild(this.rightIndicator);
|
|
60
53
|
}
|
|
61
54
|
|
|
62
|
-
|
|
63
|
-
* Attach all event listeners
|
|
64
|
-
*/
|
|
55
|
+
|
|
65
56
|
attachEventListeners() {
|
|
66
57
|
this.tabs.forEach((tab, index) => {
|
|
67
58
|
tab.addEventListener('click', () => this.handleTabClick(index));
|
|
@@ -74,10 +65,7 @@ class TabsManager {
|
|
|
74
65
|
window.addEventListener('resize', this.handleResize);
|
|
75
66
|
}
|
|
76
67
|
|
|
77
|
-
|
|
78
|
-
* Handle tab click
|
|
79
|
-
* @param {number} index - Index of clicked tab
|
|
80
|
-
*/
|
|
68
|
+
|
|
81
69
|
handleTabClick(index) {
|
|
82
70
|
if (index === this.activeIndex) return;
|
|
83
71
|
|
|
@@ -85,10 +73,7 @@ class TabsManager {
|
|
|
85
73
|
this.savePreference(index);
|
|
86
74
|
}
|
|
87
75
|
|
|
88
|
-
|
|
89
|
-
* Handle keyboard navigation
|
|
90
|
-
* @param {KeyboardEvent} event - Keyboard event
|
|
91
|
-
*/
|
|
76
|
+
|
|
92
77
|
handleKeyDown(event) {
|
|
93
78
|
const { key } = event;
|
|
94
79
|
|
|
@@ -118,9 +103,7 @@ class TabsManager {
|
|
|
118
103
|
}
|
|
119
104
|
}
|
|
120
105
|
|
|
121
|
-
|
|
122
|
-
* Handle scroll event - update scroll indicators
|
|
123
|
-
*/
|
|
106
|
+
|
|
124
107
|
handleScroll() {
|
|
125
108
|
if (this.scrollTimeout) {
|
|
126
109
|
cancelAnimationFrame(this.scrollTimeout);
|
|
@@ -131,9 +114,7 @@ class TabsManager {
|
|
|
131
114
|
});
|
|
132
115
|
}
|
|
133
116
|
|
|
134
|
-
|
|
135
|
-
* Handle window resize - update indicator and scroll indicators
|
|
136
|
-
*/
|
|
117
|
+
|
|
137
118
|
handleResize() {
|
|
138
119
|
if (this.resizeTimeout) {
|
|
139
120
|
cancelAnimationFrame(this.resizeTimeout);
|
|
@@ -145,17 +126,15 @@ class TabsManager {
|
|
|
145
126
|
});
|
|
146
127
|
}
|
|
147
128
|
|
|
148
|
-
|
|
149
|
-
* Activate a specific tab
|
|
150
|
-
* @param {number} index - Index of tab to activate
|
|
151
|
-
* @param {boolean} animate - Whether to animate the transition
|
|
152
|
-
*/
|
|
129
|
+
|
|
153
130
|
activateTab(index, animate = true) {
|
|
154
131
|
if (index < 0 || index >= this.tabs.length) return;
|
|
155
132
|
|
|
156
133
|
const previousIndex = this.activeIndex;
|
|
157
134
|
this.activeIndex = index;
|
|
158
135
|
|
|
136
|
+
const direction = index > previousIndex ? 'right' : 'left';
|
|
137
|
+
|
|
159
138
|
this.tabs.forEach((tab, i) => {
|
|
160
139
|
const isActive = i === index;
|
|
161
140
|
tab.setAttribute('aria-selected', isActive ? 'true' : 'false');
|
|
@@ -165,6 +144,12 @@ class TabsManager {
|
|
|
165
144
|
this.panels.forEach((panel, i) => {
|
|
166
145
|
const isActive = i === index;
|
|
167
146
|
panel.setAttribute('aria-hidden', isActive ? 'false' : 'true');
|
|
147
|
+
|
|
148
|
+
if (isActive && animate && previousIndex !== index) {
|
|
149
|
+
panel.setAttribute('data-direction', direction);
|
|
150
|
+
} else {
|
|
151
|
+
panel.removeAttribute('data-direction');
|
|
152
|
+
}
|
|
168
153
|
});
|
|
169
154
|
|
|
170
155
|
this.updateIndicator(animate);
|
|
@@ -174,26 +159,19 @@ class TabsManager {
|
|
|
174
159
|
}
|
|
175
160
|
}
|
|
176
161
|
|
|
177
|
-
|
|
178
|
-
* Activate the next tab (wraps around)
|
|
179
|
-
*/
|
|
162
|
+
|
|
180
163
|
activateNextTab() {
|
|
181
164
|
const nextIndex = (this.activeIndex + 1) % this.tabs.length;
|
|
182
165
|
this.activateTab(nextIndex, true);
|
|
183
166
|
}
|
|
184
167
|
|
|
185
|
-
|
|
186
|
-
* Activate the previous tab (wraps around)
|
|
187
|
-
*/
|
|
168
|
+
|
|
188
169
|
activatePreviousTab() {
|
|
189
170
|
const prevIndex = (this.activeIndex - 1 + this.tabs.length) % this.tabs.length;
|
|
190
171
|
this.activateTab(prevIndex, true);
|
|
191
172
|
}
|
|
192
173
|
|
|
193
|
-
|
|
194
|
-
* Update the visual indicator position
|
|
195
|
-
* @param {boolean} animate - Whether to animate the transition
|
|
196
|
-
*/
|
|
174
|
+
|
|
197
175
|
updateIndicator(animate = true) {
|
|
198
176
|
if (!this.indicator || !this.tabs[this.activeIndex]) return;
|
|
199
177
|
|
|
@@ -214,9 +192,7 @@ class TabsManager {
|
|
|
214
192
|
}
|
|
215
193
|
}
|
|
216
194
|
|
|
217
|
-
|
|
218
|
-
* Update scroll indicators visibility based on scroll position
|
|
219
|
-
*/
|
|
195
|
+
|
|
220
196
|
updateScrollIndicators() {
|
|
221
197
|
if (!this.tabList || !this.leftIndicator || !this.rightIndicator) return;
|
|
222
198
|
|
|
@@ -244,9 +220,7 @@ class TabsManager {
|
|
|
244
220
|
}
|
|
245
221
|
}
|
|
246
222
|
|
|
247
|
-
|
|
248
|
-
* Load user preference from localStorage
|
|
249
|
-
*/
|
|
223
|
+
|
|
250
224
|
loadPreference() {
|
|
251
225
|
try {
|
|
252
226
|
const preferredTab = localStorage.getItem('docyard-preferred-pm');
|
|
@@ -264,10 +238,7 @@ class TabsManager {
|
|
|
264
238
|
}
|
|
265
239
|
}
|
|
266
240
|
|
|
267
|
-
|
|
268
|
-
* Save user preference to localStorage
|
|
269
|
-
* @param {number} index - Index of active tab
|
|
270
|
-
*/
|
|
241
|
+
|
|
271
242
|
savePreference(index) {
|
|
272
243
|
if (index < 0 || index >= this.tabs.length) return;
|
|
273
244
|
|
|
@@ -279,10 +250,7 @@ class TabsManager {
|
|
|
279
250
|
}
|
|
280
251
|
}
|
|
281
252
|
|
|
282
|
-
|
|
283
|
-
* Activate tab by name
|
|
284
|
-
* @param {string} name - Name of tab to activate
|
|
285
|
-
*/
|
|
253
|
+
|
|
286
254
|
activateTabByName(name) {
|
|
287
255
|
const index = this.tabs.findIndex(tab =>
|
|
288
256
|
tab.textContent.trim().toLowerCase() === name.toLowerCase()
|
|
@@ -293,9 +261,7 @@ class TabsManager {
|
|
|
293
261
|
}
|
|
294
262
|
}
|
|
295
263
|
|
|
296
|
-
|
|
297
|
-
* Cleanup - remove event listeners
|
|
298
|
-
*/
|
|
264
|
+
|
|
299
265
|
destroy() {
|
|
300
266
|
this.tabs.forEach((tab, index) => {
|
|
301
267
|
tab.removeEventListener('click', () => this.handleTabClick(index));
|
|
@@ -315,9 +281,6 @@ class TabsManager {
|
|
|
315
281
|
}
|
|
316
282
|
}
|
|
317
283
|
|
|
318
|
-
/**
|
|
319
|
-
* Auto-initialize all tabs on page load
|
|
320
|
-
*/
|
|
321
284
|
function initializeTabs() {
|
|
322
285
|
const tabsContainers = document.querySelectorAll('.docyard-tabs');
|
|
323
286
|
|
|
@@ -326,7 +289,6 @@ function initializeTabs() {
|
|
|
326
289
|
});
|
|
327
290
|
}
|
|
328
291
|
|
|
329
|
-
// Initialize on DOM ready
|
|
330
292
|
if (document.readyState === 'loading') {
|
|
331
293
|
document.addEventListener('DOMContentLoaded', initializeTabs);
|
|
332
294
|
} else {
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
function initializeTooltips() {
|
|
2
|
+
const tooltips = document.querySelectorAll('.docyard-tooltip');
|
|
3
|
+
if (tooltips.length === 0) return;
|
|
4
|
+
|
|
5
|
+
const popover = createTooltipPopover();
|
|
6
|
+
document.body.appendChild(popover);
|
|
7
|
+
|
|
8
|
+
let hideTimeout;
|
|
9
|
+
let isHoveringPopover = false;
|
|
10
|
+
|
|
11
|
+
popover.addEventListener('mouseenter', () => {
|
|
12
|
+
isHoveringPopover = true;
|
|
13
|
+
clearTimeout(hideTimeout);
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
popover.addEventListener('mouseleave', () => {
|
|
17
|
+
isHoveringPopover = false;
|
|
18
|
+
hideTimeout = setTimeout(() => {
|
|
19
|
+
hideTooltipPopover(popover);
|
|
20
|
+
}, 100);
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
tooltips.forEach(tooltip => {
|
|
24
|
+
tooltip.addEventListener('mouseenter', () => {
|
|
25
|
+
clearTimeout(hideTimeout);
|
|
26
|
+
showTooltipPopover(popover, tooltip);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
tooltip.addEventListener('mouseleave', () => {
|
|
30
|
+
hideTimeout = setTimeout(() => {
|
|
31
|
+
if (!isHoveringPopover) {
|
|
32
|
+
hideTooltipPopover(popover);
|
|
33
|
+
}
|
|
34
|
+
}, 100);
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function createTooltipPopover() {
|
|
40
|
+
const popover = document.createElement('div');
|
|
41
|
+
popover.className = 'docyard-tooltip-popover';
|
|
42
|
+
popover.innerHTML = `
|
|
43
|
+
<span class="docyard-tooltip-popover__term"></span>
|
|
44
|
+
<span class="docyard-tooltip-popover__description"></span>
|
|
45
|
+
<a class="docyard-tooltip-popover__link" style="display: none;">
|
|
46
|
+
<span class="docyard-tooltip-popover__link-text"></span>
|
|
47
|
+
<svg class="docyard-tooltip-popover__link-icon" viewBox="0 0 256 256" fill="currentColor">
|
|
48
|
+
<path d="M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69l-58.35-58.34a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z"></path>
|
|
49
|
+
</svg>
|
|
50
|
+
</a>
|
|
51
|
+
`;
|
|
52
|
+
return popover;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function showTooltipPopover(popover, tooltip) {
|
|
56
|
+
const term = tooltip.textContent;
|
|
57
|
+
const description = tooltip.dataset.description;
|
|
58
|
+
const link = tooltip.dataset.link;
|
|
59
|
+
const linkText = tooltip.dataset.linkText;
|
|
60
|
+
|
|
61
|
+
popover.querySelector('.docyard-tooltip-popover__term').textContent = term;
|
|
62
|
+
popover.querySelector('.docyard-tooltip-popover__description').textContent = description;
|
|
63
|
+
|
|
64
|
+
const linkEl = popover.querySelector('.docyard-tooltip-popover__link');
|
|
65
|
+
if (link) {
|
|
66
|
+
linkEl.href = link;
|
|
67
|
+
linkEl.querySelector('.docyard-tooltip-popover__link-text').textContent = linkText;
|
|
68
|
+
linkEl.style.display = 'inline-flex';
|
|
69
|
+
} else {
|
|
70
|
+
linkEl.style.display = 'none';
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const rect = tooltip.getBoundingClientRect();
|
|
74
|
+
const scrollX = window.scrollX;
|
|
75
|
+
const scrollY = window.scrollY;
|
|
76
|
+
|
|
77
|
+
popover.style.visibility = 'hidden';
|
|
78
|
+
popover.classList.add('is-visible');
|
|
79
|
+
|
|
80
|
+
requestAnimationFrame(() => {
|
|
81
|
+
const popoverRect = popover.getBoundingClientRect();
|
|
82
|
+
let left = rect.left + scrollX + (rect.width / 2) - (popoverRect.width / 2);
|
|
83
|
+
let top = rect.top + scrollY - popoverRect.height - 8;
|
|
84
|
+
|
|
85
|
+
const viewportWidth = window.innerWidth;
|
|
86
|
+
const padding = 16;
|
|
87
|
+
|
|
88
|
+
if (left < padding) {
|
|
89
|
+
left = padding;
|
|
90
|
+
} else if (left + popoverRect.width > viewportWidth - padding) {
|
|
91
|
+
left = viewportWidth - popoverRect.width - padding;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (top < scrollY + padding) {
|
|
95
|
+
top = rect.bottom + scrollY + 8;
|
|
96
|
+
popover.classList.add('is-below');
|
|
97
|
+
} else {
|
|
98
|
+
popover.classList.remove('is-below');
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const arrowLeft = rect.left + scrollX + (rect.width / 2) - left;
|
|
102
|
+
popover.style.setProperty('--arrow-left', `${Math.max(12, Math.min(arrowLeft, popoverRect.width - 12))}px`);
|
|
103
|
+
|
|
104
|
+
popover.style.left = `${left}px`;
|
|
105
|
+
popover.style.top = `${top}px`;
|
|
106
|
+
popover.style.visibility = 'visible';
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function hideTooltipPopover(popover) {
|
|
111
|
+
popover.classList.remove('is-visible');
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
if (document.readyState === 'loading') {
|
|
115
|
+
document.addEventListener('DOMContentLoaded', initializeTooltips);
|
|
116
|
+
} else {
|
|
117
|
+
initializeTooltips();
|
|
118
|
+
}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<svg width="531" height="769" viewBox="0 0 531 769" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<
|
|
3
|
-
<
|
|
2
|
+
<defs>
|
|
3
|
+
<style>
|
|
4
|
+
.logo-accent { fill: #22D3EE; }
|
|
5
|
+
.logo-dark { fill: #FFFFFF; }
|
|
6
|
+
</style>
|
|
7
|
+
</defs>
|
|
8
|
+
<path class="logo-accent" d="M359.643 59.1798C402.213 89.4398 449.713 123.6 502.063 160.99C510.793 167.23 515.873 170.31 519.293 178.05C523.253 187.02 521.733 198.11 515.883 205.77C513.77 208.536 510.93 211.2 507.363 213.76C379.643 305.353 309.413 355.73 296.673 364.89C287.987 371.136 282.07 374.8 278.923 375.88C269.703 379.026 260.263 378.636 250.603 374.71C248.243 373.75 244.497 371.416 239.363 367.71C199.963 339.29 177.32 322.99 171.433 318.81C128.863 288.54 81.3733 254.39 29.0233 216.99C20.2833 210.75 15.2033 207.67 11.7833 199.93C7.82332 190.96 9.34332 179.87 15.1933 172.21C17.3067 169.443 20.1467 166.78 23.7133 164.22C151.433 72.6264 221.663 22.2498 234.403 13.0898C243.09 6.84309 249.007 3.17976 252.153 2.09976C261.373 -1.04691 270.813 -0.656912 280.473 3.26976C282.833 4.22976 286.58 6.56309 291.713 10.2698C331.113 38.6898 353.757 54.9931 359.643 59.1798Z"/>
|
|
9
|
+
<path class="logo-dark" d="M467.383 298.01C483.943 286.23 505.033 289.93 519.063 303.51C524.457 308.723 528.033 314.713 529.793 321.48C530.433 323.92 530.733 330.946 530.693 342.56C530.647 356.206 530.657 427.233 530.723 555.64C530.723 566.633 530.513 573 530.093 574.74C527.033 587.29 518.333 592.61 506.693 601.06C504.313 602.786 430.877 656.346 286.383 761.74C275.623 769.59 261.793 770.79 250.113 764.36C249.18 763.846 245.86 761.513 240.153 757.36C150.56 692.066 74.8667 637.046 13.0733 592.3C6.70001 587.68 2.65667 581.73 0.943337 574.45C0.316671 571.783 0.00333476 564.803 0.00333476 553.51C-0.00333191 421.323 -4.06895e-06 348.98 0.0133293 336.48C0.0133293 332.84 -0.0766665 327.18 0.783334 323.18C4.59333 305.51 20.1033 293.29 37.4533 291.15C42.9467 290.476 48.8667 291.276 55.2133 293.55C58.28 294.643 63.3533 297.8 70.4333 303.02C75.98 307.113 82.4433 311.78 89.8233 317.02C128.563 344.526 178.703 380.303 240.243 424.35C242.73 426.13 245.853 428.246 249.613 430.7C257.443 435.8 268.453 436.24 277.213 433.14C279.8 432.22 284.54 429.283 291.433 424.33C394.46 350.276 453.11 308.17 467.383 298.01Z"/>
|
|
4
10
|
</svg>
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
<svg width="531" height="769" viewBox="0 0 531 769" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
2
|
<defs>
|
|
3
3
|
<style>
|
|
4
|
+
.logo-accent { fill: #06B6D4; }
|
|
5
|
+
.logo-dark { fill: #18181B; }
|
|
6
|
+
|
|
4
7
|
@media (prefers-color-scheme: dark) {
|
|
5
|
-
|
|
6
|
-
|
|
8
|
+
.logo-accent { fill: #22D3EE; }
|
|
9
|
+
.logo-dark { fill: #E4E4E7; }
|
|
7
10
|
}
|
|
8
11
|
</style>
|
|
9
12
|
</defs>
|
|
10
|
-
<path d="M359.643 59.1798C402.213 89.4398 449.713 123.6 502.063 160.99C510.793 167.23 515.873 170.31 519.293 178.05C523.253 187.02 521.733 198.11 515.883 205.77C513.77 208.536 510.93 211.2 507.363 213.76C379.643 305.353 309.413 355.73 296.673 364.89C287.987 371.136 282.07 374.8 278.923 375.88C269.703 379.026 260.263 378.636 250.603 374.71C248.243 373.75 244.497 371.416 239.363 367.71C199.963 339.29 177.32 322.99 171.433 318.81C128.863 288.54 81.3733 254.39 29.0233 216.99C20.2833 210.75 15.2033 207.67 11.7833 199.93C7.82332 190.96 9.34332 179.87 15.1933 172.21C17.3067 169.443 20.1467 166.78 23.7133 164.22C151.433 72.6264 221.663 22.2498 234.403 13.0898C243.09 6.84309 249.007 3.17976 252.153 2.09976C261.373 -1.04691 270.813 -0.656912 280.473 3.26976C282.833 4.22976 286.58 6.56309 291.713 10.2698C331.113 38.6898 353.757 54.9931 359.643 59.1798Z"
|
|
11
|
-
<path d="M467.383 298.01C483.943 286.23 505.033 289.93 519.063 303.51C524.457 308.723 528.033 314.713 529.793 321.48C530.433 323.92 530.733 330.946 530.693 342.56C530.647 356.206 530.657 427.233 530.723 555.64C530.723 566.633 530.513 573 530.093 574.74C527.033 587.29 518.333 592.61 506.693 601.06C504.313 602.786 430.877 656.346 286.383 761.74C275.623 769.59 261.793 770.79 250.113 764.36C249.18 763.846 245.86 761.513 240.153 757.36C150.56 692.066 74.8667 637.046 13.0733 592.3C6.70001 587.68 2.65667 581.73 0.943337 574.45C0.316671 571.783 0.00333476 564.803 0.00333476 553.51C-0.00333191 421.323 -4.06895e-06 348.98 0.0133293 336.48C0.0133293 332.84 -0.0766665 327.18 0.783334 323.18C4.59333 305.51 20.1033 293.29 37.4533 291.15C42.9467 290.476 48.8667 291.276 55.2133 293.55C58.28 294.643 63.3533 297.8 70.4333 303.02C75.98 307.113 82.4433 311.78 89.8233 317.02C128.563 344.526 178.703 380.303 240.243 424.35C242.73 426.13 245.853 428.246 249.613 430.7C257.443 435.8 268.453 436.24 277.213 433.14C279.8 432.22 284.54 429.283 291.433 424.33C394.46 350.276 453.11 308.17 467.383 298.01Z"
|
|
13
|
+
<path class="logo-accent" d="M359.643 59.1798C402.213 89.4398 449.713 123.6 502.063 160.99C510.793 167.23 515.873 170.31 519.293 178.05C523.253 187.02 521.733 198.11 515.883 205.77C513.77 208.536 510.93 211.2 507.363 213.76C379.643 305.353 309.413 355.73 296.673 364.89C287.987 371.136 282.07 374.8 278.923 375.88C269.703 379.026 260.263 378.636 250.603 374.71C248.243 373.75 244.497 371.416 239.363 367.71C199.963 339.29 177.32 322.99 171.433 318.81C128.863 288.54 81.3733 254.39 29.0233 216.99C20.2833 210.75 15.2033 207.67 11.7833 199.93C7.82332 190.96 9.34332 179.87 15.1933 172.21C17.3067 169.443 20.1467 166.78 23.7133 164.22C151.433 72.6264 221.663 22.2498 234.403 13.0898C243.09 6.84309 249.007 3.17976 252.153 2.09976C261.373 -1.04691 270.813 -0.656912 280.473 3.26976C282.833 4.22976 286.58 6.56309 291.713 10.2698C331.113 38.6898 353.757 54.9931 359.643 59.1798Z"/>
|
|
14
|
+
<path class="logo-dark" d="M467.383 298.01C483.943 286.23 505.033 289.93 519.063 303.51C524.457 308.723 528.033 314.713 529.793 321.48C530.433 323.92 530.733 330.946 530.693 342.56C530.647 356.206 530.657 427.233 530.723 555.64C530.723 566.633 530.513 573 530.093 574.74C527.033 587.29 518.333 592.61 506.693 601.06C504.313 602.786 430.877 656.346 286.383 761.74C275.623 769.59 261.793 770.79 250.113 764.36C249.18 763.846 245.86 761.513 240.153 757.36C150.56 692.066 74.8667 637.046 13.0733 592.3C6.70001 587.68 2.65667 581.73 0.943337 574.45C0.316671 571.783 0.00333476 564.803 0.00333476 553.51C-0.00333191 421.323 -4.06895e-06 348.98 0.0133293 336.48C0.0133293 332.84 -0.0766665 327.18 0.783334 323.18C4.59333 305.51 20.1033 293.29 37.4533 291.15C42.9467 290.476 48.8667 291.276 55.2133 293.55C58.28 294.643 63.3533 297.8 70.4333 303.02C75.98 307.113 82.4433 311.78 89.8233 317.02C128.563 344.526 178.703 380.303 240.243 424.35C242.73 426.13 245.853 428.246 249.613 430.7C257.443 435.8 268.453 436.24 277.213 433.14C279.8 432.22 284.54 429.283 291.433 424.33C394.46 350.276 453.11 308.17 467.383 298.01Z"/>
|
|
12
15
|
</svg>
|
|
@@ -1,42 +1,45 @@
|
|
|
1
1
|
# Docyard Configuration
|
|
2
2
|
# Documentation: https://github.com/yourusername/docyard
|
|
3
3
|
|
|
4
|
-
# Site
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
description: "Documentation for my project"
|
|
4
|
+
# Site Identity
|
|
5
|
+
title: "My Documentation"
|
|
6
|
+
description: "Documentation for my project"
|
|
8
7
|
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
# Branding (Optional)
|
|
9
|
+
# Docyard auto-detects these files from docs/public/:
|
|
10
|
+
# - logo.svg or logo.png (and logo-dark.svg for dark mode)
|
|
11
|
+
# - favicon.ico, favicon.svg, or favicon.png
|
|
12
|
+
# Only configure if you need custom paths or filenames.
|
|
13
|
+
# branding:
|
|
14
|
+
# logo: "custom-logo.svg" # Override auto-detected logo
|
|
15
|
+
# favicon: "custom.ico" # Override auto-detected favicon
|
|
16
|
+
# credits: true # Show "Built with Docyard" link
|
|
18
17
|
|
|
19
|
-
#
|
|
20
|
-
#
|
|
21
|
-
#
|
|
22
|
-
#
|
|
23
|
-
#
|
|
24
|
-
|
|
25
|
-
#
|
|
26
|
-
#
|
|
27
|
-
#
|
|
28
|
-
#
|
|
29
|
-
#
|
|
30
|
-
#
|
|
31
|
-
#
|
|
32
|
-
#
|
|
33
|
-
#
|
|
34
|
-
#
|
|
35
|
-
|
|
36
|
-
#
|
|
18
|
+
# Social Links (Optional)
|
|
19
|
+
# These appear in the footer
|
|
20
|
+
# socials:
|
|
21
|
+
# github: https://github.com/user/repo
|
|
22
|
+
# twitter: https://twitter.com/handle
|
|
23
|
+
|
|
24
|
+
# Tab Navigation (Optional)
|
|
25
|
+
# Use tabs to organize large documentation into sections
|
|
26
|
+
# tabs:
|
|
27
|
+
# - text: Guide
|
|
28
|
+
# href: /guide
|
|
29
|
+
# - text: API Reference
|
|
30
|
+
# href: /api
|
|
31
|
+
# - text: Blog
|
|
32
|
+
# href: https://blog.example.com
|
|
33
|
+
# external: true
|
|
34
|
+
|
|
35
|
+
# Search Configuration
|
|
36
|
+
# search:
|
|
37
|
+
# enabled: true
|
|
38
|
+
# placeholder: "Search documentation..."
|
|
39
|
+
# exclude:
|
|
40
|
+
# - /drafts/*
|
|
37
41
|
|
|
38
42
|
# Build Configuration
|
|
39
43
|
build:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
clean: true # Clean output directory before building
|
|
44
|
+
output: "dist" # Output directory for static files
|
|
45
|
+
base: "/" # Base URL for deployment (e.g., "/docs/" for subdirectory)
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
6
|
<title>404 - Page Not Found</title>
|
|
7
|
-
<link rel="stylesheet" href="/
|
|
7
|
+
<link rel="stylesheet" href="/_docyard/css/main.css">
|
|
8
8
|
</head>
|
|
9
9
|
<body>
|
|
10
10
|
<main>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
6
|
<title>500 - Server Error</title>
|
|
7
|
-
<link rel="stylesheet" href="/
|
|
7
|
+
<link rel="stylesheet" href="/_docyard/css/main.css">
|
|
8
8
|
</head>
|
|
9
9
|
<body>
|
|
10
10
|
<main>
|
|
@@ -1,99 +1,51 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
|
-
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<meta name="description" content="<%= @site_description %>">
|
|
7
|
-
<title><%= @page_title %> | <%= @site_title %></title>
|
|
8
|
-
<link rel="icon" href="<%= asset_path(@favicon) %>" type="image/svg+xml">
|
|
9
|
-
|
|
10
|
-
<!-- Prevent flash of wrong theme -->
|
|
11
|
-
<script>
|
|
12
|
-
(function() {
|
|
13
|
-
const theme = localStorage.getItem('theme') ||
|
|
14
|
-
(window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');
|
|
15
|
-
document.documentElement.classList.toggle('dark', theme === 'dark');
|
|
16
|
-
})();
|
|
17
|
-
</script>
|
|
18
|
-
|
|
19
|
-
<link rel="stylesheet" href="/assets/css/main.css">
|
|
4
|
+
<%= render_partial('_head') %>
|
|
20
5
|
</head>
|
|
21
|
-
<body
|
|
22
|
-
|
|
6
|
+
<body<%= ' class="has-tabs"' if @has_tabs %>>
|
|
7
|
+
<%= render_partial('_banner') %>
|
|
23
8
|
<a href="#main-content" class="skip-link">Skip to main content</a>
|
|
24
9
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
<a href="<%= link_path('/') %>" class="header-logo">
|
|
29
|
-
<% if @display_logo %>
|
|
30
|
-
<div class="site-logo-container">
|
|
31
|
-
<% if @logo %>
|
|
32
|
-
<img src="<%= asset_path(@logo) %>" alt="<%= @site_title %>" class="site-logo site-logo-light">
|
|
33
|
-
<% end %>
|
|
34
|
-
<% if @logo_dark %>
|
|
35
|
-
<img src="<%= asset_path(@logo_dark) %>" alt="<%= @site_title %>" class="site-logo site-logo-dark">
|
|
36
|
-
<% else %>
|
|
37
|
-
<img src="<%= asset_path(@logo) %>" alt="<%= @site_title %>" class="site-logo site-logo-dark">
|
|
38
|
-
<% end %>
|
|
39
|
-
</div>
|
|
40
|
-
<% end %>
|
|
41
|
-
<% if @display_title %>
|
|
42
|
-
<span class="header-title"><%= @site_title %></span>
|
|
43
|
-
<% end %>
|
|
44
|
-
</a>
|
|
45
|
-
|
|
46
|
-
<% if @search_enabled %>
|
|
47
|
-
<div class="header-center">
|
|
48
|
-
<%= render_partial('_search_trigger') %>
|
|
49
|
-
</div>
|
|
50
|
-
<% end %>
|
|
51
|
-
|
|
52
|
-
<div class="header-actions">
|
|
53
|
-
<%= render_partial('_theme_toggle') %>
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
56
|
-
</header>
|
|
10
|
+
<%= render_partial('_header') %>
|
|
11
|
+
<%= render_partial('_tab_bar') %>
|
|
12
|
+
<%= render_partial('_nav_menu') %>
|
|
57
13
|
|
|
58
|
-
<!-- Secondary Header (Mobile Navigation) -->
|
|
59
14
|
<div class="secondary-header">
|
|
60
15
|
<button class="secondary-header-menu" aria-label="Toggle navigation menu" aria-expanded="false">
|
|
61
|
-
|
|
62
|
-
<path d="M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM40,72H216a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16ZM216,184H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z"></path>
|
|
63
|
-
</svg>
|
|
16
|
+
<%= icon(:sidebar) %>
|
|
64
17
|
<span>Menu</span>
|
|
65
18
|
</button>
|
|
66
19
|
|
|
67
20
|
<%= render_partial('_table_of_contents_toggle') %>
|
|
68
21
|
</div>
|
|
69
22
|
|
|
70
|
-
<!-- Mobile overlay -->
|
|
71
23
|
<div class="mobile-overlay" aria-hidden="true"></div>
|
|
72
24
|
|
|
73
25
|
<div class="layout">
|
|
74
|
-
<!-- Sidebar navigation -->
|
|
75
26
|
<%= @sidebar_html %>
|
|
76
27
|
|
|
77
|
-
<!-- Main content area -->
|
|
78
28
|
<div class="layout-main">
|
|
79
29
|
<main id="main-content" class="content" data-pagefind-body>
|
|
30
|
+
<%= render_partial('_breadcrumbs') %>
|
|
80
31
|
<%= @content %>
|
|
81
32
|
|
|
82
|
-
<!-- Previous/Next Navigation -->
|
|
83
33
|
<%= @prev_next_html %>
|
|
34
|
+
|
|
35
|
+
<div class="doc-footer-mobile">
|
|
36
|
+
<%= render_partial('_doc_footer') %>
|
|
37
|
+
</div>
|
|
84
38
|
</main>
|
|
85
39
|
</div>
|
|
86
40
|
|
|
87
|
-
|
|
88
|
-
|
|
41
|
+
<aside class="doc-aside">
|
|
42
|
+
<%= render_partial('_table_of_contents') %>
|
|
43
|
+
<div class="doc-footer-desktop">
|
|
44
|
+
<%= render_partial('_doc_footer') %>
|
|
45
|
+
</div>
|
|
46
|
+
</aside>
|
|
89
47
|
</div>
|
|
90
48
|
|
|
91
|
-
|
|
92
|
-
<%= render_partial('_search_modal') %>
|
|
93
|
-
<% end %>
|
|
94
|
-
|
|
95
|
-
<script src="/assets/js/theme.js"></script>
|
|
96
|
-
<script src="/assets/js/components.js"></script>
|
|
97
|
-
<script src="/assets/js/reload.js"></script>
|
|
49
|
+
<%= render_partial('_scripts') %>
|
|
98
50
|
</body>
|
|
99
51
|
</html>
|