jekyll-vitepress-theme 1.5.3 → 1.6.1
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/README.md +7 -1
- data/_includes/alert.html +2 -2
- data/_includes/doc_content.html +24 -0
- data/_includes/doc_footer.html +3 -3
- data/_includes/head.html +1 -1
- data/_includes/home.html +10 -180
- data/_includes/link_attrs.html +19 -0
- data/_includes/nav.html +7 -174
- data/_includes/nav_menu_link.html +10 -0
- data/_includes/nav_social_links.html +52 -0
- data/_includes/version_link.html +27 -0
- data/_includes/vp_image.html +30 -0
- data/_layouts/default.html +2 -60
- data/assets/css/vitepress-overrides.css +16 -4
- data/assets/js/vitepress-theme.js +244 -320
- data/lib/jekyll/vitepress_theme/hooks.rb +30 -42
- data/lib/jekyll/vitepress_theme/version.rb +1 -1
- metadata +8 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 246651f124535a92e1af1bf8466f578ab2c33a17f7a2d28a3dfb378be43dc39b
|
|
4
|
+
data.tar.gz: 574e6e6b6662718a9a30bd4034a5c8b4a9959de518aad0d09274b3448a3b1314
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ca44a20bb4d0c9e11083eb469e1f67259831663770afded3cb003bc57e393e751edc6ed9bfa69c1df586231ec3d4327a82baffd41d0076e8018e3adb75e59362
|
|
7
|
+
data.tar.gz: 2484e3b350b4c0fb0403b69af60dc89a9b1cc13b005b503242192e1ce49a8784d8f5d2fee8eee206b5bb7ff1c6de5f598fd6574022d246e4b143fe310c0e790f
|
data/README.md
CHANGED
|
@@ -106,7 +106,13 @@ npm install
|
|
|
106
106
|
bundle exec jekyll serve --livereload
|
|
107
107
|
```
|
|
108
108
|
|
|
109
|
-
Run the
|
|
109
|
+
Run the tests:
|
|
110
|
+
|
|
111
|
+
```sh
|
|
112
|
+
bundle exec rake test
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Run the full local verification suite (tests, linters, build, smoke test, gem build):
|
|
110
116
|
|
|
111
117
|
```sh
|
|
112
118
|
bundle exec rake verify
|
data/_includes/alert.html
CHANGED
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
{% if alert_type == "details" %}
|
|
13
13
|
<details class="details custom-block">
|
|
14
14
|
<summary>{{ alert_title }}</summary>
|
|
15
|
-
|
|
15
|
+
{{ include.content | markdownify }}
|
|
16
16
|
</details>
|
|
17
17
|
{% else %}
|
|
18
18
|
<div class="{{ alert_type }} custom-block">
|
|
19
19
|
<p class="custom-block-title">{{ alert_title }}</p>
|
|
20
|
-
|
|
20
|
+
{{ include.content | markdownify }}
|
|
21
21
|
</div>
|
|
22
22
|
{% endif %}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{% assign page_theme = page.jekyll_vitepress %}
|
|
2
|
+
<main class="main">
|
|
3
|
+
<div class="vp-doc external-link-icon-enabled{% if page.url %} {{ page.url | replace: '/', '_' | replace: '.', '_' }}{% endif %}">
|
|
4
|
+
{% assign show_auto_page_title = false %}
|
|
5
|
+
{% if page.title and page_theme.auto_title != false %}
|
|
6
|
+
{% unless include.content contains '<h1' %}
|
|
7
|
+
{% assign show_auto_page_title = true %}
|
|
8
|
+
{% endunless %}
|
|
9
|
+
{% endif %}
|
|
10
|
+
<div class="vp-doc-header">
|
|
11
|
+
{% if show_auto_page_title %}
|
|
12
|
+
<h1>{{ page.title }}</h1>
|
|
13
|
+
{% endif %}
|
|
14
|
+
{% if page._raw_markdown and page._raw_markdown != "" %}
|
|
15
|
+
{% include copy_page_button.html %}
|
|
16
|
+
{% endif %}
|
|
17
|
+
</div>
|
|
18
|
+
{% if page._raw_markdown and page._raw_markdown != "" %}
|
|
19
|
+
<textarea class="vp-raw-markdown" style="display:none" aria-hidden="true">{{ page._raw_markdown | xml_escape }}</textarea>
|
|
20
|
+
{% endif %}
|
|
21
|
+
{{ include.content }}
|
|
22
|
+
</div>
|
|
23
|
+
</main>
|
|
24
|
+
{% include doc_footer.html %}
|
data/_includes/doc_footer.html
CHANGED
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
{% endif %}
|
|
100
100
|
{% endif %}
|
|
101
101
|
|
|
102
|
-
{% if page_theme.doc_footer
|
|
102
|
+
{% if page_theme.doc_footer %}
|
|
103
103
|
{% if page_theme.doc_footer.prev == false %}
|
|
104
104
|
{% assign prev_enabled = false %}
|
|
105
105
|
{% elsif page_theme.doc_footer.prev %}
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
{% assign next_title = nil %}
|
|
128
128
|
|
|
129
129
|
{% if prev_enabled %}
|
|
130
|
-
{% if page_theme.prev and page_theme.prev
|
|
130
|
+
{% if page_theme.prev and page_theme.prev.link %}
|
|
131
131
|
{% assign prev_url = page_theme.prev.link %}
|
|
132
132
|
{% assign prev_title = page_theme.prev.text | default: page_theme.prev.link %}
|
|
133
133
|
{% elsif prev_doc %}
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
{% endif %}
|
|
138
138
|
|
|
139
139
|
{% if next_enabled %}
|
|
140
|
-
{% if page_theme.next and page_theme.next
|
|
140
|
+
{% if page_theme.next and page_theme.next.link %}
|
|
141
141
|
{% assign next_url = page_theme.next.link %}
|
|
142
142
|
{% assign next_title = page_theme.next.text | default: page_theme.next.link %}
|
|
143
143
|
{% elsif next_doc %}
|
data/_includes/head.html
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
{% assign theme = site.jekyll_vitepress %}
|
|
37
37
|
{% assign branding = theme.branding %}
|
|
38
38
|
{% assign logo = branding.logo %}
|
|
39
|
-
<link rel="icon" href="{{ logo.default | default: logo.light | default: '/vitepress-logo-mini.svg' | relative_url }}">
|
|
39
|
+
<link rel="icon" href="{{ logo.default | default: logo.light | default: '/assets/images/theme/vitepress-logo-mini.svg' | relative_url }}">
|
|
40
40
|
|
|
41
41
|
{% assign typography = theme.typography %}
|
|
42
42
|
{% assign google_fonts_url = typography.google_fonts_url | default: 'https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap' %}
|
data/_includes/home.html
CHANGED
|
@@ -5,55 +5,13 @@
|
|
|
5
5
|
<div class="VPHome">
|
|
6
6
|
{% if home_hero %}
|
|
7
7
|
{% assign hero_image = home_hero.image %}
|
|
8
|
+
{% assign hero_fallback_alt = home_hero.name | default: site.title %}
|
|
8
9
|
<div class="VPHero{% if hero_image %} has-image{% endif %}">
|
|
9
10
|
<div class="container">
|
|
10
11
|
<div class="main">
|
|
11
12
|
{% 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
13
|
<div class="hero-logo">
|
|
27
|
-
{%
|
|
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 %}
|
|
14
|
+
{% include vp_image.html image=home_hero.logo class='hero-logo-image' default_alt=hero_fallback_alt default_width="560" default_height="160" %}
|
|
57
15
|
</div>
|
|
58
16
|
{% endif %}
|
|
59
17
|
|
|
@@ -75,31 +33,8 @@
|
|
|
75
33
|
{% if home_hero.actions and home_hero.actions.size > 0 %}
|
|
76
34
|
<div class="actions">
|
|
77
35
|
{% 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
36
|
<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
|
-
>
|
|
37
|
+
<a class="VPButton medium {{ action.theme | default: 'brand' }}" {% include link_attrs.html href=action.link target=action.target rel=action.rel %}>
|
|
103
38
|
{{ action.text }}
|
|
104
39
|
</a>
|
|
105
40
|
</div>
|
|
@@ -112,50 +47,7 @@
|
|
|
112
47
|
<div class="image">
|
|
113
48
|
<div class="image-container">
|
|
114
49
|
<div class="image-bg"></div>
|
|
115
|
-
{%
|
|
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 %}
|
|
50
|
+
{% include vp_image.html image=hero_image class='image-src' default_alt=hero_fallback_alt default_width="320" default_height="320" %}
|
|
159
51
|
</div>
|
|
160
52
|
</div>
|
|
161
53
|
{% endif %}
|
|
@@ -192,52 +84,13 @@
|
|
|
192
84
|
{% endif %}
|
|
193
85
|
|
|
194
86
|
{% 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
87
|
{% assign icon_wrap = feature_icon.wrap %}
|
|
199
|
-
{% assign
|
|
200
|
-
{%
|
|
201
|
-
|
|
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 %}
|
|
88
|
+
{% assign icon_class = '' %}
|
|
89
|
+
{% if icon_wrap %}
|
|
90
|
+
{% assign icon_class = 'icon-image' %}
|
|
208
91
|
{% endif %}
|
|
209
|
-
|
|
210
92
|
{% capture icon_images %}
|
|
211
|
-
{%
|
|
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 %}
|
|
93
|
+
{% include vp_image.html image=feature_icon class=icon_class default_alt=feature.title default_width="48" default_height="48" %}
|
|
241
94
|
{% endcapture %}
|
|
242
95
|
|
|
243
96
|
{% if icon_wrap %}
|
|
@@ -252,7 +105,7 @@
|
|
|
252
105
|
|
|
253
106
|
<h2 class="title">{{ feature.title }}</h2>
|
|
254
107
|
{% if feature.details %}
|
|
255
|
-
<
|
|
108
|
+
<div class="details">{{ feature.details | markdownify }}</div>
|
|
256
109
|
{% endif %}
|
|
257
110
|
{% if feature.link_text %}
|
|
258
111
|
<div class="link-text">
|
|
@@ -263,30 +116,7 @@
|
|
|
263
116
|
{% endcapture %}
|
|
264
117
|
|
|
265
118
|
{% if feature.link %}
|
|
266
|
-
{%
|
|
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
|
-
>
|
|
119
|
+
<a class="VPFeature link" {% include link_attrs.html href=feature.link target=feature.target rel=feature.rel %}>
|
|
290
120
|
{{ feature_body }}
|
|
291
121
|
</a>
|
|
292
122
|
{% else %}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{%- assign la_href = include.href | default: '#' | append: '' -%}
|
|
2
|
+
{%- assign la_external = false -%}
|
|
3
|
+
{%- assign la_parts = la_href | split: '://' -%}
|
|
4
|
+
{%- assign la_mailto = la_href | slice: 0, 7 -%}
|
|
5
|
+
{%- assign la_tel = la_href | slice: 0, 4 -%}
|
|
6
|
+
{%- if la_parts.size > 1 or la_mailto == 'mailto:' or la_tel == 'tel:' -%}
|
|
7
|
+
{%- assign la_external = true -%}
|
|
8
|
+
{%- endif -%}
|
|
9
|
+
{%- assign la_target = include.target -%}
|
|
10
|
+
{%- assign la_rel = include.rel -%}
|
|
11
|
+
{%- if la_external -%}
|
|
12
|
+
{%- if la_target == nil or la_target == '' -%}{%- assign la_target = '_blank' -%}{%- endif -%}
|
|
13
|
+
{%- if la_rel == nil or la_rel == '' -%}{%- assign la_rel = 'noreferrer' -%}{%- endif -%}
|
|
14
|
+
href="{{ la_href }}"
|
|
15
|
+
{%- else -%}
|
|
16
|
+
href="{{ la_href | relative_url }}"
|
|
17
|
+
{%- endif -%}
|
|
18
|
+
{%- if la_target %} target="{{ la_target }}"{% endif -%}
|
|
19
|
+
{%- if la_rel %} rel="{{ la_rel }}"{% endif -%}
|
data/_includes/nav.html
CHANGED
|
@@ -97,15 +97,7 @@
|
|
|
97
97
|
<nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu">
|
|
98
98
|
<span id="main-nav-aria-label" class="visually-hidden">Main Navigation</span>
|
|
99
99
|
{% for item in nav_items %}
|
|
100
|
-
{%
|
|
101
|
-
{% if item.collections and item.collections contains page.collection %}
|
|
102
|
-
{% assign is_active = true %}
|
|
103
|
-
{% elsif page.url == item.url %}
|
|
104
|
-
{% assign is_active = true %}
|
|
105
|
-
{% endif %}
|
|
106
|
-
<a class="VPLink link VPNavBarMenuLink{% if is_active %} active{% endif %}" href="{{ item.url | relative_url }}" data-vp-nav-link{% if item.collections %} data-collections="{{ item.collections | join: '|' }}"{% endif %}{% if include.has_sidebar and item.collections %} data-turbo="true" data-turbo-frame="vp-content-frame" data-turbo-action="advance"{% endif %}>
|
|
107
|
-
<span>{{ item.title }}</span>
|
|
108
|
-
</a>
|
|
100
|
+
{% include nav_menu_link.html item=item link_class='VPNavBarMenuLink' has_sidebar=include.has_sidebar %}
|
|
109
101
|
{% endfor %}
|
|
110
102
|
|
|
111
103
|
{% if versions and versions.items and versions.items.size > 0 %}
|
|
@@ -118,22 +110,7 @@
|
|
|
118
110
|
</button>
|
|
119
111
|
<div class="menu" id="vp-version-menu" hidden>
|
|
120
112
|
{% for version in versions.items %}
|
|
121
|
-
{%
|
|
122
|
-
{% assign version_link_first_char = version.url | slice: 0, 1 %}
|
|
123
|
-
{% if version.external or version.url contains '://' %}
|
|
124
|
-
{% assign version_external = true %}
|
|
125
|
-
{% endif %}
|
|
126
|
-
{% assign version_href = version.url %}
|
|
127
|
-
{% if version_external %}
|
|
128
|
-
{% assign version_href = version.url %}
|
|
129
|
-
{% elsif version_absolute_links and version_link_first_char == '/' %}
|
|
130
|
-
{% assign version_href = version.url %}
|
|
131
|
-
{% else %}
|
|
132
|
-
{% assign version_href = version.url | relative_url %}
|
|
133
|
-
{% endif %}
|
|
134
|
-
<a class="VPLink link{% if version_external %} vp-external-link-icon{% endif %}" href="{{ version_href }}"{% if version_external %} target="_blank" rel="noreferrer"{% endif %}>
|
|
135
|
-
<span>{{ version.title }}</span>
|
|
136
|
-
</a>
|
|
113
|
+
{% include version_link.html version=version %}
|
|
137
114
|
{% endfor %}
|
|
138
115
|
</div>
|
|
139
116
|
</div>
|
|
@@ -164,46 +141,7 @@
|
|
|
164
141
|
|
|
165
142
|
<div class="group">
|
|
166
143
|
<div class="item social-links">
|
|
167
|
-
|
|
168
|
-
{% if github_star_enabled %}
|
|
169
|
-
<div class="VPNavBarStar">
|
|
170
|
-
<a class="VPLink link no-icon VPNavBarStarLink" href="{{ github_star_url }}" aria-label="Star {{ github_star_repository }} on GitHub" target="_blank" rel="noreferrer noopener" data-github-star-repo="{{ github_star_repository | escape }}" data-github-star-show-count="{{ github_star_show_count }}">
|
|
171
|
-
<span class="VPNavBarStarIcon vpi-social-github" aria-hidden="true"></span>
|
|
172
|
-
<span class="VPNavBarStarText">{{ github_star_text }}</span>
|
|
173
|
-
<span class="VPNavBarStarCount" aria-hidden="true"{% unless github_star_show_count %} hidden{% endunless %}>{% if github_star_show_count %}...{% endif %}</span>
|
|
174
|
-
</a>
|
|
175
|
-
</div>
|
|
176
|
-
{% endif %}
|
|
177
|
-
{% if github_sponsor_enabled %}
|
|
178
|
-
<div class="VPNavBarStar VPNavBarSponsor">
|
|
179
|
-
<a class="VPLink link no-icon VPNavBarStarLink VPNavBarSponsorLink" href="{{ github_sponsor_url }}" aria-label="{{ github_sponsor_label | escape }}" target="_blank" rel="noreferrer noopener">
|
|
180
|
-
<span class="VPNavBarStarIcon VPNavBarSponsorIcon" aria-hidden="true">
|
|
181
|
-
<svg viewBox="0 0 16 16" focusable="false">
|
|
182
|
-
<path d="M7.655 14.916v-.001h-.002l-.006-.003-.018-.01a22.066 22.066 0 0 1-3.744-2.584C2.045 10.731 0 8.35 0 5.5 0 2.836 2.086 1 4.25 1 5.797 1 7.153 1.802 8 3.02 8.847 1.802 10.203 1 11.75 1 13.914 1 16 2.836 16 5.5c0 2.85-2.044 5.231-3.886 6.818a22.094 22.094 0 0 1-3.433 2.414 7.152 7.152 0 0 1-.31.17l-.018.01-.008.004a.75.75 0 0 1-.69 0Z"></path>
|
|
183
|
-
</svg>
|
|
184
|
-
</span>
|
|
185
|
-
<span class="VPNavBarStarText">{{ github_sponsor_text }}</span>
|
|
186
|
-
</a>
|
|
187
|
-
</div>
|
|
188
|
-
{% endif %}
|
|
189
|
-
|
|
190
|
-
{% for social in social_links %}
|
|
191
|
-
{% assign social_icon_name = social.icon %}
|
|
192
|
-
{% assign social_icon_svg = social.icon_svg %}
|
|
193
|
-
{% assign social_icon_key = social_icon_name | downcase %}
|
|
194
|
-
{% if github_star_enabled and social_icon_key == 'github' %}
|
|
195
|
-
{% continue %}
|
|
196
|
-
{% endif %}
|
|
197
|
-
{% assign social_aria = social.label | default: social_icon_name | default: 'social link' %}
|
|
198
|
-
<a class="VPSocialLink no-icon" href="{{ social.url }}" aria-label="{{ social_aria }}" target="_blank" rel="me noopener">
|
|
199
|
-
{% if social_icon_svg %}
|
|
200
|
-
{{ social_icon_svg }}
|
|
201
|
-
{% else %}
|
|
202
|
-
<span class="vpi-social-{{ social_icon_name }}"></span>
|
|
203
|
-
{% endif %}
|
|
204
|
-
</a>
|
|
205
|
-
{% endfor %}
|
|
206
|
-
</div>
|
|
144
|
+
{% include nav_social_links.html variant='extra' %}
|
|
207
145
|
</div>
|
|
208
146
|
</div>
|
|
209
147
|
</div>
|
|
@@ -221,45 +159,7 @@
|
|
|
221
159
|
</button>
|
|
222
160
|
</div>
|
|
223
161
|
|
|
224
|
-
|
|
225
|
-
{% if github_star_enabled %}
|
|
226
|
-
<div class="VPNavBarStar" id="vp-nav-star">
|
|
227
|
-
<a class="VPLink link no-icon VPNavBarStarLink" href="{{ github_star_url }}" aria-label="Star {{ github_star_repository }} on GitHub" target="_blank" rel="noreferrer noopener" data-github-star-repo="{{ github_star_repository | escape }}" data-github-star-show-count="{{ github_star_show_count }}">
|
|
228
|
-
<span class="VPNavBarStarIcon vpi-social-github" aria-hidden="true"></span>
|
|
229
|
-
<span class="VPNavBarStarText">{{ github_star_text }}</span>
|
|
230
|
-
<span class="VPNavBarStarCount" aria-hidden="true"{% unless github_star_show_count %} hidden{% endunless %}>{% if github_star_show_count %}...{% endif %}</span>
|
|
231
|
-
</a>
|
|
232
|
-
</div>
|
|
233
|
-
{% endif %}
|
|
234
|
-
{% if github_sponsor_enabled %}
|
|
235
|
-
<div class="VPNavBarStar VPNavBarSponsor" id="vp-nav-sponsor">
|
|
236
|
-
<a class="VPLink link no-icon VPNavBarStarLink VPNavBarSponsorLink" href="{{ github_sponsor_url }}" aria-label="{{ github_sponsor_label | escape }}" target="_blank" rel="noreferrer noopener">
|
|
237
|
-
<span class="VPNavBarStarIcon VPNavBarSponsorIcon" aria-hidden="true">
|
|
238
|
-
<svg viewBox="0 0 16 16" focusable="false">
|
|
239
|
-
<path d="M7.655 14.916v-.001h-.002l-.006-.003-.018-.01a22.066 22.066 0 0 1-3.744-2.584C2.045 10.731 0 8.35 0 5.5 0 2.836 2.086 1 4.25 1 5.797 1 7.153 1.802 8 3.02 8.847 1.802 10.203 1 11.75 1 13.914 1 16 2.836 16 5.5c0 2.85-2.044 5.231-3.886 6.818a22.094 22.094 0 0 1-3.433 2.414 7.152 7.152 0 0 1-.31.17l-.018.01-.008.004a.75.75 0 0 1-.69 0Z"></path>
|
|
240
|
-
</svg>
|
|
241
|
-
</span>
|
|
242
|
-
<span class="VPNavBarStarText">{{ github_sponsor_text }}</span>
|
|
243
|
-
</a>
|
|
244
|
-
</div>
|
|
245
|
-
{% endif %}
|
|
246
|
-
{% for social in social_links %}
|
|
247
|
-
{% assign social_icon_name = social.icon %}
|
|
248
|
-
{% assign social_icon_svg = social.icon_svg %}
|
|
249
|
-
{% assign social_icon_key = social_icon_name | downcase %}
|
|
250
|
-
{% if github_star_enabled and social_icon_key == 'github' %}
|
|
251
|
-
{% continue %}
|
|
252
|
-
{% endif %}
|
|
253
|
-
{% assign social_aria = social.label | default: social_icon_name | default: 'social link' %}
|
|
254
|
-
<a class="VPSocialLink no-icon" href="{{ social.url }}" aria-label="{{ social_aria }}" target="_blank" rel="me noopener">
|
|
255
|
-
{% if social_icon_svg %}
|
|
256
|
-
{{ social_icon_svg }}
|
|
257
|
-
{% else %}
|
|
258
|
-
<span class="vpi-social-{{ social_icon_name }}"></span>
|
|
259
|
-
{% endif %}
|
|
260
|
-
</a>
|
|
261
|
-
{% endfor %}
|
|
262
|
-
</div>
|
|
162
|
+
{% include nav_social_links.html variant='navbar' %}
|
|
263
163
|
|
|
264
164
|
<button type="button" class="VPNavBarHamburger hamburger" id="vp-nav-hamburger" aria-label="mobile navigation" aria-expanded="false" aria-controls="VPNavScreen">
|
|
265
165
|
<span class="container">
|
|
@@ -282,15 +182,7 @@
|
|
|
282
182
|
<div class="container">
|
|
283
183
|
<nav class="VPNavScreenMenu">
|
|
284
184
|
{% for item in nav_items %}
|
|
285
|
-
{%
|
|
286
|
-
{% if item.collections and item.collections contains page.collection %}
|
|
287
|
-
{% assign is_active = true %}
|
|
288
|
-
{% elsif page.url == item.url %}
|
|
289
|
-
{% assign is_active = true %}
|
|
290
|
-
{% endif %}
|
|
291
|
-
<a class="VPLink link VPNavScreenMenuLink{% if is_active %} active{% endif %}" href="{{ item.url | relative_url }}" data-vp-nav-link{% if item.collections %} data-collections="{{ item.collections | join: '|' }}"{% endif %}{% if include.has_sidebar and item.collections %} data-turbo="true" data-turbo-frame="vp-content-frame" data-turbo-action="advance"{% endif %}>
|
|
292
|
-
<span>{{ item.title }}</span>
|
|
293
|
-
</a>
|
|
185
|
+
{% include nav_menu_link.html item=item link_class='VPNavScreenMenuLink' has_sidebar=include.has_sidebar %}
|
|
294
186
|
{% endfor %}
|
|
295
187
|
</nav>
|
|
296
188
|
|
|
@@ -302,28 +194,7 @@
|
|
|
302
194
|
</button>
|
|
303
195
|
<div class="items" id="vp-nav-screen-version-items" aria-hidden="true">
|
|
304
196
|
{% for version in versions.items %}
|
|
305
|
-
{%
|
|
306
|
-
{% assign version_active = false %}
|
|
307
|
-
{% assign version_link_first_char = version.url | slice: 0, 1 %}
|
|
308
|
-
{% if version.external or version.url contains '://' %}
|
|
309
|
-
{% assign version_external = true %}
|
|
310
|
-
{% endif %}
|
|
311
|
-
{% if version.title == versions.current %}
|
|
312
|
-
{% assign version_active = true %}
|
|
313
|
-
{% endif %}
|
|
314
|
-
{% assign version_href = version.url %}
|
|
315
|
-
{% if version_external %}
|
|
316
|
-
{% assign version_href = version.url %}
|
|
317
|
-
{% elsif version_absolute_links and version_link_first_char == '/' %}
|
|
318
|
-
{% assign version_href = version.url %}
|
|
319
|
-
{% else %}
|
|
320
|
-
{% assign version_href = version.url | relative_url %}
|
|
321
|
-
{% endif %}
|
|
322
|
-
<div class="item">
|
|
323
|
-
<a class="VPLink link VPNavScreenVersionLink{% if version_active %} active{% endif %}{% if version_external %} vp-external-link-icon{% endif %}" href="{{ version_href }}"{% if version_external %} target="_blank" rel="noreferrer"{% endif %}>
|
|
324
|
-
<span>{{ version.title }}</span>
|
|
325
|
-
</a>
|
|
326
|
-
</div>
|
|
197
|
+
{% include version_link.html version=version variant='screen' %}
|
|
327
198
|
{% endfor %}
|
|
328
199
|
</div>
|
|
329
200
|
</div>
|
|
@@ -341,45 +212,7 @@
|
|
|
341
212
|
</button>
|
|
342
213
|
</div>
|
|
343
214
|
|
|
344
|
-
|
|
345
|
-
{% if github_star_enabled %}
|
|
346
|
-
<div class="VPNavBarStar VPNavScreenStar">
|
|
347
|
-
<a class="VPLink link no-icon VPNavBarStarLink VPNavScreenStarLink" href="{{ github_star_url }}" aria-label="Star {{ github_star_repository }} on GitHub" target="_blank" rel="noreferrer noopener" data-github-star-repo="{{ github_star_repository | escape }}" data-github-star-show-count="{{ github_star_show_count }}">
|
|
348
|
-
<span class="VPNavBarStarIcon vpi-social-github" aria-hidden="true"></span>
|
|
349
|
-
<span class="VPNavBarStarText">{{ github_star_text }}</span>
|
|
350
|
-
<span class="VPNavBarStarCount" aria-hidden="true"{% unless github_star_show_count %} hidden{% endunless %}>{% if github_star_show_count %}...{% endif %}</span>
|
|
351
|
-
</a>
|
|
352
|
-
</div>
|
|
353
|
-
{% endif %}
|
|
354
|
-
{% if github_sponsor_enabled %}
|
|
355
|
-
<div class="VPNavBarStar VPNavScreenStar VPNavBarSponsor">
|
|
356
|
-
<a class="VPLink link no-icon VPNavBarStarLink VPNavScreenStarLink VPNavBarSponsorLink" href="{{ github_sponsor_url }}" aria-label="{{ github_sponsor_label | escape }}" target="_blank" rel="noreferrer noopener">
|
|
357
|
-
<span class="VPNavBarStarIcon VPNavBarSponsorIcon" aria-hidden="true">
|
|
358
|
-
<svg viewBox="0 0 16 16" focusable="false">
|
|
359
|
-
<path d="M7.655 14.916v-.001h-.002l-.006-.003-.018-.01a22.066 22.066 0 0 1-3.744-2.584C2.045 10.731 0 8.35 0 5.5 0 2.836 2.086 1 4.25 1 5.797 1 7.153 1.802 8 3.02 8.847 1.802 10.203 1 11.75 1 13.914 1 16 2.836 16 5.5c0 2.85-2.044 5.231-3.886 6.818a22.094 22.094 0 0 1-3.433 2.414 7.152 7.152 0 0 1-.31.17l-.018.01-.008.004a.75.75 0 0 1-.69 0Z"></path>
|
|
360
|
-
</svg>
|
|
361
|
-
</span>
|
|
362
|
-
<span class="VPNavBarStarText">{{ github_sponsor_text }}</span>
|
|
363
|
-
</a>
|
|
364
|
-
</div>
|
|
365
|
-
{% endif %}
|
|
366
|
-
{% for social in social_links %}
|
|
367
|
-
{% assign social_icon_name = social.icon %}
|
|
368
|
-
{% assign social_icon_svg = social.icon_svg %}
|
|
369
|
-
{% assign social_icon_key = social_icon_name | downcase %}
|
|
370
|
-
{% if github_star_enabled and social_icon_key == 'github' %}
|
|
371
|
-
{% continue %}
|
|
372
|
-
{% endif %}
|
|
373
|
-
{% assign social_aria = social.label | default: social_icon_name | default: 'social link' %}
|
|
374
|
-
<a class="VPSocialLink no-icon" href="{{ social.url }}" aria-label="{{ social_aria }}" target="_blank" rel="me noopener">
|
|
375
|
-
{% if social_icon_svg %}
|
|
376
|
-
{{ social_icon_svg }}
|
|
377
|
-
{% else %}
|
|
378
|
-
<span class="vpi-social-{{ social_icon_name }}"></span>
|
|
379
|
-
{% endif %}
|
|
380
|
-
</a>
|
|
381
|
-
{% endfor %}
|
|
382
|
-
</div>
|
|
215
|
+
{% include nav_social_links.html variant='screen' %}
|
|
383
216
|
</div>
|
|
384
217
|
</div>
|
|
385
218
|
</header>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{% assign item = include.item %}
|
|
2
|
+
{% assign is_active = false %}
|
|
3
|
+
{% if item.collections and item.collections contains page.collection %}
|
|
4
|
+
{% assign is_active = true %}
|
|
5
|
+
{% elsif page.url == item.url %}
|
|
6
|
+
{% assign is_active = true %}
|
|
7
|
+
{% endif %}
|
|
8
|
+
<a class="VPLink link {{ include.link_class }}{% if is_active %} active{% endif %}" href="{{ item.url | relative_url }}" data-vp-nav-link{% if item.collections %} data-collections="{{ item.collections | join: '|' }}"{% endif %}{% if include.has_sidebar and item.collections %} data-turbo="true" data-turbo-frame="vp-content-frame" data-turbo-action="advance"{% endif %}>
|
|
9
|
+
<span>{{ item.title }}</span>
|
|
10
|
+
</a>
|