vitepress 0.22.3 → 1.0.0-draft.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/client.d.ts +2 -3
  2. package/dist/client/app/components/ClientOnly.js +1 -1
  3. package/dist/client/app/index.js +5 -7
  4. package/dist/client/index.d.ts +5 -0
  5. package/dist/client/shared.js +1 -0
  6. package/dist/client/theme-default/Layout.vue +39 -180
  7. package/dist/client/theme-default/NotFound.vue +9 -8
  8. package/dist/client/theme-default/components/VPAlgoliaSearchBox.vue +127 -0
  9. package/dist/client/theme-default/components/VPBackdrop.vue +39 -0
  10. package/dist/client/theme-default/components/VPBox.vue +59 -0
  11. package/dist/client/theme-default/components/VPButton.vue +123 -0
  12. package/dist/client/theme-default/components/VPContent.vue +74 -0
  13. package/dist/client/theme-default/components/VPDoc.vue +173 -0
  14. package/dist/client/theme-default/components/VPDocFooter.vue +141 -0
  15. package/dist/client/theme-default/components/VPDocOutline.vue +108 -0
  16. package/dist/client/theme-default/components/VPFlyout.vue +149 -0
  17. package/dist/client/theme-default/components/VPFooter.vue +53 -0
  18. package/dist/client/theme-default/components/VPHero.vue +144 -0
  19. package/dist/client/theme-default/components/VPHome.vue +33 -0
  20. package/dist/client/theme-default/components/VPHomeFeatures.vue +96 -0
  21. package/dist/client/theme-default/components/VPHomeHero.vue +17 -0
  22. package/dist/client/theme-default/components/VPHomeSponsors.vue +97 -0
  23. package/dist/client/theme-default/components/VPLink.vue +37 -0
  24. package/dist/client/theme-default/components/VPLocalNav.vue +106 -0
  25. package/dist/client/theme-default/components/VPMenu.vue +79 -0
  26. package/dist/client/theme-default/components/VPMenuGroup.vue +35 -0
  27. package/dist/client/theme-default/components/VPMenuLink.vue +30 -0
  28. package/dist/client/theme-default/components/VPNav.vue +33 -0
  29. package/dist/client/theme-default/components/VPNavBar.vue +110 -0
  30. package/dist/client/theme-default/components/VPNavBarAppearance.vue +25 -0
  31. package/dist/client/theme-default/components/VPNavBarExtra.vue +107 -0
  32. package/dist/client/theme-default/components/VPNavBarHamburger.vue +79 -0
  33. package/dist/client/theme-default/components/VPNavBarMenu.vue +29 -0
  34. package/dist/client/theme-default/components/VPNavBarMenuGroup.vue +18 -0
  35. package/dist/client/theme-default/components/VPNavBarMenuLink.vue +56 -0
  36. package/dist/client/theme-default/components/VPNavBarSearch.vue +269 -0
  37. package/dist/client/theme-default/components/VPNavBarSocialLinks.vue +27 -0
  38. package/dist/client/theme-default/components/VPNavBarTitle.vue +57 -0
  39. package/dist/client/theme-default/components/VPNavBarTranslations.vue +74 -0
  40. package/dist/client/theme-default/components/VPNavScreen.vue +100 -0
  41. package/dist/client/theme-default/components/VPNavScreenAppearance.vue +33 -0
  42. package/dist/client/theme-default/components/VPNavScreenMenu.vue +24 -0
  43. package/dist/client/theme-default/components/VPNavScreenMenuGroup.vue +118 -0
  44. package/dist/client/theme-default/components/VPNavScreenMenuGroupLink.vue +33 -0
  45. package/dist/client/theme-default/components/VPNavScreenMenuGroupSection.vue +35 -0
  46. package/dist/client/theme-default/components/VPNavScreenMenuLink.vue +34 -0
  47. package/dist/client/theme-default/components/VPNavScreenSocialLinks.vue +14 -0
  48. package/dist/client/theme-default/components/VPNavScreenTranslations.vue +73 -0
  49. package/dist/client/theme-default/components/VPPage.vue +5 -0
  50. package/dist/client/theme-default/components/VPSidebar.vue +118 -0
  51. package/dist/client/theme-default/components/VPSidebarGroup.vue +44 -0
  52. package/dist/client/theme-default/components/VPSidebarLink.vue +57 -0
  53. package/dist/client/theme-default/components/VPSkipLink.vue +72 -0
  54. package/dist/client/theme-default/components/VPSocialLink.vue +63 -0
  55. package/dist/client/theme-default/components/VPSocialLinks.vue +27 -0
  56. package/dist/client/theme-default/components/VPSponsors.vue +77 -0
  57. package/dist/client/theme-default/components/VPSponsorsGrid.vue +32 -0
  58. package/dist/client/theme-default/components/VPSwitch.vue +66 -0
  59. package/dist/client/theme-default/components/VPSwitchAppearance.vue +74 -0
  60. package/dist/client/theme-default/components/icons/VPIconAlignJustify.vue +8 -0
  61. package/dist/client/theme-default/components/icons/VPIconAlignLeft.vue +8 -0
  62. package/dist/client/theme-default/components/icons/VPIconAlignRight.vue +8 -0
  63. package/dist/client/theme-default/components/icons/{ArrowLeft.vue → VPIconArrowLeft.vue} +0 -0
  64. package/dist/client/theme-default/components/icons/{ArrowRight.vue → VPIconArrowRight.vue} +0 -0
  65. package/dist/client/theme-default/components/icons/VPIconChevronDown.vue +5 -0
  66. package/dist/client/theme-default/components/icons/VPIconChevronLeft.vue +5 -0
  67. package/dist/client/theme-default/components/icons/VPIconChevronRight.vue +5 -0
  68. package/dist/client/theme-default/components/icons/VPIconChevronUp.vue +5 -0
  69. package/dist/client/theme-default/components/icons/VPIconDiscord.vue +5 -0
  70. package/dist/client/theme-default/components/icons/VPIconEdit.vue +6 -0
  71. package/dist/client/theme-default/components/icons/VPIconExternalLink.vue +13 -0
  72. package/dist/client/theme-default/components/icons/VPIconFacebook.vue +5 -0
  73. package/dist/client/theme-default/components/icons/VPIconGitHub.vue +5 -0
  74. package/dist/client/theme-default/components/icons/VPIconHeart.vue +5 -0
  75. package/dist/client/theme-default/components/icons/VPIconInstagram.vue +5 -0
  76. package/dist/client/theme-default/components/icons/VPIconLanguages.vue +9 -0
  77. package/dist/client/theme-default/components/icons/VPIconLinkedIn.vue +5 -0
  78. package/dist/client/theme-default/components/icons/VPIconMoon.vue +5 -0
  79. package/dist/client/theme-default/components/icons/VPIconMoreHorizontal.vue +7 -0
  80. package/dist/client/theme-default/components/icons/VPIconPlus.vue +5 -0
  81. package/dist/client/theme-default/components/icons/VPIconSlack.vue +5 -0
  82. package/dist/client/theme-default/components/icons/VPIconSun.vue +13 -0
  83. package/dist/client/theme-default/components/icons/VPIconTwitter.vue +5 -0
  84. package/dist/client/theme-default/components/icons/VPIconYouTube.vue +5 -0
  85. package/dist/client/theme-default/composables/edit-link.js +22 -0
  86. package/dist/client/theme-default/composables/flyout.js +40 -0
  87. package/dist/client/theme-default/composables/nav.js +27 -1
  88. package/dist/client/theme-default/composables/outline.js +112 -0
  89. package/dist/client/theme-default/composables/prev-next.js +18 -0
  90. package/dist/client/theme-default/composables/sidebar.js +57 -0
  91. package/dist/client/theme-default/composables/sponsor-grid.js +92 -0
  92. package/dist/client/theme-default/composables/sponsor.js +87 -0
  93. package/dist/client/theme-default/fonts/inter-cyrillic-ext.woff2 +0 -0
  94. package/dist/client/theme-default/fonts/inter-cyrillic.woff2 +0 -0
  95. package/dist/client/theme-default/fonts/inter-greek-ext.woff2 +0 -0
  96. package/dist/client/theme-default/fonts/inter-greek.woff2 +0 -0
  97. package/dist/client/theme-default/fonts/inter-latin-ext.woff2 +0 -0
  98. package/dist/client/theme-default/fonts/inter-latin.woff2 +0 -0
  99. package/dist/client/theme-default/fonts/inter-vietnamese.woff2 +0 -0
  100. package/dist/client/theme-default/index.js +8 -4
  101. package/dist/client/theme-default/styles/base.css +203 -0
  102. package/dist/client/theme-default/styles/fonts.css +67 -0
  103. package/dist/client/theme-default/styles/utils.css +9 -0
  104. package/dist/client/theme-default/styles/vars.css +291 -66
  105. package/dist/client/theme-default/styles/vp-doc.css +425 -0
  106. package/dist/client/theme-default/styles/vp-sponsor.css +86 -0
  107. package/dist/client/theme-default/support/sidebar.js +29 -0
  108. package/dist/client/theme-default/support/utils.js +62 -0
  109. package/dist/node/alias.js +60 -0
  110. package/dist/node/alias.js.map +1 -0
  111. package/dist/node/build/build.js +57 -0
  112. package/dist/node/build/build.js.map +1 -0
  113. package/dist/node/build/buildMPAClient.js +44 -0
  114. package/dist/node/build/buildMPAClient.js.map +1 -0
  115. package/dist/node/build/bundle.js +163 -0
  116. package/dist/node/build/bundle.js.map +1 -0
  117. package/dist/node/build/render.js +185 -0
  118. package/dist/node/build/render.js.map +1 -0
  119. package/dist/node/cli.js +37 -294
  120. package/dist/node/cli.js.map +1 -0
  121. package/dist/node/config.js +176 -0
  122. package/dist/node/config.js.map +1 -0
  123. package/dist/node/index.d.ts +122 -79
  124. package/dist/node/index.js +22 -37
  125. package/dist/node/index.js.map +1 -0
  126. package/dist/node/markdown/markdown.js +75 -0
  127. package/dist/node/markdown/markdown.js.map +1 -0
  128. package/dist/node/markdown/plugins/component.js +86 -0
  129. package/dist/node/markdown/plugins/component.js.map +1 -0
  130. package/dist/node/markdown/plugins/containers.js +41 -0
  131. package/dist/node/markdown/plugins/containers.js.map +1 -0
  132. package/dist/node/markdown/plugins/headings.js +25 -0
  133. package/dist/node/markdown/plugins/headings.js.map +1 -0
  134. package/dist/node/markdown/plugins/highlight.js +53 -0
  135. package/dist/node/markdown/plugins/highlight.js.map +1 -0
  136. package/dist/node/markdown/plugins/highlightLines.js +48 -0
  137. package/dist/node/markdown/plugins/highlightLines.js.map +1 -0
  138. package/dist/node/markdown/plugins/hoist.js +22 -0
  139. package/dist/node/markdown/plugins/hoist.js.map +1 -0
  140. package/dist/node/markdown/plugins/image.js +17 -0
  141. package/dist/node/markdown/plugins/image.js.map +1 -0
  142. package/dist/node/markdown/plugins/lineNumbers.js +23 -0
  143. package/dist/node/markdown/plugins/lineNumbers.js.map +1 -0
  144. package/dist/node/markdown/plugins/link.js +85 -0
  145. package/dist/node/markdown/plugins/link.js.map +1 -0
  146. package/dist/node/markdown/plugins/preWrapper.js +22 -0
  147. package/dist/node/markdown/plugins/preWrapper.js.map +1 -0
  148. package/dist/node/markdown/plugins/slugify.js +26 -0
  149. package/dist/node/markdown/plugins/slugify.js.map +1 -0
  150. package/dist/node/markdown/plugins/snippet.js +146 -0
  151. package/dist/node/markdown/plugins/snippet.js.map +1 -0
  152. package/dist/node/markdownToVue.js +166 -0
  153. package/dist/node/markdownToVue.js.map +1 -0
  154. package/dist/node/plugin.js +227 -0
  155. package/dist/node/plugin.js.map +1 -0
  156. package/dist/node/serve/serve.js +59 -0
  157. package/dist/node/serve/serve.js.map +1 -0
  158. package/dist/node/{serve-777539c0.js → serve-b5dc02b2.js} +27 -2
  159. package/dist/node/server.js +18 -0
  160. package/dist/node/server.js.map +1 -0
  161. package/dist/node/shared.js +72 -0
  162. package/dist/node/shared.js.map +1 -0
  163. package/dist/node/staticDataPlugin.js +99 -0
  164. package/dist/node/staticDataPlugin.js.map +1 -0
  165. package/dist/node/utils/getGitTimestamp.js +17 -0
  166. package/dist/node/utils/getGitTimestamp.js.map +1 -0
  167. package/dist/node/utils/parseHeader.js +57 -0
  168. package/dist/node/utils/parseHeader.js.map +1 -0
  169. package/dist/node/utils/slash.js +8 -0
  170. package/dist/node/utils/slash.js.map +1 -0
  171. package/package.json +31 -25
  172. package/types/default-theme.d.ts +115 -78
  173. package/types/shared.d.ts +11 -6
  174. package/dist/client/theme-default/components/AlgoliaSearchBox.vue +0 -188
  175. package/dist/client/theme-default/components/BuySellAds.vue +0 -152
  176. package/dist/client/theme-default/components/CarbonAds.vue +0 -99
  177. package/dist/client/theme-default/components/EditLink.vue +0 -38
  178. package/dist/client/theme-default/components/Home.vue +0 -31
  179. package/dist/client/theme-default/components/HomeFeatures.vue +0 -143
  180. package/dist/client/theme-default/components/HomeFooter.vue +0 -50
  181. package/dist/client/theme-default/components/HomeHero.vue +0 -161
  182. package/dist/client/theme-default/components/LastUpdated.vue +0 -60
  183. package/dist/client/theme-default/components/NavBar.vue +0 -60
  184. package/dist/client/theme-default/components/NavBarTitle.vue +0 -41
  185. package/dist/client/theme-default/components/NavDropdownLink.vue +0 -135
  186. package/dist/client/theme-default/components/NavDropdownLinkItem.vue +0 -76
  187. package/dist/client/theme-default/components/NavLink.vue +0 -61
  188. package/dist/client/theme-default/components/NavLinks.vue +0 -52
  189. package/dist/client/theme-default/components/NextAndPrevLinks.vue +0 -88
  190. package/dist/client/theme-default/components/Page.vue +0 -53
  191. package/dist/client/theme-default/components/PageFooter.vue +0 -44
  192. package/dist/client/theme-default/components/SideBar.vue +0 -60
  193. package/dist/client/theme-default/components/SideBarLink.js +0 -68
  194. package/dist/client/theme-default/components/SideBarLinks.vue +0 -12
  195. package/dist/client/theme-default/components/ToggleSideBarButton.vue +0 -46
  196. package/dist/client/theme-default/components/icons/OutboundLink.vue +0 -31
  197. package/dist/client/theme-default/composables/activeSidebarLink.js +0 -99
  198. package/dist/client/theme-default/composables/editLink.js +0 -49
  199. package/dist/client/theme-default/composables/navLink.js +0 -42
  200. package/dist/client/theme-default/composables/nextAndPrevLinks.js +0 -37
  201. package/dist/client/theme-default/composables/repo.js +0 -38
  202. package/dist/client/theme-default/composables/sideBar.js +0 -57
  203. package/dist/client/theme-default/styles/code.css +0 -299
  204. package/dist/client/theme-default/styles/custom-blocks.css +0 -76
  205. package/dist/client/theme-default/styles/layout.css +0 -236
  206. package/dist/client/theme-default/styles/sidebar-links.css +0 -107
  207. package/dist/client/theme-default/support/sideBar.js +0 -46
  208. package/dist/client/theme-default/utils.js +0 -63
@@ -1,188 +0,0 @@
1
- <script setup lang="ts">
2
- import '@docsearch/css'
3
- import docsearch from '@docsearch/js'
4
- import { useRoute, useRouter, useData } from 'vitepress'
5
- import { getCurrentInstance, onMounted, watch } from 'vue'
6
- import type { DefaultTheme } from '../config'
7
- import type { DocSearchHit } from '@docsearch/react/dist/esm/types'
8
-
9
- const props = defineProps<{
10
- options: DefaultTheme.AlgoliaSearchOptions
11
- multilang?: boolean
12
- }>()
13
-
14
- const vm = getCurrentInstance()
15
- const route = useRoute()
16
- const router = useRouter()
17
-
18
- watch(
19
- () => props.options,
20
- (value) => {
21
- update(value)
22
- }
23
- )
24
-
25
- onMounted(() => {
26
- initialize(props.options)
27
- })
28
-
29
- function isSpecialClick(event: MouseEvent) {
30
- return (
31
- event.button === 1 ||
32
- event.altKey ||
33
- event.ctrlKey ||
34
- event.metaKey ||
35
- event.shiftKey
36
- )
37
- }
38
-
39
- function getRelativePath(absoluteUrl: string) {
40
- const { pathname, hash } = new URL(absoluteUrl)
41
-
42
- return pathname + hash
43
- }
44
-
45
- function update(options: any) {
46
- if (vm && vm.vnode.el) {
47
- vm.vnode.el.innerHTML =
48
- '<div class="algolia-search-box" id="docsearch"></div>'
49
- initialize(options)
50
- }
51
- }
52
-
53
- const { lang } = useData()
54
-
55
- // if the user has multiple locales, the search results should be filtered
56
- // based on the language
57
- const facetFilters: string[] = props.multilang ? ['lang:' + lang.value] : []
58
-
59
- if (props.options.searchParameters?.facetFilters) {
60
- facetFilters.push(...props.options.searchParameters.facetFilters)
61
- }
62
-
63
- watch(lang, (newLang, oldLang) => {
64
- const index = facetFilters.findIndex((filter) => filter === 'lang:' + oldLang)
65
- if (index > -1) {
66
- facetFilters.splice(index, 1, 'lang:' + newLang)
67
- }
68
- })
69
-
70
- function initialize(userOptions: any) {
71
- docsearch(
72
- Object.assign({}, userOptions, {
73
- container: '#docsearch',
74
-
75
- searchParameters: Object.assign({}, userOptions.searchParameters, {
76
- // pass a custom lang facetFilter to allow multiple language search
77
- // https://github.com/algolia/docsearch-configs/pull/3942
78
- facetFilters
79
- }),
80
-
81
- navigator: {
82
- navigate: ({ itemUrl }: { itemUrl: string }) => {
83
- const { pathname: hitPathname } = new URL(
84
- window.location.origin + itemUrl
85
- )
86
-
87
- // Router doesn't handle same-page navigation so we use the native
88
- // browser location API for anchor navigation
89
- if (route.path === hitPathname) {
90
- window.location.assign(window.location.origin + itemUrl)
91
- } else {
92
- router.go(itemUrl)
93
- }
94
- }
95
- },
96
-
97
- transformItems: (items: DocSearchHit[]) => {
98
- return items.map((item) => {
99
- return Object.assign({}, item, {
100
- url: getRelativePath(item.url)
101
- })
102
- })
103
- },
104
-
105
- hitComponent: ({
106
- hit,
107
- children
108
- }: {
109
- hit: DocSearchHit
110
- children: any
111
- }) => {
112
- const relativeHit = hit.url.startsWith('http')
113
- ? getRelativePath(hit.url as string)
114
- : hit.url
115
-
116
- return {
117
- type: 'a',
118
- ref: undefined,
119
- constructor: undefined,
120
- key: undefined,
121
- props: {
122
- href: hit.url,
123
- onClick: (event: MouseEvent) => {
124
- if (isSpecialClick(event)) {
125
- return
126
- }
127
-
128
- // we rely on the native link scrolling when user is already on
129
- // the right anchor because Router doesn't support duplicated
130
- // history entries
131
- if (route.path === relativeHit) {
132
- return
133
- }
134
-
135
- // if the hits goes to another page, we prevent the native link
136
- // behavior to leverage the Router loading feature
137
- if (route.path !== relativeHit) {
138
- event.preventDefault()
139
- }
140
-
141
- router.go(relativeHit)
142
- },
143
- children
144
- },
145
- __v: null
146
- }
147
- }
148
- })
149
- )
150
- }
151
- </script>
152
-
153
- <template>
154
- <div class="algolia-search-box" id="docsearch" />
155
- </template>
156
-
157
- <style>
158
- .algolia-search-box {
159
- padding-top: 1px;
160
- }
161
-
162
- @media (min-width: 720px) {
163
- .algolia-search-box {
164
- padding-left: 8px;
165
- }
166
- }
167
-
168
- @media (min-width: 751px) {
169
- .algolia-search-box {
170
- min-width: 176.3px; /* avoid layout shift */
171
- }
172
-
173
- .algolia-search-box .DocSearch-Button-Placeholder {
174
- padding-left: 8px;
175
- font-size: 0.9rem;
176
- font-weight: 500;
177
- }
178
- }
179
-
180
- .DocSearch {
181
- --docsearch-primary-color: var(--c-brand);
182
- --docsearch-highlight-color: var(--docsearch-primary-color);
183
- --docsearch-searchbox-shadow: inset 0 0 0 2px var(--docsearch-primary-color);
184
- --docsearch-text-color: var(--c-text-light);
185
- --docsearch-muted-color: var(--c-text-lighter);
186
- --docsearch-searchbox-background: #f2f2f2;
187
- }
188
- </style>
@@ -1,152 +0,0 @@
1
- <script setup lang="ts">
2
- import { onMounted } from 'vue'
3
-
4
- // global _bsa
5
- const ID = 'bsa-cpc-script'
6
-
7
- declare global {
8
- var _bsa: BSA | undefined
9
-
10
- interface BSA {
11
- init(
12
- name: string,
13
- code: string,
14
- placement: string,
15
- options: {
16
- target: string
17
- align: string
18
- disable_css?: 'true' | 'false'
19
- }
20
- ): void
21
- }
22
- }
23
-
24
- const { code, placement } = defineProps<{
25
- code: string
26
- placement: string
27
- }>()
28
-
29
- onMounted(() => {
30
- if (!document.getElementById(ID)) {
31
- const s = document.createElement('script')
32
-
33
- s.id = ID
34
- s.src = '//m.servedby-buysellads.com/monetization.js'
35
-
36
- document.head.appendChild(s)
37
-
38
- s.onload = () => {
39
- load()
40
- }
41
- } else {
42
- load()
43
- }
44
- })
45
-
46
- function load() {
47
- if (typeof _bsa !== 'undefined' && _bsa) {
48
- const parent = document.querySelector('.bsa-cpc')!
49
- // cleanup any existing ad to avoid them stacking
50
- parent.innerHTML = ''
51
-
52
- _bsa.init('default', code, `placement:${placement}`, {
53
- target: '.bsa-cpc',
54
- align: 'horizontal',
55
- disable_css: 'true'
56
- })
57
- }
58
- }
59
- </script>
60
-
61
- <template>
62
- <div class="buy-sell-ads">
63
- <div class="bsa-cpc" />
64
- </div>
65
- </template>
66
-
67
- <style scoped>
68
- .buy-sell-ads {
69
- margin: 0 auto;
70
- padding-top: 2rem;
71
- font-size: 0.85rem;
72
- }
73
-
74
- .bsa-cpc {
75
- border-radius: 6px;
76
- background-color: var(--c-bg-accent);
77
- }
78
-
79
- .bsa-cpc ::v-deep(a._default_) {
80
- display: flex;
81
- flex-wrap: wrap;
82
- align-items: flex-start;
83
- margin-bottom: 20px;
84
- padding: 12px;
85
- text-decoration: none;
86
- line-height: 1.4;
87
- font-weight: 400;
88
- color: var(--c-text-light);
89
- }
90
-
91
- @media (min-width: 512px) {
92
- .bsa-cpc ::v-deep(a._default_) {
93
- flex-wrap: nowrap;
94
- }
95
- }
96
-
97
- .bsa-cpc ::v-deep(.default-ad) {
98
- display: none;
99
- }
100
-
101
- .bsa-cpc ::v-deep(a._default_ .default-image) {
102
- flex-shrink: 0;
103
- margin-right: 12px;
104
- width: 24px;
105
- }
106
-
107
- .bsa-cpc ::v-deep(a._default_ .default-image img) {
108
- border-radius: 4px;
109
- height: 24px;
110
- vertical-align: middle;
111
- }
112
-
113
- .bsa-cpc ::v-deep(._default_::after) {
114
- border: 1px solid #1c90f3;
115
- border-radius: 4px;
116
- margin-top: 8px;
117
- margin-left: 36px;
118
- padding: 0 8px;
119
- line-height: 22px;
120
- font-size: 0.85em;
121
- font-weight: 500;
122
- color: #1c90f3;
123
- content: 'Sponsored';
124
- }
125
-
126
- @media (min-width: 512px) {
127
- .bsa-cpc ::v-deep(._default_::after) {
128
- margin-top: 0px;
129
- margin-left: 12px;
130
- }
131
- }
132
-
133
- .bsa-cpc ::v-deep(.default-text) {
134
- flex-grow: 1;
135
- align-self: center;
136
- width: calc(100% - 36px);
137
- }
138
-
139
- @media (min-width: 512px) {
140
- .bsa-cpc ::v-deep(.default-text) {
141
- width: auto;
142
- }
143
- }
144
-
145
- .bsa-cpc ::v-deep(.default-title) {
146
- font-weight: 600;
147
- }
148
-
149
- .bsa-cpc ::v-deep(.default-description) {
150
- padding-left: 8px;
151
- }
152
- </style>
@@ -1,99 +0,0 @@
1
- <script setup lang="ts">
2
- import { ref, onMounted } from 'vue'
3
-
4
- const { code, placement } = defineProps<{
5
- code: string
6
- placement: string
7
- }>()
8
-
9
- const el = ref()
10
-
11
- onMounted(() => {
12
- const s = document.createElement('script')
13
- s.id = '_carbonads_js'
14
- s.src = `//cdn.carbonads.com/carbon.js?serve=${code}&placement=${placement}`
15
- el.value.appendChild(s)
16
- })
17
- </script>
18
-
19
- <template>
20
- <div class="carbon-ads" ref="el" />
21
- </template>
22
-
23
- <style scoped>
24
- .carbon-ads {
25
- border-radius: 4px;
26
- margin: 0 auto;
27
- padding: 8px;
28
- max-width: 280px;
29
- font-size: 0.75rem;
30
- background-color: var(--c-bg-accent);
31
- min-height: 105.38px; /* avoid layout shift on mobile */
32
- }
33
-
34
- .carbon-ads::after {
35
- clear: both;
36
- display: block;
37
- content: '';
38
- }
39
-
40
- @media (min-width: 420px) {
41
- .carbon-ads {
42
- z-index: 1;
43
- float: right;
44
- margin: -8px -8px 24px 24px;
45
- width: 146px;
46
- max-width: 100%;
47
- min-height: 200px;
48
- }
49
- }
50
-
51
- @media (min-width: 1400px) {
52
- .carbon-ads {
53
- right: 8px;
54
- float: none;
55
- margin: 0;
56
- }
57
- }
58
-
59
- .carbon-ads :deep(.carbon-img) {
60
- float: left;
61
- margin-right: 0.75rem;
62
- max-width: 110px;
63
- border: 1px solid var(--c-divider);
64
- }
65
-
66
- @media (min-width: 420px) {
67
- .carbon-ads :deep(.carbon-img) {
68
- float: none;
69
- display: block;
70
- margin-right: 0;
71
- max-width: 130px;
72
- }
73
- }
74
-
75
- .carbon-ads :deep(.carbon-img img) {
76
- display: block;
77
- width: 100%;
78
- height: auto;
79
- }
80
-
81
- @media (min-width: 420px) {
82
- .carbon-ads :deep(.carbon-text) {
83
- padding-top: 8px;
84
- }
85
- }
86
-
87
- .carbon-ads :deep(.carbon-text) {
88
- display: block;
89
- font-weight: 400;
90
- color: var(--c-text-light);
91
- }
92
-
93
- .carbon-ads :deep(.carbon-poweredby) {
94
- display: block;
95
- padding-top: 2px;
96
- font-weight: 400;
97
- color: var(--c-text-lighter);
98
- }
99
- </style>
@@ -1,38 +0,0 @@
1
- <script setup lang="ts">
2
- import { useEditLink } from '../composables/editLink'
3
- import OutboundLink from './icons/OutboundLink.vue'
4
-
5
- const { url, text } = useEditLink()
6
- </script>
7
-
8
- <template>
9
- <div class="edit-link">
10
- <a
11
- v-if="url"
12
- class="link"
13
- :href="url"
14
- target="_blank"
15
- rel="noopener noreferrer"
16
- >
17
- {{ text }} <OutboundLink class="icon" />
18
- </a>
19
- </div>
20
- </template>
21
-
22
- <style scoped>
23
- .link {
24
- display: inline-block;
25
- font-size: 1rem;
26
- font-weight: 500;
27
- color: var(--c-text-light);
28
- }
29
-
30
- .link:hover {
31
- text-decoration: none;
32
- color: var(--c-brand);
33
- }
34
-
35
- .icon {
36
- margin-left: 4px;
37
- }
38
- </style>
@@ -1,31 +0,0 @@
1
- <script setup lang="ts">
2
- import HomeHero from './HomeHero.vue'
3
- import HomeFeatures from './HomeFeatures.vue'
4
- import HomeFooter from './HomeFooter.vue'
5
- </script>
6
-
7
- <template>
8
- <main class="home" aria-labelledby="main-title">
9
- <HomeHero />
10
- <slot name="hero" />
11
- <HomeFeatures />
12
- <div class="home-content">
13
- <Content />
14
- </div>
15
- <slot name="features" />
16
- <HomeFooter />
17
- <slot name="footer" />
18
- </main>
19
- </template>
20
-
21
- <style scoped>
22
- .home {
23
- padding-top: var(--header-height);
24
- }
25
-
26
- .home-content {
27
- max-width: 960px;
28
- margin: 0px auto;
29
- padding: 0 1.5rem;
30
- }
31
- </style>
@@ -1,143 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed } from 'vue'
3
- import { useData } from 'vitepress'
4
-
5
- const { frontmatter } = useData()
6
-
7
- const hasFeatures = computed(() => {
8
- return frontmatter.value.features && frontmatter.value.features.length > 0
9
- })
10
-
11
- interface Feature {
12
- title?: string
13
- details?: string
14
- }
15
-
16
- const features = computed<Feature[]>(() => {
17
- return frontmatter.value.features ? frontmatter.value.features : []
18
- })
19
- </script>
20
-
21
- <template>
22
- <div v-if="hasFeatures" class="home-features">
23
- <div class="wrapper">
24
- <div class="container">
25
- <div class="features">
26
- <section
27
- v-for="(feature, index) in features"
28
- :key="index"
29
- class="feature"
30
- >
31
- <h2 class="title" v-if="feature.title">{{ feature.title }}</h2>
32
- <p class="details" v-if="feature.details">{{ feature.details }}</p>
33
- </section>
34
- </div>
35
- </div>
36
- </div>
37
- </div>
38
- </template>
39
-
40
- <style scoped>
41
- .home-features {
42
- margin: 0 auto;
43
- padding: 2.5rem 0 2.75rem;
44
- max-width: 960px;
45
- }
46
-
47
- .home-hero + .home-features {
48
- padding-top: 0;
49
- }
50
-
51
- @media (min-width: 420px) {
52
- .home-features {
53
- padding: 3.25rem 0 3.5rem;
54
- }
55
-
56
- .home-hero + .home-features {
57
- padding-top: 0;
58
- }
59
- }
60
-
61
- @media (min-width: 720px) {
62
- .home-features {
63
- padding-right: 1.5rem;
64
- padding-left: 1.5rem;
65
- }
66
- }
67
-
68
- .wrapper {
69
- padding: 0 1.5rem;
70
- }
71
-
72
- .home-hero + .home-features .wrapper {
73
- border-top: 1px solid var(--c-divider);
74
- padding-top: 2.5rem;
75
- }
76
-
77
- @media (min-width: 420px) {
78
- .home-hero + .home-features .wrapper {
79
- padding-top: 3.25rem;
80
- }
81
- }
82
-
83
- @media (min-width: 720px) {
84
- .wrapper {
85
- padding-right: 0;
86
- padding-left: 0;
87
- }
88
- }
89
-
90
- .container {
91
- margin: 0 auto;
92
- max-width: 392px;
93
- }
94
-
95
- @media (min-width: 720px) {
96
- .container {
97
- max-width: 960px;
98
- }
99
- }
100
-
101
- .features {
102
- display: flex;
103
- flex-wrap: wrap;
104
- margin: -20px -24px;
105
- }
106
-
107
- .feature {
108
- flex-shrink: 0;
109
- padding: 20px 24px;
110
- width: 100%;
111
- }
112
-
113
- @media (min-width: 720px) {
114
- .feature {
115
- width: calc(100% / 3);
116
- }
117
- }
118
-
119
- .title {
120
- margin: 0;
121
- border-bottom: 0;
122
- line-height: 1.4;
123
- font-size: 1.25rem;
124
- font-weight: 500;
125
- }
126
-
127
- @media (min-width: 420px) {
128
- .title {
129
- font-size: 1.4rem;
130
- }
131
- }
132
-
133
- .details {
134
- margin: 0;
135
- line-height: 1.6;
136
- font-size: 1rem;
137
- color: var(--c-text-light);
138
- }
139
-
140
- .title + .details {
141
- padding-top: 0.25rem;
142
- }
143
- </style>
@@ -1,50 +0,0 @@
1
- <script setup lang="ts">
2
- import { useData } from 'vitepress'
3
-
4
- const { frontmatter } = useData()
5
- </script>
6
-
7
- <template>
8
- <footer v-if="frontmatter.footer" class="footer">
9
- <div class="container">
10
- <p class="text">{{ frontmatter.footer }}</p>
11
- </div>
12
- </footer>
13
- </template>
14
-
15
- <style scoped>
16
- .footer {
17
- margin: 0 auto;
18
- max-width: 960px;
19
- }
20
-
21
- @media (min-width: 720px) {
22
- .footer {
23
- padding: 0 1.5rem;
24
- }
25
- }
26
-
27
- .container {
28
- padding: 2rem 1.5rem 2.25rem;
29
- }
30
-
31
- .home-hero + .footer .container,
32
- .home-features + .footer .container,
33
- .home-content + .footer .container {
34
- border-top: 1px solid var(--c-divider);
35
- }
36
-
37
- @media (min-width: 420px) {
38
- .container {
39
- padding: 3rem 1.5rem 3.25rem;
40
- }
41
- }
42
-
43
- .text {
44
- margin: 0;
45
- text-align: center;
46
- line-height: 1.4;
47
- font-size: 0.9rem;
48
- color: var(--c-text-light);
49
- }
50
- </style>