jekyll-vitepress-theme 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.
Files changed (80) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.md +93 -0
  4. data/_includes/doc_footer.html +184 -0
  5. data/_includes/head.html +98 -0
  6. data/_includes/home.html +315 -0
  7. data/_includes/local_nav.html +23 -0
  8. data/_includes/nav.html +232 -0
  9. data/_includes/search.html +14 -0
  10. data/_includes/sidebar.html +47 -0
  11. data/_includes/vp_slots/doc_footer.html +0 -0
  12. data/_includes/vp_slots/head.html +1 -0
  13. data/_includes/vp_slots/layout_bottom.html +0 -0
  14. data/_layouts/default.html +127 -0
  15. data/_layouts/home.html +5 -0
  16. data/assets/css/vitepress-components.css +1524 -0
  17. data/assets/css/vitepress-core.css +2149 -0
  18. data/assets/css/vitepress-overrides.css +1408 -0
  19. data/assets/css/vp-icons.css +24 -0
  20. data/assets/images/favicon/apple-touch-icon.png +0 -0
  21. data/assets/images/favicon/favicon-96x96.png +0 -0
  22. data/assets/images/favicon/favicon.ico +0 -0
  23. data/assets/images/favicon/site.webmanifest +21 -0
  24. data/assets/images/favicon/web-app-manifest-192x192.png +0 -0
  25. data/assets/images/favicon/web-app-manifest-512x512.png +0 -0
  26. data/assets/images/file-icons/css.svg +1 -0
  27. data/assets/images/file-icons/default.svg +1 -0
  28. data/assets/images/file-icons/docker.svg +1 -0
  29. data/assets/images/file-icons/env.svg +1 -0
  30. data/assets/images/file-icons/go.svg +1 -0
  31. data/assets/images/file-icons/html.svg +1 -0
  32. data/assets/images/file-icons/java.svg +1 -0
  33. data/assets/images/file-icons/javascript.svg +1 -0
  34. data/assets/images/file-icons/json.svg +1 -0
  35. data/assets/images/file-icons/kotlin.svg +1 -0
  36. data/assets/images/file-icons/make.svg +1 -0
  37. data/assets/images/file-icons/markdown.svg +1 -0
  38. data/assets/images/file-icons/php.svg +1 -0
  39. data/assets/images/file-icons/python.svg +1 -0
  40. data/assets/images/file-icons/ruby.svg +1 -0
  41. data/assets/images/file-icons/rust.svg +1 -0
  42. data/assets/images/file-icons/shell.svg +1 -0
  43. data/assets/images/file-icons/sql.svg +1 -0
  44. data/assets/images/file-icons/text.svg +1 -0
  45. data/assets/images/file-icons/toml.svg +1 -0
  46. data/assets/images/file-icons/typescript.svg +1 -0
  47. data/assets/images/file-icons/vue.svg +1 -0
  48. data/assets/images/file-icons/xml.svg +1 -0
  49. data/assets/images/file-icons/yaml-dark.svg +1 -0
  50. data/assets/images/file-icons/yaml.svg +1 -0
  51. data/assets/images/logo.svg +337 -0
  52. data/assets/images/social-icons/bitbucket.svg +1 -0
  53. data/assets/images/social-icons/bluesky.svg +1 -0
  54. data/assets/images/social-icons/devdotto.svg +1 -0
  55. data/assets/images/social-icons/discord.svg +1 -0
  56. data/assets/images/social-icons/dribbble.svg +1 -0
  57. data/assets/images/social-icons/facebook.svg +1 -0
  58. data/assets/images/social-icons/github.svg +1 -0
  59. data/assets/images/social-icons/gitlab.svg +1 -0
  60. data/assets/images/social-icons/instagram.svg +1 -0
  61. data/assets/images/social-icons/linkedin.svg +1 -0
  62. data/assets/images/social-icons/mastodon.svg +1 -0
  63. data/assets/images/social-icons/medium.svg +1 -0
  64. data/assets/images/social-icons/npm.svg +1 -0
  65. data/assets/images/social-icons/reddit.svg +1 -0
  66. data/assets/images/social-icons/rss.svg +1 -0
  67. data/assets/images/social-icons/slack.svg +1 -0
  68. data/assets/images/social-icons/stackoverflow.svg +1 -0
  69. data/assets/images/social-icons/telegram.svg +1 -0
  70. data/assets/images/social-icons/twitch.svg +1 -0
  71. data/assets/images/social-icons/twitter.svg +1 -0
  72. data/assets/images/social-icons/x.svg +1 -0
  73. data/assets/images/social-icons/youtube.svg +1 -0
  74. data/assets/images/theme/vitepress-logo-large.svg +340 -0
  75. data/assets/images/theme/vitepress-logo-mini.svg +337 -0
  76. data/assets/js/vitepress-theme.js +1301 -0
  77. data/lib/jekyll/vitepress_theme/hooks.rb +111 -0
  78. data/lib/jekyll/vitepress_theme/version.rb +5 -0
  79. data/lib/jekyll-vitepress-theme.rb +3 -0
  80. metadata +143 -0
@@ -0,0 +1,315 @@
1
+ {% assign home_hero = page.hero %}
2
+ {% assign home_features = page.features %}
3
+ {% assign home_body = include.content | strip %}
4
+
5
+ <div class="VPHome">
6
+ {% if home_hero %}
7
+ {% assign hero_image = home_hero.image %}
8
+ <div class="VPHero{% if hero_image %} has-image{% endif %}">
9
+ <div class="container">
10
+ <div class="main">
11
+ {% if home_hero.logo %}
12
+ {% assign hero_logo = home_hero.logo %}
13
+ {% assign hero_logo_alt = hero_logo.alt | default: home_hero.name | default: site.title %}
14
+ {% assign hero_logo_width = hero_logo.width | default: 560 %}
15
+ {% assign hero_logo_height = hero_logo.height | default: 160 %}
16
+ {% assign hero_logo_light = hero_logo.light %}
17
+ {% assign hero_logo_dark = hero_logo.dark %}
18
+ {% assign hero_logo_src = nil %}
19
+ {% if hero_logo.src %}
20
+ {% assign hero_logo_src = hero_logo.src %}
21
+ {% elsif hero_logo.path %}
22
+ {% assign hero_logo_src = hero_logo.path %}
23
+ {% elsif hero_logo_light == nil and hero_logo_dark == nil %}
24
+ {% assign hero_logo_src = hero_logo %}
25
+ {% endif %}
26
+ <div class="hero-logo">
27
+ {% if hero_logo_light and hero_logo_dark %}
28
+ {% assign hero_logo_light_external = false %}
29
+ {% if hero_logo_light contains '://' or hero_logo_light contains 'data:' %}
30
+ {% assign hero_logo_light_external = true %}
31
+ {% endif %}
32
+ {% assign hero_logo_dark_external = false %}
33
+ {% if hero_logo_dark contains '://' or hero_logo_dark contains 'data:' %}
34
+ {% assign hero_logo_dark_external = true %}
35
+ {% endif %}
36
+ <img class="VPImage hero-logo-image light" src="{% if hero_logo_light_external %}{{ hero_logo_light }}{% else %}{{ hero_logo_light | relative_url }}{% endif %}" alt="{{ hero_logo_alt | escape }}" width="{{ hero_logo_width }}" height="{{ hero_logo_height }}">
37
+ <img class="VPImage hero-logo-image dark" src="{% if hero_logo_dark_external %}{{ hero_logo_dark }}{% else %}{{ hero_logo_dark | relative_url }}{% endif %}" alt="{{ hero_logo_alt | escape }}" width="{{ hero_logo_width }}" height="{{ hero_logo_height }}">
38
+ {% elsif hero_logo_light %}
39
+ {% assign hero_logo_light_external = false %}
40
+ {% if hero_logo_light contains '://' or hero_logo_light contains 'data:' %}
41
+ {% assign hero_logo_light_external = true %}
42
+ {% endif %}
43
+ <img class="VPImage hero-logo-image" src="{% if hero_logo_light_external %}{{ hero_logo_light }}{% else %}{{ hero_logo_light | relative_url }}{% endif %}" alt="{{ hero_logo_alt | escape }}" width="{{ hero_logo_width }}" height="{{ hero_logo_height }}">
44
+ {% elsif hero_logo_dark %}
45
+ {% assign hero_logo_dark_external = false %}
46
+ {% if hero_logo_dark contains '://' or hero_logo_dark contains 'data:' %}
47
+ {% assign hero_logo_dark_external = true %}
48
+ {% endif %}
49
+ <img class="VPImage hero-logo-image" src="{% if hero_logo_dark_external %}{{ hero_logo_dark }}{% else %}{{ hero_logo_dark | relative_url }}{% endif %}" alt="{{ hero_logo_alt | escape }}" width="{{ hero_logo_width }}" height="{{ hero_logo_height }}">
50
+ {% elsif hero_logo_src %}
51
+ {% assign hero_logo_src_external = false %}
52
+ {% if hero_logo_src contains '://' or hero_logo_src contains 'data:' %}
53
+ {% assign hero_logo_src_external = true %}
54
+ {% endif %}
55
+ <img class="VPImage hero-logo-image" src="{% if hero_logo_src_external %}{{ hero_logo_src }}{% else %}{{ hero_logo_src | relative_url }}{% endif %}" alt="{{ hero_logo_alt | escape }}" width="{{ hero_logo_width }}" height="{{ hero_logo_height }}">
56
+ {% endif %}
57
+ </div>
58
+ {% endif %}
59
+
60
+ {% if home_hero.name or home_hero.text %}
61
+ <h1 class="heading">
62
+ {% if home_hero.name %}
63
+ <span class="name clip">{{ home_hero.name }}</span>
64
+ {% endif %}
65
+ {% if home_hero.text %}
66
+ <span class="text">{{ home_hero.text }}</span>
67
+ {% endif %}
68
+ </h1>
69
+ {% endif %}
70
+
71
+ {% if home_hero.tagline %}
72
+ <p class="tagline">{{ home_hero.tagline }}</p>
73
+ {% endif %}
74
+
75
+ {% if home_hero.actions and home_hero.actions.size > 0 %}
76
+ <div class="actions">
77
+ {% for action in home_hero.actions %}
78
+ {% assign action_href = action.link | default: '#' | append: '' %}
79
+ {% assign action_external = false %}
80
+ {% assign action_href_parts = action_href | split: '://' %}
81
+ {% assign action_mailto = action_href | slice: 0, 7 %}
82
+ {% assign action_tel = action_href | slice: 0, 4 %}
83
+ {% if action_href_parts.size > 1 or action_mailto == 'mailto:' or action_tel == 'tel:' %}
84
+ {% assign action_external = true %}
85
+ {% endif %}
86
+ {% assign action_target = action.target %}
87
+ {% assign action_rel = action.rel %}
88
+ {% if action_external %}
89
+ {% if action_target == nil or action_target == '' %}
90
+ {% assign action_target = '_blank' %}
91
+ {% endif %}
92
+ {% if action_rel == nil or action_rel == '' %}
93
+ {% assign action_rel = 'noreferrer' %}
94
+ {% endif %}
95
+ {% endif %}
96
+ <div class="action">
97
+ <a
98
+ class="VPButton medium {{ action.theme | default: 'brand' }}"
99
+ href="{% if action_external %}{{ action_href }}{% else %}{{ action_href | relative_url }}{% endif %}"
100
+ {% if action_target %}target="{{ action_target }}"{% endif %}
101
+ {% if action_rel %}rel="{{ action_rel }}"{% endif %}
102
+ >
103
+ {{ action.text }}
104
+ </a>
105
+ </div>
106
+ {% endfor %}
107
+ </div>
108
+ {% endif %}
109
+ </div>
110
+
111
+ {% if hero_image %}
112
+ <div class="image">
113
+ <div class="image-container">
114
+ <div class="image-bg"></div>
115
+ {% assign hero_alt = hero_image.alt | default: home_hero.name | default: site.title %}
116
+ {% assign hero_width = hero_image.width | default: 320 %}
117
+ {% assign hero_height = hero_image.height | default: 320 %}
118
+ {% assign hero_light = hero_image.light %}
119
+ {% assign hero_dark = hero_image.dark %}
120
+ {% assign hero_src = nil %}
121
+ {% if hero_image.src %}
122
+ {% assign hero_src = hero_image.src %}
123
+ {% elsif hero_image.path %}
124
+ {% assign hero_src = hero_image.path %}
125
+ {% elsif hero_light == nil and hero_dark == nil %}
126
+ {% assign hero_src = hero_image %}
127
+ {% endif %}
128
+
129
+ {% if hero_light and hero_dark %}
130
+ {% assign hero_light_external = false %}
131
+ {% if hero_light contains '://' or hero_light contains 'data:' %}
132
+ {% assign hero_light_external = true %}
133
+ {% endif %}
134
+ {% assign hero_dark_external = false %}
135
+ {% if hero_dark contains '://' or hero_dark contains 'data:' %}
136
+ {% assign hero_dark_external = true %}
137
+ {% endif %}
138
+ <img class="VPImage image-src light" src="{% if hero_light_external %}{{ hero_light }}{% else %}{{ hero_light | relative_url }}{% endif %}" alt="{{ hero_alt | escape }}" width="{{ hero_width }}" height="{{ hero_height }}">
139
+ <img class="VPImage image-src dark" src="{% if hero_dark_external %}{{ hero_dark }}{% else %}{{ hero_dark | relative_url }}{% endif %}" alt="{{ hero_alt | escape }}" width="{{ hero_width }}" height="{{ hero_height }}">
140
+ {% elsif hero_light %}
141
+ {% assign hero_light_external = false %}
142
+ {% if hero_light contains '://' or hero_light contains 'data:' %}
143
+ {% assign hero_light_external = true %}
144
+ {% endif %}
145
+ <img class="VPImage image-src" src="{% if hero_light_external %}{{ hero_light }}{% else %}{{ hero_light | relative_url }}{% endif %}" alt="{{ hero_alt | escape }}" width="{{ hero_width }}" height="{{ hero_height }}">
146
+ {% elsif hero_dark %}
147
+ {% assign hero_dark_external = false %}
148
+ {% if hero_dark contains '://' or hero_dark contains 'data:' %}
149
+ {% assign hero_dark_external = true %}
150
+ {% endif %}
151
+ <img class="VPImage image-src" src="{% if hero_dark_external %}{{ hero_dark }}{% else %}{{ hero_dark | relative_url }}{% endif %}" alt="{{ hero_alt | escape }}" width="{{ hero_width }}" height="{{ hero_height }}">
152
+ {% elsif hero_src %}
153
+ {% assign hero_src_external = false %}
154
+ {% if hero_src contains '://' or hero_src contains 'data:' %}
155
+ {% assign hero_src_external = true %}
156
+ {% endif %}
157
+ <img class="VPImage image-src" src="{% if hero_src_external %}{{ hero_src }}{% else %}{{ hero_src | relative_url }}{% endif %}" alt="{{ hero_alt | escape }}" width="{{ hero_width }}" height="{{ hero_height }}">
158
+ {% endif %}
159
+ </div>
160
+ </div>
161
+ {% endif %}
162
+ </div>
163
+ </div>
164
+ {% endif %}
165
+
166
+ {% if home_features and home_features.size > 0 %}
167
+ {% assign feature_count = home_features.size %}
168
+ {% assign feature_mod = feature_count | modulo: 3 %}
169
+ {% assign feature_grid = '' %}
170
+ {% if feature_count == 2 %}
171
+ {% assign feature_grid = 'grid-2' %}
172
+ {% elsif feature_count == 3 %}
173
+ {% assign feature_grid = 'grid-3' %}
174
+ {% elsif feature_count > 3 and feature_mod == 0 %}
175
+ {% assign feature_grid = 'grid-6' %}
176
+ {% elsif feature_count > 3 %}
177
+ {% assign feature_grid = 'grid-4' %}
178
+ {% endif %}
179
+
180
+ <div class="VPFeatures VPHomeFeatures">
181
+ <div class="container">
182
+ <div class="items">
183
+ {% for feature in home_features %}
184
+ <div class="item{% if feature_grid %} {{ feature_grid }}{% endif %}">
185
+ {% capture feature_body %}
186
+ <article class="box">
187
+ {% if feature.icon %}
188
+ {% assign feature_icon = feature.icon %}
189
+ {% assign icon_is_object = false %}
190
+ {% if feature_icon.src or feature_icon.path or feature_icon.light or feature_icon.dark %}
191
+ {% assign icon_is_object = true %}
192
+ {% endif %}
193
+
194
+ {% if icon_is_object %}
195
+ {% assign icon_alt = feature_icon.alt | default: feature.title %}
196
+ {% assign icon_width = feature_icon.width | default: 48 %}
197
+ {% assign icon_height = feature_icon.height | default: 48 %}
198
+ {% assign icon_wrap = feature_icon.wrap %}
199
+ {% assign icon_light = feature_icon.light %}
200
+ {% assign icon_dark = feature_icon.dark %}
201
+ {% assign icon_src = nil %}
202
+ {% if feature_icon.src %}
203
+ {% assign icon_src = feature_icon.src %}
204
+ {% elsif feature_icon.path %}
205
+ {% assign icon_src = feature_icon.path %}
206
+ {% elsif icon_light == nil and icon_dark == nil %}
207
+ {% assign icon_src = feature_icon %}
208
+ {% endif %}
209
+
210
+ {% capture icon_images %}
211
+ {% if icon_light and icon_dark %}
212
+ {% assign icon_light_external = false %}
213
+ {% if icon_light contains '://' or icon_light contains 'data:' %}
214
+ {% assign icon_light_external = true %}
215
+ {% endif %}
216
+ {% assign icon_dark_external = false %}
217
+ {% if icon_dark contains '://' or icon_dark contains 'data:' %}
218
+ {% assign icon_dark_external = true %}
219
+ {% endif %}
220
+ <img class="VPImage{% if icon_wrap %} icon-image{% endif %} light" src="{% if icon_light_external %}{{ icon_light }}{% else %}{{ icon_light | relative_url }}{% endif %}" alt="{{ icon_alt | escape }}" width="{{ icon_width }}" height="{{ icon_height }}">
221
+ <img class="VPImage{% if icon_wrap %} icon-image{% endif %} dark" src="{% if icon_dark_external %}{{ icon_dark }}{% else %}{{ icon_dark | relative_url }}{% endif %}" alt="{{ icon_alt | escape }}" width="{{ icon_width }}" height="{{ icon_height }}">
222
+ {% elsif icon_light %}
223
+ {% assign icon_light_external = false %}
224
+ {% if icon_light contains '://' or icon_light contains 'data:' %}
225
+ {% assign icon_light_external = true %}
226
+ {% endif %}
227
+ <img class="VPImage{% if icon_wrap %} icon-image{% endif %}" src="{% if icon_light_external %}{{ icon_light }}{% else %}{{ icon_light | relative_url }}{% endif %}" alt="{{ icon_alt | escape }}" width="{{ icon_width }}" height="{{ icon_height }}">
228
+ {% elsif icon_dark %}
229
+ {% assign icon_dark_external = false %}
230
+ {% if icon_dark contains '://' or icon_dark contains 'data:' %}
231
+ {% assign icon_dark_external = true %}
232
+ {% endif %}
233
+ <img class="VPImage{% if icon_wrap %} icon-image{% endif %}" src="{% if icon_dark_external %}{{ icon_dark }}{% else %}{{ icon_dark | relative_url }}{% endif %}" alt="{{ icon_alt | escape }}" width="{{ icon_width }}" height="{{ icon_height }}">
234
+ {% elsif icon_src %}
235
+ {% assign icon_src_external = false %}
236
+ {% if icon_src contains '://' or icon_src contains 'data:' %}
237
+ {% assign icon_src_external = true %}
238
+ {% endif %}
239
+ <img class="VPImage{% if icon_wrap %} icon-image{% endif %}" src="{% if icon_src_external %}{{ icon_src }}{% else %}{{ icon_src | relative_url }}{% endif %}" alt="{{ icon_alt | escape }}" width="{{ icon_width }}" height="{{ icon_height }}">
240
+ {% endif %}
241
+ {% endcapture %}
242
+
243
+ {% if icon_wrap %}
244
+ <div class="icon">{{ icon_images }}</div>
245
+ {% else %}
246
+ {{ icon_images }}
247
+ {% endif %}
248
+ {% else %}
249
+ <div class="icon">{{ feature_icon }}</div>
250
+ {% endif %}
251
+ {% endif %}
252
+
253
+ <h2 class="title">{{ feature.title }}</h2>
254
+ {% if feature.details %}
255
+ <p class="details">{{ feature.details }}</p>
256
+ {% endif %}
257
+ {% if feature.linkText %}
258
+ <div class="link-text">
259
+ <p class="link-text-value">{{ feature.linkText }} <span class="vpi-arrow-right link-text-icon"></span></p>
260
+ </div>
261
+ {% endif %}
262
+ </article>
263
+ {% endcapture %}
264
+
265
+ {% if feature.link %}
266
+ {% assign feature_href = feature.link | append: '' %}
267
+ {% assign feature_external = false %}
268
+ {% assign feature_href_parts = feature_href | split: '://' %}
269
+ {% assign feature_mailto = feature_href | slice: 0, 7 %}
270
+ {% assign feature_tel = feature_href | slice: 0, 4 %}
271
+ {% if feature_href_parts.size > 1 or feature_mailto == 'mailto:' or feature_tel == 'tel:' %}
272
+ {% assign feature_external = true %}
273
+ {% endif %}
274
+ {% assign feature_target = feature.target %}
275
+ {% assign feature_rel = feature.rel %}
276
+ {% if feature_external %}
277
+ {% if feature_target == nil or feature_target == '' %}
278
+ {% assign feature_target = '_blank' %}
279
+ {% endif %}
280
+ {% if feature_rel == nil or feature_rel == '' %}
281
+ {% assign feature_rel = 'noreferrer' %}
282
+ {% endif %}
283
+ {% endif %}
284
+ <a
285
+ class="VPFeature link"
286
+ href="{% if feature_external %}{{ feature_href }}{% else %}{{ feature_href | relative_url }}{% endif %}"
287
+ {% if feature_target %}target="{{ feature_target }}"{% endif %}
288
+ {% if feature_rel %}rel="{{ feature_rel }}"{% endif %}
289
+ >
290
+ {{ feature_body }}
291
+ </a>
292
+ {% else %}
293
+ <div class="VPFeature">
294
+ {{ feature_body }}
295
+ </div>
296
+ {% endif %}
297
+ </div>
298
+ {% endfor %}
299
+ </div>
300
+ </div>
301
+ </div>
302
+ {% endif %}
303
+
304
+ {% if home_body != '' %}
305
+ {% if page.markdownStyles == false %}
306
+ {{ include.content }}
307
+ {% else %}
308
+ <div class="VPHomeContent">
309
+ <div class="vp-doc container">
310
+ {{ include.content }}
311
+ </div>
312
+ </div>
313
+ {% endif %}
314
+ {% endif %}
315
+ </div>
@@ -0,0 +1,23 @@
1
+ <div class="VPLocalNav has-sidebar" id="vp-local-nav">
2
+ <div class="container">
3
+ <button class="menu" aria-expanded="false" aria-controls="VPSidebarNav" id="vp-local-menu-button">
4
+ <span class="vpi-align-left menu-icon"></span>
5
+ <span class="menu-text">{{ site.vp_theme.sidebar_menu_label | default: 'Menu' }}</span>
6
+ </button>
7
+
8
+ <div class="VPLocalNavOutlineDropdown" id="vp-local-outline-dropdown">
9
+ <button type="button" id="vp-local-outline-button">
10
+ <span class="menu-text">{{ site.vp_theme.outline_title | default: 'On this page' }}</span>
11
+ <span class="vpi-chevron-right icon"></span>
12
+ </button>
13
+ <div class="items" hidden>
14
+ <div class="header">
15
+ <a class="top-link" href="#top" id="vp-local-top-link">{{ site.vp_theme.return_to_top_label | default: 'Return to top' }}</a>
16
+ </div>
17
+ <div class="outline">
18
+ <ul class="VPDocOutlineItem"></ul>
19
+ </div>
20
+ </div>
21
+ </div>
22
+ </div>
23
+ </div>
@@ -0,0 +1,232 @@
1
+ {% assign vp_version = site.vp_theme.version %}
2
+ {% assign vp_version_absolute_links = false %}
3
+ {% if site.data.versions and site.data.versions.items and site.data.versions.items.size > 0 %}
4
+ {% assign vp_version = site.data.versions %}
5
+ {% assign vp_version_absolute_links = true %}
6
+ {% endif %}
7
+
8
+ <header class="VPNav">
9
+ <div class="VPNavBar{% if include.has_sidebar %} has-sidebar{% endif %}{% if include.is_home %} home{% endif %} top" id="vp-nav-bar">
10
+ <div class="wrapper">
11
+ <div class="container">
12
+ <div class="title">
13
+ <div class="VPNavBarTitle{% if include.has_sidebar %} has-sidebar{% endif %}">
14
+ <a class="title" href="{{ '/' | relative_url }}">
15
+ {% assign nav_logo_light = site.vp_theme.logo_light | default: site.vp_theme.logo %}
16
+ {% assign nav_logo_dark = site.vp_theme.logo_dark %}
17
+ {% assign nav_site_title = site.vp_theme.site_title %}
18
+ {% assign nav_logo_width = site.vp_theme.logo_width | default: 24 %}
19
+ {% assign nav_logo_height = site.vp_theme.logo_height | default: 24 %}
20
+ {% if nav_logo_light %}
21
+ <img class="VPImage logo{% if nav_logo_dark %} light{% endif %}" src="{{ nav_logo_light | relative_url }}" width="{{ nav_logo_width }}" height="{{ nav_logo_height }}" alt="{{ site.vp_theme.logo_alt | default: '' | escape }}">
22
+ {% endif %}
23
+ {% if nav_logo_dark %}
24
+ <img class="VPImage logo dark" src="{{ nav_logo_dark | relative_url }}" width="{{ nav_logo_width }}" height="{{ nav_logo_height }}" alt="{{ site.vp_theme.logo_alt | default: '' | escape }}">
25
+ {% endif %}
26
+ {% if nav_site_title == nil %}
27
+ <span>{{ site.title }}</span>
28
+ {% elsif nav_site_title %}
29
+ <span>{{ nav_site_title }}</span>
30
+ {% endif %}
31
+ </a>
32
+ </div>
33
+ </div>
34
+
35
+ <div class="content">
36
+ <div class="content-body">
37
+ <div class="VPNavBarSearch search">
38
+ <button type="button" class="VPNavBarSearchButton" aria-label="Search" aria-keyshortcuts="/ control+k meta+k" aria-controls="vp-search" aria-expanded="false" id="vp-search-button">
39
+ <span class="vpi-search" aria-hidden="true"></span>
40
+ <span class="text">Search</span>
41
+ <span class="keys" aria-hidden="true">
42
+ <kbd class="key-cmd">⌘</kbd>
43
+ <kbd class="key-ctrl">Ctrl</kbd>
44
+ <kbd>K</kbd>
45
+ </span>
46
+ </button>
47
+ </div>
48
+
49
+ <nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu">
50
+ <span id="main-nav-aria-label" class="visually-hidden">Main Navigation</span>
51
+ {% for item in site.vp_theme.nav %}
52
+ {% assign is_active = false %}
53
+ {% if item.collections and item.collections contains page.collection %}
54
+ {% assign is_active = true %}
55
+ {% elsif page.url == item.link %}
56
+ {% assign is_active = true %}
57
+ {% endif %}
58
+ <a class="VPLink link VPNavBarMenuLink{% if is_active %} active{% endif %}" href="{{ item.link | relative_url }}">
59
+ <span>{{ item.text }}</span>
60
+ </a>
61
+ {% endfor %}
62
+
63
+ {% if vp_version and vp_version.items and vp_version.items.size > 0 %}
64
+ <div class="VPVersionSelector" id="vp-version-selector">
65
+ <button type="button" class="button" id="vp-version-button" aria-haspopup="true" aria-expanded="false" aria-controls="vp-version-menu">
66
+ <span class="text">
67
+ <span>{{ vp_version.current | default: 'Version' }}</span>
68
+ <span class="vpi-chevron-down text-icon"></span>
69
+ </span>
70
+ </button>
71
+ <div class="menu" id="vp-version-menu" hidden>
72
+ {% for version in vp_version.items %}
73
+ {% assign version_external = false %}
74
+ {% assign version_link_first_char = version.link | slice: 0, 1 %}
75
+ {% if version.external or version.link contains '://' %}
76
+ {% assign version_external = true %}
77
+ {% endif %}
78
+ {% assign version_href = version.link %}
79
+ {% if version_external %}
80
+ {% assign version_href = version.link %}
81
+ {% elsif vp_version_absolute_links and version_link_first_char == '/' %}
82
+ {% assign version_href = version.link %}
83
+ {% else %}
84
+ {% assign version_href = version.link | relative_url %}
85
+ {% endif %}
86
+ <a class="VPLink link{% if version_external %} vp-external-link-icon{% endif %}" href="{{ version_href }}"{% if version_external %} target="_blank" rel="noreferrer"{% endif %}>
87
+ <span>{{ version.text }}</span>
88
+ </a>
89
+ {% endfor %}
90
+ </div>
91
+ </div>
92
+ {% endif %}
93
+ </nav>
94
+
95
+ <div class="VPNavBarAppearance appearance">
96
+ <button class="VPSwitch VPSwitchAppearance theme-toggle" type="button" role="switch" aria-checked="false" title="{{ site.vp_theme.dark_mode_switch_title | default: 'Switch to dark theme' }}">
97
+ <span class="check">
98
+ <span class="icon">
99
+ <span class="vpi-sun sun"></span>
100
+ <span class="vpi-moon moon"></span>
101
+ </span>
102
+ </span>
103
+ </button>
104
+ </div>
105
+
106
+ <div class="VPSocialLinks VPNavBarSocialLinks social-links">
107
+ {% for social in site.vp_theme.social_links %}
108
+ {% assign social_icon_name = social.icon %}
109
+ {% assign social_icon_svg = nil %}
110
+ {% assign social_aria = social.aria_label %}
111
+ {% if social.icon and social.icon.svg %}
112
+ {% assign social_icon_svg = social.icon.svg %}
113
+ {% assign social_icon_name = nil %}
114
+ {% endif %}
115
+ {% if social_aria == nil or social_aria == '' %}
116
+ {% if social.icon and social.icon.title %}
117
+ {% assign social_aria = social.icon.title %}
118
+ {% elsif social_icon_name %}
119
+ {% assign social_aria = social_icon_name %}
120
+ {% else %}
121
+ {% assign social_aria = 'social link' %}
122
+ {% endif %}
123
+ {% endif %}
124
+ <a class="VPSocialLink no-icon" href="{{ social.link }}" aria-label="{{ social_aria }}" target="_blank" rel="me noopener">
125
+ {% if social_icon_svg %}
126
+ {{ social_icon_svg }}
127
+ {% else %}
128
+ <span class="vpi-social-{{ social_icon_name }}"></span>
129
+ {% endif %}
130
+ </a>
131
+ {% endfor %}
132
+ </div>
133
+
134
+ <button type="button" class="VPNavBarHamburger hamburger" id="vp-nav-hamburger" aria-label="mobile navigation" aria-expanded="false" aria-controls="VPNavScreen">
135
+ <span class="container">
136
+ <span class="top"></span>
137
+ <span class="middle"></span>
138
+ <span class="bottom"></span>
139
+ </span>
140
+ </button>
141
+ </div>
142
+ </div>
143
+ </div>
144
+ </div>
145
+
146
+ <div class="divider">
147
+ <div class="divider-line"></div>
148
+ </div>
149
+ </div>
150
+
151
+ <div class="VPNavScreen" id="VPNavScreen" hidden>
152
+ <div class="container">
153
+ <nav class="VPNavScreenMenu">
154
+ {% for item in site.vp_theme.nav %}
155
+ {% assign is_active = false %}
156
+ {% if item.collections and item.collections contains page.collection %}
157
+ {% assign is_active = true %}
158
+ {% elsif page.url == item.link %}
159
+ {% assign is_active = true %}
160
+ {% endif %}
161
+ <a class="VPLink link VPNavScreenMenuLink{% if is_active %} active{% endif %}" href="{{ item.link | relative_url }}">
162
+ <span>{{ item.text }}</span>
163
+ </a>
164
+ {% endfor %}
165
+ </nav>
166
+
167
+ {% if vp_version and vp_version.items and vp_version.items.size > 0 %}
168
+ <div class="VPNavScreenVersion version">
169
+ <p class="text">{{ vp_version.current | default: 'Version' }}</p>
170
+ {% for version in vp_version.items %}
171
+ {% assign version_external = false %}
172
+ {% assign version_link_first_char = version.link | slice: 0, 1 %}
173
+ {% if version.external or version.link contains '://' %}
174
+ {% assign version_external = true %}
175
+ {% endif %}
176
+ {% assign version_href = version.link %}
177
+ {% if version_external %}
178
+ {% assign version_href = version.link %}
179
+ {% elsif vp_version_absolute_links and version_link_first_char == '/' %}
180
+ {% assign version_href = version.link %}
181
+ {% else %}
182
+ {% assign version_href = version.link | relative_url %}
183
+ {% endif %}
184
+ <a class="VPLink link VPNavScreenMenuLink version-link" href="{{ version_href }}"{% if version_external %} target="_blank" rel="noreferrer"{% endif %}>
185
+ <span>{{ version.text }}</span>
186
+ </a>
187
+ {% endfor %}
188
+ </div>
189
+ {% endif %}
190
+
191
+ <div class="VPNavScreenAppearance appearance">
192
+ <p class="text">{{ site.vp_theme.dark_mode_switch_label | default: 'Appearance' }}</p>
193
+ <button class="VPSwitch VPSwitchAppearance theme-toggle" type="button" role="switch" aria-checked="false" title="{{ site.vp_theme.dark_mode_switch_title | default: 'Switch to dark theme' }}">
194
+ <span class="check">
195
+ <span class="icon">
196
+ <span class="vpi-sun sun"></span>
197
+ <span class="vpi-moon moon"></span>
198
+ </span>
199
+ </span>
200
+ </button>
201
+ </div>
202
+
203
+ <div class="VPSocialLinks VPNavScreenSocialLinks social-links">
204
+ {% for social in site.vp_theme.social_links %}
205
+ {% assign social_icon_name = social.icon %}
206
+ {% assign social_icon_svg = nil %}
207
+ {% assign social_aria = social.aria_label %}
208
+ {% if social.icon and social.icon.svg %}
209
+ {% assign social_icon_svg = social.icon.svg %}
210
+ {% assign social_icon_name = nil %}
211
+ {% endif %}
212
+ {% if social_aria == nil or social_aria == '' %}
213
+ {% if social.icon and social.icon.title %}
214
+ {% assign social_aria = social.icon.title %}
215
+ {% elsif social_icon_name %}
216
+ {% assign social_aria = social_icon_name %}
217
+ {% else %}
218
+ {% assign social_aria = 'social link' %}
219
+ {% endif %}
220
+ {% endif %}
221
+ <a class="VPSocialLink no-icon" href="{{ social.link }}" aria-label="{{ social_aria }}" target="_blank" rel="me noopener">
222
+ {% if social_icon_svg %}
223
+ {{ social_icon_svg }}
224
+ {% else %}
225
+ <span class="vpi-social-{{ social_icon_name }}"></span>
226
+ {% endif %}
227
+ </a>
228
+ {% endfor %}
229
+ </div>
230
+ </div>
231
+ </div>
232
+ </header>
@@ -0,0 +1,14 @@
1
+ <div class="VPSearch" id="vp-search" data-search-index-url="{{ '/search.json' | relative_url }}" hidden>
2
+ <div class="VPSearchBackdrop" id="vp-search-backdrop"></div>
3
+
4
+ <div class="VPSearchDialog" role="dialog" aria-modal="true" aria-labelledby="vp-search-label">
5
+ <div class="VPSearchBar">
6
+ <span class="vpi-search" aria-hidden="true"></span>
7
+ <label class="visually-hidden" for="vp-search-input" id="vp-search-label">Search documentation</label>
8
+ <input id="vp-search-input" type="search" autocomplete="off" placeholder="Search docs" />
9
+ <kbd>Esc</kbd>
10
+ </div>
11
+
12
+ <div class="VPSearchResults" id="vp-search-results" role="listbox" aria-label="Search results"></div>
13
+ </div>
14
+ </div>
@@ -0,0 +1,47 @@
1
+ <aside class="VPSidebar" id="vp-sidebar">
2
+ <div class="curtain"></div>
3
+ <nav class="nav" id="VPSidebarNav" aria-labelledby="sidebar-aria-label" tabindex="-1">
4
+ <span class="visually-hidden" id="sidebar-aria-label">Sidebar Navigation</span>
5
+
6
+ {% for group in site.vp_theme.sidebar_collections %}
7
+ {% assign docs = site[group.id] | sort: 'nav_order' %}
8
+ {% if docs.size > 0 %}
9
+ {% assign has_active = false %}
10
+ {% for doc in docs %}
11
+ {% if doc.url == page.url %}
12
+ {% assign has_active = true %}
13
+ {% endif %}
14
+ {% endfor %}
15
+
16
+ <div class="group no-transition">
17
+ <section class="VPSidebarItem level-0 collapsible{% if has_active %} has-active{% endif %}">
18
+ <div class="item" role="button" tabindex="0">
19
+ <div class="indicator"></div>
20
+ <h2 class="text">{{ group.text }}</h2>
21
+ <div class="caret" role="button" aria-label="toggle section" tabindex="0">
22
+ <span class="vpi-chevron-right caret-icon"></span>
23
+ </div>
24
+ </div>
25
+
26
+ <div class="items">
27
+ {% for doc in docs %}
28
+ {% assign active = false %}
29
+ {% if doc.url == page.url %}
30
+ {% assign active = true %}
31
+ {% endif %}
32
+ <div class="VPSidebarItem level-1 is-link{% if active %} is-active{% endif %}">
33
+ <div class="item">
34
+ <div class="indicator"></div>
35
+ <a class="VPLink link link" href="{{ doc.url | relative_url }}">
36
+ <p class="text">{{ doc.title }}</p>
37
+ </a>
38
+ </div>
39
+ </div>
40
+ {% endfor %}
41
+ </div>
42
+ </section>
43
+ </div>
44
+ {% endif %}
45
+ {% endfor %}
46
+ </nav>
47
+ </aside>
File without changes
@@ -0,0 +1 @@
1
+ <!-- Optional head slot override. Add custom tags in your site copy of this file. -->
File without changes