@vuepress/theme-default 2.0.0-rc.4 → 2.0.0-rc.41

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 (127) hide show
  1. package/lib/client/components/VPDarkIcon.vue +8 -0
  2. package/lib/client/components/{DropdownTransition.vue → VPDropdownTransition.vue} +10 -1
  3. package/lib/client/components/VPEditIcon.vue +12 -0
  4. package/lib/client/components/VPHome.vue +38 -0
  5. package/lib/client/components/VPHomeFeatures.vue +68 -0
  6. package/lib/client/components/{HomeFooter.vue → VPHomeFooter.vue} +16 -2
  7. package/lib/client/components/{HomeHero.vue → VPHomeHero.vue} +108 -7
  8. package/lib/client/components/VPLightIcon.vue +28 -0
  9. package/lib/client/components/VPNavbar.vue +125 -0
  10. package/lib/client/components/{NavbarBrand.vue → VPNavbarBrand.vue} +39 -6
  11. package/lib/client/components/VPNavbarDropdown.vue +320 -0
  12. package/lib/client/components/VPNavbarItems.vue +110 -0
  13. package/lib/client/components/VPPage.vue +69 -0
  14. package/lib/client/components/VPPageMeta.vue +132 -0
  15. package/lib/client/components/VPPageNav.vue +118 -0
  16. package/lib/client/components/VPSidebar.vue +112 -0
  17. package/lib/client/components/VPSidebarItem.vue +167 -0
  18. package/lib/client/components/{SidebarItems.vue → VPSidebarItems.vue} +31 -7
  19. package/lib/client/components/VPToggleColorModeButton.vue +54 -0
  20. package/lib/client/components/VPToggleSidebarButton.vue +92 -0
  21. package/lib/client/components/global/Badge.vue +60 -18
  22. package/lib/client/components/global/CodeGroup.d.ts +1 -0
  23. package/lib/client/components/global/CodeGroup.js +24 -4
  24. package/lib/client/components/global/CodeGroupItem.vue +5 -16
  25. package/lib/client/composables/index.d.ts +8 -0
  26. package/lib/client/composables/index.js +8 -0
  27. package/lib/client/composables/useContributors.d.ts +3 -0
  28. package/lib/client/composables/useContributors.js +14 -0
  29. package/lib/client/composables/useDarkMode.d.ts +0 -1
  30. package/lib/client/composables/useDarkMode.js +14 -13
  31. package/lib/client/composables/useEditLink.d.ts +3 -0
  32. package/lib/client/composables/useEditLink.js +31 -0
  33. package/lib/client/composables/useLastUpdated.d.ts +2 -0
  34. package/lib/client/composables/useLastUpdated.js +17 -0
  35. package/lib/client/composables/useNavbarConfig.d.ts +3 -0
  36. package/lib/client/composables/useNavbarConfig.js +25 -0
  37. package/lib/client/composables/useNavbarRepo.d.ts +6 -0
  38. package/lib/client/composables/useNavbarRepo.js +38 -0
  39. package/lib/client/composables/useNavbarSelectLanguage.d.ts +6 -0
  40. package/lib/client/composables/useNavbarSelectLanguage.js +58 -0
  41. package/lib/client/composables/useNavigate.d.ts +1 -0
  42. package/lib/client/composables/useNavigate.js +22 -0
  43. package/lib/client/composables/useRelatedLinks.d.ts +8 -0
  44. package/lib/client/composables/useRelatedLinks.js +91 -0
  45. package/lib/client/composables/useSidebarItems.d.ts +17 -12
  46. package/lib/client/composables/useSidebarItems.js +87 -52
  47. package/lib/client/composables/useUpdateDeviceStatus.js +5 -4
  48. package/lib/client/config.d.ts +2 -2
  49. package/lib/client/config.js +12 -13
  50. package/lib/client/index.d.ts +2 -1
  51. package/lib/client/index.js +1 -1
  52. package/lib/client/layouts/Layout.vue +121 -20
  53. package/lib/client/layouts/NotFound.vue +18 -4
  54. package/lib/client/shim.d.ts +3 -3
  55. package/lib/client/styles/_mixins.scss +4 -4
  56. package/lib/client/styles/_variables.module.scss +1 -1
  57. package/lib/client/styles/_variables.scss +1 -0
  58. package/lib/client/styles/arrow.scss +18 -24
  59. package/lib/client/styles/code-group.scss +34 -29
  60. package/lib/client/styles/content/code.scss +23 -0
  61. package/lib/client/styles/{custom-container.scss → content/custom-container.scss} +13 -13
  62. package/lib/client/styles/content/index.scss +4 -0
  63. package/lib/client/styles/content/normalize.scss +39 -0
  64. package/lib/client/styles/{toc.scss → content/toc.scss} +1 -1
  65. package/lib/client/styles/external-link-icon.scss +37 -0
  66. package/lib/client/styles/index.scss +3 -13
  67. package/lib/client/styles/layout.scss +3 -199
  68. package/lib/client/styles/normalize.scss +20 -148
  69. package/lib/client/styles/plugins.scss +20 -0
  70. package/lib/client/styles/vars-dark.scss +17 -12
  71. package/lib/client/styles/vars.scss +72 -34
  72. package/lib/client/typings.d.ts +13 -0
  73. package/lib/client/typings.js +1 -0
  74. package/lib/client/utils/getAutoLink.d.ts +9 -0
  75. package/lib/client/utils/getAutoLink.js +17 -0
  76. package/lib/client/utils/index.d.ts +3 -2
  77. package/lib/client/utils/index.js +3 -2
  78. package/lib/client/utils/isActiveSidebarItem.d.ts +3 -3
  79. package/lib/client/utils/isActiveSidebarItem.js +3 -3
  80. package/lib/client/utils/isLinkInternal.d.ts +1 -0
  81. package/lib/client/utils/isLinkInternal.js +2 -0
  82. package/lib/client/utils/resolveEditLink.d.ts +1 -1
  83. package/lib/client/utils/resolvePrefix.d.ts +1 -0
  84. package/lib/client/utils/resolvePrefix.js +4 -0
  85. package/lib/node/defaultTheme.js +83 -24
  86. package/lib/node/index.d.ts +2 -1
  87. package/lib/node/index.js +1 -1
  88. package/lib/node/utils/assignDefaultLocaleOptions.js +1 -1
  89. package/lib/node/utils/resolveContainerPluginOptions.d.ts +3 -3
  90. package/lib/node/utils/resolveContainerPluginOptions.js +2 -2
  91. package/lib/shared/index.d.ts +2 -0
  92. package/lib/shared/index.js +2 -0
  93. package/lib/shared/nav.d.ts +19 -30
  94. package/lib/shared/navbar.d.ts +21 -0
  95. package/lib/shared/navbar.js +1 -0
  96. package/lib/shared/options.d.ts +31 -8
  97. package/lib/shared/page.d.ts +6 -4
  98. package/lib/shared/sidebar.d.ts +26 -0
  99. package/lib/shared/sidebar.js +1 -0
  100. package/package.json +22 -26
  101. package/templates/build.html +19 -10
  102. package/lib/client/components/AutoLink.vue +0 -113
  103. package/lib/client/components/Home.vue +0 -15
  104. package/lib/client/components/HomeContent.vue +0 -5
  105. package/lib/client/components/HomeFeatures.vue +0 -22
  106. package/lib/client/components/Navbar.vue +0 -79
  107. package/lib/client/components/NavbarDropdown.vue +0 -126
  108. package/lib/client/components/NavbarItems.vue +0 -199
  109. package/lib/client/components/Page.vue +0 -31
  110. package/lib/client/components/PageMeta.vue +0 -124
  111. package/lib/client/components/PageNav.vue +0 -122
  112. package/lib/client/components/Sidebar.vue +0 -18
  113. package/lib/client/components/SidebarItem.vue +0 -87
  114. package/lib/client/components/ToggleColorModeButton.vue +0 -57
  115. package/lib/client/components/ToggleSidebarButton.vue +0 -24
  116. package/lib/client/styles/badge.scss +0 -36
  117. package/lib/client/styles/code.scss +0 -263
  118. package/lib/client/styles/home.scss +0 -168
  119. package/lib/client/styles/navbar-dropdown.scss +0 -183
  120. package/lib/client/styles/navbar.scss +0 -197
  121. package/lib/client/styles/page.scss +0 -87
  122. package/lib/client/styles/sidebar.scss +0 -134
  123. package/lib/client/styles/transitions.scss +0 -22
  124. package/lib/client/utils/getNavLink.d.ts +0 -15
  125. package/lib/client/utils/getNavLink.js +0 -18
  126. package/lib/client/utils/getResolveRouteWithRedirect.d.ts +0 -5
  127. package/lib/client/utils/getResolveRouteWithRedirect.js +0 -22
@@ -0,0 +1,320 @@
1
+ <script setup lang="ts">
2
+ import VPDropdownTransition from '@theme/VPDropdownTransition.vue'
3
+ import { computed, ref, toRefs, watch } from 'vue'
4
+ import { AutoLink, useRoute } from 'vuepress/client'
5
+ import type { AutoLinkOptions, NavGroup } from '../../shared/index.js'
6
+
7
+ const props = defineProps<{
8
+ item: NavGroup<AutoLinkOptions | NavGroup<AutoLinkOptions>>
9
+ }>()
10
+
11
+ const { item } = toRefs(props)
12
+ const route = useRoute()
13
+
14
+ const open = ref(false)
15
+
16
+ const dropdownAriaLabel = computed(
17
+ () => item.value.ariaLabel || item.value.text,
18
+ )
19
+
20
+ const isLastItemOfArray = (item: unknown, arr: unknown[]): boolean =>
21
+ arr[arr.length - 1] === item
22
+
23
+ /**
24
+ * Open the dropdown when user tab and click from keyboard.
25
+ *
26
+ * Use event.detail to detect tab and click from keyboard.
27
+ * The Tab + Click is UIEvent > KeyboardEvent, so the detail is 0.
28
+ *
29
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/detail
30
+ */
31
+ const handleDropdown = (e): void => {
32
+ const isTriggerByTab = e.detail === 0
33
+
34
+ open.value = isTriggerByTab ? !open.value : false
35
+ }
36
+
37
+ watch(
38
+ () => route.path,
39
+ () => {
40
+ open.value = false
41
+ },
42
+ )
43
+ </script>
44
+
45
+ <template>
46
+ <div class="vp-navbar-dropdown-wrapper" :class="{ open }">
47
+ <button
48
+ class="vp-navbar-dropdown-title"
49
+ type="button"
50
+ :aria-label="dropdownAriaLabel"
51
+ @click="handleDropdown"
52
+ >
53
+ <span class="title">{{ item.text }}</span>
54
+ <span class="arrow down" />
55
+ </button>
56
+
57
+ <button
58
+ class="vp-navbar-dropdown-title-mobile"
59
+ type="button"
60
+ :aria-label="dropdownAriaLabel"
61
+ @click="open = !open"
62
+ >
63
+ <span class="title">{{ item.text }}</span>
64
+ <span class="arrow" :class="open ? 'down' : 'right'" />
65
+ </button>
66
+
67
+ <VPDropdownTransition>
68
+ <ul v-show="open" class="vp-navbar-dropdown">
69
+ <li
70
+ v-for="child in item.children"
71
+ :key="child.text"
72
+ class="vp-navbar-dropdown-item"
73
+ >
74
+ <template v-if="'children' in child">
75
+ <h4 class="vp-navbar-dropdown-subtitle">
76
+ <AutoLink
77
+ v-if="child.link"
78
+ :config="child"
79
+ @focusout="
80
+ isLastItemOfArray(child, item.children) &&
81
+ child.children.length === 0 &&
82
+ (open = false)
83
+ "
84
+ />
85
+
86
+ <span v-else>{{ child.text }}</span>
87
+ </h4>
88
+
89
+ <ul class="vp-navbar-dropdown-subitem-wrapper">
90
+ <li
91
+ v-for="grandchild in child.children"
92
+ :key="grandchild.link"
93
+ class="vp-navbar-dropdown-subitem"
94
+ >
95
+ <AutoLink
96
+ :config="grandchild"
97
+ @focusout="
98
+ isLastItemOfArray(grandchild, child.children) &&
99
+ isLastItemOfArray(child, item.children) &&
100
+ (open = false)
101
+ "
102
+ />
103
+ </li>
104
+ </ul>
105
+ </template>
106
+
107
+ <template v-else>
108
+ <AutoLink
109
+ :config="child"
110
+ @focusout="
111
+ isLastItemOfArray(child, item.children) && (open = false)
112
+ "
113
+ />
114
+ </template>
115
+ </li>
116
+ </ul>
117
+ </VPDropdownTransition>
118
+ </div>
119
+ </template>
120
+
121
+ <style lang="scss">
122
+ @use '../styles/mixins';
123
+ @import '../styles/variables';
124
+
125
+ .vp-navbar-dropdown-wrapper {
126
+ cursor: pointer;
127
+
128
+ &:not(.mobile) {
129
+ height: 1.8rem;
130
+
131
+ &:hover,
132
+ &.open {
133
+ .vp-navbar-dropdown {
134
+ // override the inline style.
135
+ display: block !important;
136
+ }
137
+ }
138
+ }
139
+ }
140
+
141
+ .vp-navbar-dropdown {
142
+ .vp-navbar-dropdown-wrapper.mobile & {
143
+ @include mixins.dropdown-wrapper;
144
+
145
+ padding-top: 0.5rem;
146
+ }
147
+
148
+ .vp-navbar-dropdown-wrapper:not(.mobile) & {
149
+ position: absolute;
150
+ top: 100%;
151
+ right: 0;
152
+
153
+ display: none;
154
+
155
+ overflow-y: auto;
156
+
157
+ box-sizing: border-box;
158
+
159
+ // Avoid height shake by clicking
160
+ height: auto !important;
161
+ max-height: calc(100vh - 2.7rem);
162
+ margin: 0;
163
+ padding: 0.6rem 0;
164
+ border: 1px solid var(--c-border);
165
+ border-bottom-color: var(--c-border-dark);
166
+ border-radius: 0.25rem;
167
+
168
+ background-color: var(--c-bg-navbar);
169
+
170
+ text-align: left;
171
+ white-space: nowrap;
172
+ }
173
+ }
174
+
175
+ .vp-navbar-dropdown-title {
176
+ display: block;
177
+
178
+ padding: inherit;
179
+ border: none;
180
+
181
+ background: transparent;
182
+ color: var(--c-text);
183
+
184
+ font-weight: 500;
185
+ font-size: 0.9rem;
186
+ font-family: inherit;
187
+ line-height: 1.4rem;
188
+
189
+ cursor: inherit;
190
+
191
+ .vp-navbar-dropdown-wrapper.mobile & {
192
+ display: none;
193
+ }
194
+
195
+ &:hover {
196
+ border-color: transparent;
197
+ }
198
+ }
199
+
200
+ .vp-navbar-dropdown-title-mobile {
201
+ display: none;
202
+
203
+ padding: inherit;
204
+ border: none;
205
+
206
+ background: transparent;
207
+ color: var(--c-text);
208
+
209
+ font-weight: 600;
210
+ font-size: inherit;
211
+ font-family: inherit;
212
+ line-height: 1.4rem;
213
+
214
+ cursor: inherit;
215
+
216
+ .vp-navbar-dropdown-wrapper.mobile & {
217
+ display: block;
218
+ }
219
+
220
+ &:hover {
221
+ color: var(--c-text-accent);
222
+ }
223
+ }
224
+
225
+ .vp-navbar-dropdown-item {
226
+ color: inherit;
227
+ line-height: 1.7rem;
228
+
229
+ a {
230
+ position: relative;
231
+
232
+ display: block;
233
+
234
+ margin-bottom: 0;
235
+ padding: 0 1.5rem 0 1.25rem;
236
+ border-bottom: none;
237
+
238
+ font-weight: 400;
239
+ line-height: 1.7rem;
240
+
241
+ &:hover {
242
+ color: var(--c-text-accent);
243
+ }
244
+
245
+ &.route-link-active {
246
+ color: var(--c-text-accent);
247
+
248
+ &::after {
249
+ content: '';
250
+
251
+ position: absolute;
252
+ top: calc(50% - 2px);
253
+ left: 9px;
254
+
255
+ width: 0;
256
+ height: 0;
257
+ border-top: 3px solid transparent;
258
+ border-bottom: 3px solid transparent;
259
+ border-left: 5px solid var(--c-text-accent);
260
+ }
261
+ }
262
+ }
263
+
264
+ .vp-navbar-dropdown-wrapper.mobile & > a {
265
+ font-size: 15px;
266
+ line-height: 2rem;
267
+ }
268
+ }
269
+
270
+ .vp-navbar-dropdown-subtitle {
271
+ margin: 0.45rem 0 0;
272
+ padding: 1rem 0 0.45rem;
273
+ border-top: 1px solid var(--c-border);
274
+ font-size: 0.9rem;
275
+
276
+ .vp-navbar-dropdown-wrapper.mobile & {
277
+ margin-top: 0;
278
+ padding-top: 0;
279
+ padding-bottom: 0;
280
+ border-top: 0;
281
+
282
+ font-size: 15px;
283
+ line-height: 2rem;
284
+ }
285
+
286
+ .vp-navbar-dropdown-item:first-child & {
287
+ margin-top: 0;
288
+ padding-top: 0;
289
+ border-top: 0;
290
+ }
291
+
292
+ > span {
293
+ padding: 0 1.5rem 0 1.25rem;
294
+ }
295
+
296
+ > a {
297
+ font-weight: inherit;
298
+
299
+ &.route-link-active {
300
+ &::after {
301
+ display: none;
302
+ }
303
+ }
304
+ }
305
+ }
306
+
307
+ .vp-navbar-dropdown-subitem-wrapper {
308
+ padding: 0;
309
+ list-style: none;
310
+ }
311
+
312
+ .vp-navbar-dropdown-subitem {
313
+ font-size: 0.9em;
314
+
315
+ .vp-navbar-dropdown-wrapper.mobile & {
316
+ padding-left: 1rem;
317
+ font-size: 14px;
318
+ }
319
+ }
320
+ </style>
@@ -0,0 +1,110 @@
1
+ <script setup lang="ts">
2
+ import { useNavbarConfig } from '@theme/useNavbarConfig'
3
+ import { useNavbarRepo } from '@theme/useNavbarRepo'
4
+ import { useNavbarSelectLanguage } from '@theme/useNavbarSelectLanguage'
5
+ import { useThemeLocaleData } from '@theme/useThemeData'
6
+ import { DeviceType, useUpdateDeviceStatus } from '@theme/useUpdateDeviceStatus'
7
+ import VPNavbarDropdown from '@theme/VPNavbarDropdown.vue'
8
+ import { computed, ref } from 'vue'
9
+ import { AutoLink } from 'vuepress/client'
10
+
11
+ const navbarConfig = useNavbarConfig()
12
+ const navbarSelectLanguage = useNavbarSelectLanguage()
13
+ const navbarRepo = useNavbarRepo()
14
+
15
+ const isMobile = ref(false)
16
+
17
+ const navbarLabel = computed(() => {
18
+ const themeLocale = useThemeLocaleData()
19
+ return themeLocale.value.navbarLabel ?? 'site navigation'
20
+ })
21
+
22
+ const navbarLinks = computed(() => [
23
+ ...navbarConfig.value,
24
+ ...navbarSelectLanguage.value,
25
+ ...navbarRepo.value,
26
+ ])
27
+
28
+ useUpdateDeviceStatus(
29
+ DeviceType.MOBILE,
30
+ (mobileDesktopBreakpoint: number): void => {
31
+ // avoid overlapping of long title and long navbar links
32
+ isMobile.value = window.innerWidth < mobileDesktopBreakpoint
33
+ },
34
+ )
35
+ </script>
36
+
37
+ <template>
38
+ <nav
39
+ v-if="navbarLinks.length"
40
+ class="vp-navbar-items"
41
+ :aria-label="navbarLabel"
42
+ >
43
+ <div v-for="item in navbarLinks" :key="item.text" class="vp-navbar-item">
44
+ <VPNavbarDropdown
45
+ v-if="'children' in item"
46
+ :class="{ mobile: isMobile }"
47
+ :item="item"
48
+ />
49
+ <AutoLink v-else :config="item" />
50
+ </div>
51
+ </nav>
52
+ </template>
53
+
54
+ <style lang="scss">
55
+ @import '../styles/variables';
56
+
57
+ .vp-navbar-items {
58
+ display: inline-block;
59
+
60
+ @media print {
61
+ display: none;
62
+ }
63
+
64
+ a {
65
+ display: inline-block;
66
+ color: inherit;
67
+ line-height: 1.4rem;
68
+
69
+ &:hover,
70
+ &.route-link-active {
71
+ color: var(--c-text);
72
+ }
73
+ }
74
+ }
75
+
76
+ .vp-navbar-item {
77
+ position: relative;
78
+ display: inline-block;
79
+ margin-left: 1.5rem;
80
+ line-height: var(--navbar-line-height);
81
+
82
+ @media (max-width: $MQMobile) {
83
+ margin-left: 0;
84
+ }
85
+
86
+ &:first-child {
87
+ margin-left: 0;
88
+ }
89
+
90
+ a {
91
+ &:hover,
92
+ &.route-link-active {
93
+ color: var(--c-text-accent);
94
+ }
95
+ }
96
+
97
+ > a {
98
+ &:hover,
99
+ &.route-link-active {
100
+ margin-bottom: -2px;
101
+ border-bottom: 2px solid var(--c-text-accent);
102
+
103
+ @media (max-width: $MQMobile) {
104
+ margin-bottom: 0;
105
+ border-bottom: none;
106
+ }
107
+ }
108
+ }
109
+ }
110
+ </style>
@@ -0,0 +1,69 @@
1
+ <script setup lang="ts">
2
+ import VPPageMeta from '@theme/VPPageMeta.vue'
3
+ import VPPageNav from '@theme/VPPageNav.vue'
4
+ import { Content } from 'vuepress/client'
5
+ import { setupHeaders } from '../composables/index.js'
6
+
7
+ defineSlots<{
8
+ 'top'?: (props: Record<never, never>) => any
9
+ 'bottom'?: (props: Record<never, never>) => any
10
+ 'content-top'?: (props: Record<never, never>) => any
11
+ 'content-bottom'?: (props: Record<never, never>) => any
12
+ }>()
13
+
14
+ setupHeaders()
15
+ </script>
16
+
17
+ <template>
18
+ <main class="vp-page">
19
+ <slot name="top" />
20
+
21
+ <div class="theme-default-content">
22
+ <slot name="content-top" />
23
+
24
+ <Content />
25
+
26
+ <slot name="content-bottom" />
27
+ </div>
28
+
29
+ <VPPageMeta />
30
+
31
+ <VPPageNav />
32
+
33
+ <slot name="bottom" />
34
+ </main>
35
+ </template>
36
+
37
+ <style lang="scss">
38
+ @use '../styles/mixins';
39
+ @import '../styles/variables';
40
+
41
+ .vp-page {
42
+ display: block;
43
+
44
+ // leave space for navbar
45
+ padding-top: var(--navbar-height);
46
+ padding-bottom: 2rem;
47
+
48
+ // leave space for sidebar
49
+ padding-left: var(--sidebar-width);
50
+
51
+ // narrow desktop / iPad
52
+ @media (max-width: $MQNarrow) {
53
+ // leave space for sidebar
54
+ padding-left: var(--sidebar-width-mobile);
55
+ }
56
+
57
+ // wide mobile
58
+ @media (max-width: $MQMobile) {
59
+ // sidebar is collapsed
60
+ padding-left: 0;
61
+ }
62
+
63
+ .theme-default-content {
64
+ @include mixins.content-wrapper;
65
+
66
+ padding-top: 0;
67
+ }
68
+ }
69
+ </style>
@@ -0,0 +1,132 @@
1
+ <script setup lang="ts">
2
+ import { useContributors } from '@theme/useContributors'
3
+ import { useEditLink } from '@theme/useEditLink'
4
+ import { useLastUpdated } from '@theme/useLastUpdated'
5
+ import { useThemeLocaleData } from '@theme/useThemeData'
6
+ import VPEditIcon from '@theme/VPEditIcon.vue'
7
+ import { AutoLink } from 'vuepress/client'
8
+
9
+ const themeLocale = useThemeLocaleData()
10
+ const editLink = useEditLink()
11
+ const lastUpdated = useLastUpdated()
12
+ const contributors = useContributors()
13
+ </script>
14
+
15
+ <template>
16
+ <footer class="vp-page-meta">
17
+ <div v-if="editLink" class="vp-meta-item edit-link">
18
+ <AutoLink class="label" :config="editLink">
19
+ <template #before>
20
+ <VPEditIcon />
21
+ </template>
22
+ </AutoLink>
23
+ </div>
24
+
25
+ <div class="vp-meta-item git-info">
26
+ <div v-if="lastUpdated" class="vp-meta-item last-updated">
27
+ <span class="meta-item-label">{{ themeLocale.lastUpdatedText }}: </span>
28
+ <ClientOnly>
29
+ <span class="meta-item-info">{{ lastUpdated }}</span>
30
+ </ClientOnly>
31
+ </div>
32
+
33
+ <div
34
+ v-if="contributors && contributors.length"
35
+ class="vp-meta-item contributors"
36
+ >
37
+ <span class="meta-item-label"
38
+ >{{ themeLocale.contributorsText }}:
39
+ </span>
40
+ <span class="meta-item-info">
41
+ <template v-for="(contributor, index) in contributors" :key="index">
42
+ <span class="contributor" :title="`email: ${contributor.email}`">
43
+ {{ contributor.name }}
44
+ </span>
45
+ <template v-if="index !== contributors.length - 1">, </template>
46
+ </template>
47
+ </span>
48
+ </div>
49
+ </div>
50
+ </footer>
51
+ </template>
52
+
53
+ <style lang="scss">
54
+ @use '../styles/mixins';
55
+ @import '../styles/variables';
56
+
57
+ .vp-page-meta {
58
+ @include mixins.content-wrapper;
59
+
60
+ display: flex;
61
+ flex-wrap: wrap;
62
+ justify-content: space-between;
63
+
64
+ overflow: auto;
65
+
66
+ padding-top: 0.75rem;
67
+ padding-bottom: 0.75rem;
68
+
69
+ @media print {
70
+ margin: 0 !important;
71
+ padding-right: 0 !important;
72
+ padding-left: 0 !important;
73
+ }
74
+
75
+ @media (max-width: $MQMobile) {
76
+ display: block;
77
+ }
78
+
79
+ .vp-meta-item {
80
+ flex-grow: 1;
81
+
82
+ .vp-meta-label {
83
+ font-weight: 500;
84
+
85
+ &:not(a) {
86
+ color: var(--c-text-lighter);
87
+ }
88
+ }
89
+
90
+ .vp-meta-info {
91
+ color: var(--c-text-quote);
92
+ font-weight: 400;
93
+ }
94
+ }
95
+
96
+ .git-info {
97
+ text-align: end;
98
+ }
99
+
100
+ .edit-link {
101
+ margin-top: 0.25rem;
102
+ margin-right: 0.5rem;
103
+ margin-bottom: 0.25rem;
104
+ font-size: 14px;
105
+
106
+ @media print {
107
+ display: none;
108
+ }
109
+
110
+ .edit-icon {
111
+ position: relative;
112
+ bottom: -0.125em;
113
+
114
+ width: 1em;
115
+ height: 1em;
116
+ margin-right: 0.25em;
117
+ }
118
+ }
119
+
120
+ .last-updated,
121
+ .contributors {
122
+ margin-top: 0.25rem;
123
+ margin-bottom: 0.25rem;
124
+ font-size: 14px;
125
+
126
+ @media (max-width: $MQMobile) {
127
+ font-size: 13px;
128
+ text-align: start;
129
+ }
130
+ }
131
+ }
132
+ </style>