@ansidev-oss/vitepress-theme-ansidev 1.0.12 → 1.2.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 (86) hide show
  1. package/dist/client/Donation-BBPb8v5p.js +66 -0
  2. package/dist/client/GoogleAnalytics-34XEM7eO.js +25 -0
  3. package/dist/client/Sharing-CpagX9oy.js +185 -0
  4. package/dist/client/Swetrix-GKEyGNrV.js +647 -0
  5. package/dist/client/components/PostDate.test.d.ts +1 -0
  6. package/dist/client/composables/index.d.ts +1 -0
  7. package/dist/client/composables/lang.d.ts +27 -0
  8. package/dist/client/composables/lang.test.d.ts +1 -0
  9. package/dist/client/index.js +3769 -9
  10. package/dist/client/medium-zoom-DPl0T7qn.js +266 -0
  11. package/dist/client/record-Cgv_fXDH.js +2739 -0
  12. package/dist/client/styles.css +2 -1
  13. package/dist/client/types/index.d.ts +8 -0
  14. package/dist/node/composables.d.mts +16 -17
  15. package/dist/node/composables.mjs +39 -15
  16. package/dist/node/config.d.mts +2 -17
  17. package/dist/node/config.mjs +9 -6
  18. package/package.json +27 -21
  19. package/src/client/components/DonationWidget.vue +9 -3
  20. package/src/client/components/Footer.vue +11 -4
  21. package/src/client/components/Link.vue +11 -5
  22. package/src/client/components/LocaleSwitcher.vue +5 -5
  23. package/src/client/components/PostDate.test.ts +82 -0
  24. package/src/client/components/PostDate.vue +32 -13
  25. package/src/client/components/PostItem.vue +17 -7
  26. package/src/client/components/PostList.vue +7 -4
  27. package/src/client/components/ProjectCard.vue +42 -14
  28. package/src/client/components/ProjectList.vue +12 -5
  29. package/src/client/components/RouterLink.vue +3 -3
  30. package/src/client/components/SharingWidget.vue +3 -1
  31. package/src/client/components/StatusBadge.vue +10 -10
  32. package/src/client/components/TermBadge.vue +11 -7
  33. package/src/client/components/TermLink.vue +4 -4
  34. package/src/client/composables/date.ts +1 -1
  35. package/src/client/composables/index.ts +1 -0
  36. package/src/client/composables/lang.test.ts +56 -0
  37. package/src/client/composables/lang.ts +65 -0
  38. package/src/client/composables/locale.ts +4 -1
  39. package/src/client/composables/project.ts +3 -3
  40. package/src/client/composables/rank.ts +5 -2
  41. package/src/client/index.ts +5 -0
  42. package/src/client/layouts/Layout.vue +2 -2
  43. package/src/client/pages/ArchivesPage.vue +10 -5
  44. package/src/client/pages/CategoriesPage.vue +13 -5
  45. package/src/client/pages/HomePage.vue +3 -3
  46. package/src/client/pages/Page.vue +13 -11
  47. package/src/client/pages/PostsPage.vue +4 -4
  48. package/src/client/pages/ProjectsPage.vue +10 -7
  49. package/src/client/pages/TagsPage.vue +10 -4
  50. package/src/client/plugins/donation/components/Donation.vue +5 -3
  51. package/src/client/plugins/donation/components/DonationButton.vue +3 -1
  52. package/src/client/plugins/donation/index.ts +11 -8
  53. package/src/client/plugins/i18n/index.ts +2 -2
  54. package/src/client/plugins/sharing/components/Sharing.vue +39 -15
  55. package/src/client/plugins/sharing/components/SharingButton.vue +34 -14
  56. package/src/client/plugins/sharing/index.ts +6 -2
  57. package/src/client/styles/base.css +30 -0
  58. package/src/client/styles/blog.css +376 -0
  59. package/src/client/styles/index.css +2 -30
  60. package/src/client/types/index.ts +8 -0
  61. package/src/node/composables/excerpt.test.ts +88 -0
  62. package/src/node/composables/excerpt.ts +57 -0
  63. package/src/node/composables/index.ts +1 -0
  64. package/src/node/composables/markdown.ts +8 -2
  65. package/src/node/composables/route.ts +15 -7
  66. package/src/node/composables/slug.ts +12 -4
  67. package/src/node/config.ts +20 -14
  68. package/src/shared/composables/useSlug.ts +2 -1
  69. package/src/vite-env.d.ts +1 -0
  70. package/dist/client/Donation-D9Xn0MPt.js +0 -76
  71. package/dist/client/GoogleAnalytics-Dp3EGn1x.js +0 -29
  72. package/dist/client/Sharing-ZrU7YF-x.js +0 -190
  73. package/dist/client/Swetrix-CM1mbD6X.js +0 -450
  74. package/dist/client/VPAlgoliaSearchBox-C18GEhLm.js +0 -126
  75. package/dist/client/VPCarbonAds-DwoamMao.js +0 -31
  76. package/dist/client/VPLocalSearchBox-DyteUinQ.js +0 -4086
  77. package/dist/client/index-BtT3qA6T.js +0 -12663
  78. package/dist/client/index-CCR5sUM8.js +0 -10688
  79. package/dist/client/index-CkmxezC0.js +0 -7616
  80. package/dist/client/index-DuYWs0vj.js +0 -265
  81. package/dist/node/composables/index.d.ts +0 -3
  82. package/dist/node/composables/markdown.d.ts +0 -2
  83. package/dist/node/composables/route.d.ts +0 -15
  84. package/dist/node/composables/slug.d.ts +0 -7
  85. package/dist/node/composables/types.d.ts +0 -7
  86. package/dist/node/config.d.ts +0 -45
@@ -1,4 +1,4 @@
1
- <script setup lang='ts'>
1
+ <script setup lang="ts">
2
2
  import type { PropType } from 'vue'
3
3
  import { useI18n } from 'vue-i18n'
4
4
  import type { Post } from '../types'
@@ -7,8 +7,8 @@ defineProps({
7
7
  posts: {
8
8
  type: Object as PropType<Post[]>,
9
9
  required: true,
10
- default: [],
11
- },
10
+ default: []
11
+ }
12
12
  })
13
13
  const { t } = useI18n()
14
14
  </script>
@@ -1,20 +1,22 @@
1
- <script setup lang='ts'>
1
+ <script setup lang="ts">
2
2
  defineProps({
3
3
  title: {
4
4
  type: String,
5
5
  required: true,
6
- default: '',
7
- },
6
+ default: ''
7
+ }
8
8
  })
9
9
  </script>
10
10
 
11
11
  <template>
12
- <div class="pt-6 pb-8 space-y-2 md:space-y-5">
13
- <h1
14
- class="mb-6 text-3xl font-extrabold leading-9 tracking-tight text-gray-900 dark:text-gray-100 sm:text-4xl sm:leading-10 md:text-6xl md:leading-14"
15
- >
16
- {{ title }}
17
- </h1>
18
- </div>
19
- <slot />
12
+ <main class="main">
13
+ <div class="pt-6 pb-8 space-y-2 md:space-y-5">
14
+ <h1
15
+ class="mb-6 text-3xl font-extrabold leading-9 tracking-tight text-gray-900 dark:text-gray-100 sm:text-4xl sm:leading-10 md:text-6xl md:leading-14"
16
+ >
17
+ {{ title }}
18
+ </h1>
19
+ </div>
20
+ <slot />
21
+ </main>
20
22
  </template>
@@ -1,4 +1,4 @@
1
- <script setup lang='ts'>
1
+ <script setup lang="ts">
2
2
  import type { PropType } from 'vue'
3
3
  import PostList from '../components/PostList.vue'
4
4
  import type { Post } from '../types'
@@ -6,13 +6,13 @@ import type { Post } from '../types'
6
6
  defineProps({
7
7
  title: {
8
8
  type: String,
9
- required: true,
9
+ required: true
10
10
  },
11
11
  posts: {
12
12
  type: Object as PropType<Post[]>,
13
13
  required: true,
14
- default: [],
15
- },
14
+ default: []
15
+ }
16
16
  })
17
17
  </script>
18
18
 
@@ -10,31 +10,34 @@ const props = defineProps({
10
10
  projectPage: {
11
11
  type: String,
12
12
  required: false,
13
- default: '/projects.html',
13
+ default: '/projects.html'
14
14
  },
15
15
  projects: {
16
16
  type: Object as PropType<Project[]>,
17
17
  required: true,
18
- default: [],
18
+ default: []
19
19
  },
20
20
  technology: {
21
21
  type: String,
22
- required: false,
23
- },
22
+ required: false
23
+ }
24
24
  })
25
25
 
26
26
  const { t } = useI18n()
27
27
  const tech = props.technology
28
28
  const hasTechParam = typeof tech === 'string' && tech.length > 0
29
- const byTech: (project: Project) => boolean = (project) => !hasTechParam || project.techs.some(useSlugFilter(tech))
29
+ const byTech: (project: Project) => boolean = (project) =>
30
+ !hasTechParam || project.techs.some(useSlugFilter(tech))
30
31
  const projectsByTech = computed(() => props.projects.filter(byTech))
31
32
  const technologies = computed(() => {
32
- const uniqueTechnologies = [...new Set(props.projects.flatMap((project) => project.techs))]
33
+ const uniqueTechnologies = [
34
+ ...new Set(props.projects.flatMap((project) => project.techs))
35
+ ]
33
36
  return uniqueTechnologies
34
37
  .map((name) => ({
35
38
  name,
36
39
  slug: useSlug(name),
37
- selected: hasTechParam && useSlug(name) === tech,
40
+ selected: hasTechParam && useSlug(name) === tech
38
41
  }))
39
42
  .sort((a, b) => (b.selected === a.selected ? 0 : b.selected ? 1 : -1))
40
43
  })
@@ -1,4 +1,4 @@
1
- <script setup lang='ts'>
1
+ <script setup lang="ts">
2
2
  import { computed, type PropType } from 'vue'
3
3
  import { useI18n } from 'vue-i18n'
4
4
  import TermBadge from '../components/TermBadge.vue'
@@ -9,8 +9,8 @@ const props = defineProps({
9
9
  posts: {
10
10
  type: Object as PropType<Post[]>,
11
11
  required: true,
12
- default: [],
13
- },
12
+ default: []
13
+ }
14
14
  })
15
15
 
16
16
  const { t } = useI18n()
@@ -24,7 +24,13 @@ const tags = computed(() => useRank(props.posts.flatMap((post) => post.tags)))
24
24
  <div v-if="Object.keys(tags).length === 0" class="mt-2 mb-2 mr-5">
25
25
  {{ t('no_tag') }}
26
26
  </div>
27
- <TermBadge v-for="(count, tag) in tags" :key="tag" :title="tag" :count="count" :href="`/tags/${useSlug(tag)}`" />
27
+ <TermBadge
28
+ v-for="(count, tag) in tags"
29
+ :key="tag"
30
+ :title="tag"
31
+ :count="count"
32
+ :href="`/tags/${useSlug(tag)}`"
33
+ />
28
34
  </div>
29
35
  </Page>
30
36
  </template>
@@ -17,15 +17,17 @@ const computedDonationConfig = computed(() => {
17
17
  if (donationPlatform === 'custom') {
18
18
  continue
19
19
  }
20
- const donationId: string = donationConfigs[donationPlatform as keyof typeof donationConfigs] as string
20
+ const donationId: string = donationConfigs[
21
+ donationPlatform as keyof typeof donationConfigs
22
+ ] as string
21
23
  donationConfig[donationPlatform] = {
22
24
  ...supportedDonationPlatforms[donationPlatform],
23
- donationId,
25
+ donationId
24
26
  }
25
27
  }
26
28
  return {
27
29
  ...donationConfig,
28
- ...donationConfigs.custom,
30
+ ...donationConfigs.custom
29
31
  }
30
32
  })
31
33
  </script>
@@ -8,7 +8,9 @@ interface DonationButtonProps extends CustomDonationConfig {
8
8
 
9
9
  const props = defineProps<DonationButtonProps>()
10
10
 
11
- const donationUrl = computed(() => new URL(props.donationId, props.donationBaseUrl).toString())
11
+ const donationUrl = computed(() =>
12
+ new URL(props.donationId, props.donationBaseUrl).toString()
13
+ )
12
14
  </script>
13
15
 
14
16
  <template>
@@ -22,21 +22,24 @@ export const supportedDonationPlatforms: {
22
22
  } = {
23
23
  buymeacoffee: {
24
24
  donationBaseUrl: 'https://buymeacoffee.com',
25
- donationButtonImage: 'https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png',
25
+ donationButtonImage:
26
+ 'https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png',
26
27
  donationButtonStyle: {
27
28
  height: '60px !important',
28
- width: '217px !important',
29
- },
29
+ width: '217px !important'
30
+ }
30
31
  },
31
32
  kofi: {
32
33
  donationBaseUrl: 'https://ko-fi.com',
33
- donationButtonImage: 'https://storage.ko-fi.com/cdn/brandasset/kofi_bg_tag_white.png',
34
+ donationButtonImage:
35
+ 'https://storage.ko-fi.com/cdn/brandasset/kofi_bg_tag_white.png',
34
36
  donationButtonStyle: {
35
- height: '60px !important',
36
- },
37
+ height: '60px !important'
38
+ }
37
39
  },
38
40
  paypal: {
39
41
  donationBaseUrl: 'https://paypal.me',
40
- donationButtonImage: 'https://paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif',
41
- },
42
+ donationButtonImage:
43
+ 'https://paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif'
44
+ }
42
45
  }
@@ -8,6 +8,6 @@ export default createI18n({
8
8
  locale: 'en',
9
9
  messages: {
10
10
  en,
11
- vi,
12
- },
11
+ vi
12
+ }
13
13
  })
@@ -9,11 +9,22 @@ const defaultConfigs = {
9
9
  titleCssClass: 'text-sm/[32px] font-semibold mb-2',
10
10
  buttonCssClass: 'flex flex-wrap space-x-1',
11
11
  title: 'Share',
12
- networks: ['email', 'facebook', 'twitter', 'telegram', 'reddit', 'linkedin', 'whatsapp', 'pinterest', 'tumblr', 'vk'],
12
+ networks: [
13
+ 'email',
14
+ 'facebook',
15
+ 'twitter',
16
+ 'telegram',
17
+ 'reddit',
18
+ 'linkedin',
19
+ 'whatsapp',
20
+ 'pinterest',
21
+ 'tumblr',
22
+ 'vk'
23
+ ],
13
24
  buttonSize: 18,
14
25
  iconSize: 20,
15
26
  iconStyle: 'solid',
16
- displayMode: 'both',
27
+ displayMode: 'both'
17
28
  }
18
29
 
19
30
  const props = defineProps<SharingComponentProps>()
@@ -24,45 +35,51 @@ const pluginConfig = computed(() => theme.value.sharing || false)
24
35
  const wrapperCssClass = computed(() =>
25
36
  pluginConfig.value && typeof pluginConfig.value.wrapperCssClass === 'string'
26
37
  ? pluginConfig.value.wrapperCssClass
27
- : defaultConfigs.wrapperCssClass,
38
+ : defaultConfigs.wrapperCssClass
28
39
  )
29
40
  const title = computed(() =>
30
- pluginConfig.value && typeof pluginConfig.value.title === 'string' ? pluginConfig.value.title : defaultConfigs.title,
41
+ pluginConfig.value && typeof pluginConfig.value.title === 'string'
42
+ ? pluginConfig.value.title
43
+ : defaultConfigs.title
31
44
  )
32
45
  const titleCssClass = computed(() =>
33
46
  pluginConfig.value && typeof pluginConfig.value.titleCssClass === 'string'
34
47
  ? pluginConfig.value.titleCssClass
35
- : defaultConfigs.titleCssClass,
48
+ : defaultConfigs.titleCssClass
36
49
  )
37
50
  const buttonCssClass = computed(() =>
38
51
  pluginConfig.value && typeof pluginConfig.value.buttonCssClass === 'string'
39
52
  ? pluginConfig.value.buttonCssClass
40
- : defaultConfigs.buttonCssClass,
53
+ : defaultConfigs.buttonCssClass
41
54
  )
42
55
  const networks = computed(() =>
43
56
  pluginConfig.value && Array.isArray(pluginConfig.value.networks)
44
57
  ? pluginConfig.value.networks
45
- : defaultConfigs.networks,
58
+ : defaultConfigs.networks
46
59
  )
47
60
  const buttonSize = computed(() =>
48
- pluginConfig.value && Number.isInteger(pluginConfig.value.buttonSize) && pluginConfig.value.buttonSize > 0
61
+ pluginConfig.value &&
62
+ Number.isInteger(pluginConfig.value.buttonSize) &&
63
+ pluginConfig.value.buttonSize > 0
49
64
  ? pluginConfig.value.buttonSize
50
- : defaultConfigs.buttonSize,
65
+ : defaultConfigs.buttonSize
51
66
  )
52
67
  const iconSize = computed(() =>
53
- pluginConfig.value && Number.isInteger(pluginConfig.value.iconSize) && pluginConfig.value.iconSize > 0
68
+ pluginConfig.value &&
69
+ Number.isInteger(pluginConfig.value.iconSize) &&
70
+ pluginConfig.value.iconSize > 0
54
71
  ? pluginConfig.value.iconSize
55
- : defaultConfigs.iconSize,
72
+ : defaultConfigs.iconSize
56
73
  )
57
74
  const iconStyle = computed(() =>
58
75
  pluginConfig.value && typeof pluginConfig.value.iconStyle === 'string'
59
76
  ? pluginConfig.value.iconStyle
60
- : defaultConfigs.iconStyle,
77
+ : defaultConfigs.iconStyle
61
78
  )
62
79
  const displayMode = computed(() =>
63
80
  pluginConfig.value && typeof pluginConfig.value.displayMode === 'string'
64
81
  ? pluginConfig.value.displayMode
65
- : defaultConfigs.displayMode,
82
+ : defaultConfigs.displayMode
66
83
  )
67
84
  </script>
68
85
 
@@ -73,8 +90,15 @@ const displayMode = computed(() =>
73
90
  </p>
74
91
  <div :class="buttonCssClass">
75
92
  <template v-for="network in networks" :key="network">
76
- <SharingButton :url="props.url" :text="props.text" :network="network" :button-size="buttonSize"
77
- :icon-size="iconSize" :icon-style="iconStyle" :display-mode="displayMode" />
93
+ <SharingButton
94
+ :url="props.url"
95
+ :text="props.text"
96
+ :network="network"
97
+ :button-size="buttonSize"
98
+ :icon-size="iconSize"
99
+ :icon-style="iconStyle"
100
+ :display-mode="displayMode"
101
+ />
78
102
  </template>
79
103
  </div>
80
104
  </div>
@@ -5,7 +5,7 @@ import { SharingButtonComponentProps, useUrlQueryParamsBuilder } from '..'
5
5
 
6
6
  const props = withDefaults(defineProps<SharingButtonComponentProps>(), {
7
7
  iconSize: 32,
8
- displayMode: 'icon',
8
+ displayMode: 'icon'
9
9
  })
10
10
 
11
11
  const provider = computed(() => {
@@ -16,7 +16,7 @@ const provider = computed(() => {
16
16
  shareBaseURL: 'mailto:',
17
17
  icon: 'bi:envelope-fill',
18
18
  params: { subject: props.text, body: props.url },
19
- allowedParams: ['subject', 'body'],
19
+ allowedParams: ['subject', 'body']
20
20
  }
21
21
  case 'facebook':
22
22
  return {
@@ -24,7 +24,7 @@ const provider = computed(() => {
24
24
  shareBaseURL: 'https://facebook.com/sharer/sharer.php',
25
25
  icon: 'bi:facebook',
26
26
  params: { u: props.url },
27
- allowedParams: ['u', 'display', 'redirect_uri'],
27
+ allowedParams: ['u', 'display', 'redirect_uri']
28
28
  }
29
29
  case 'linkedin':
30
30
  return {
@@ -32,7 +32,7 @@ const provider = computed(() => {
32
32
  shareBaseURL: 'https://www.linkedin.com/sharing/share-offsite',
33
33
  icon: 'bi:linkedin',
34
34
  params: { url: props.url },
35
- allowedParams: ['url'],
35
+ allowedParams: ['url']
36
36
  }
37
37
  case 'pinterest':
38
38
  return {
@@ -40,7 +40,15 @@ const provider = computed(() => {
40
40
  shareBaseURL: 'https://pinterest.com/pin/create/button',
41
41
  icon: 'bi:pinterest',
42
42
  params: { posttype: 'link', title: props.text, url: props.url },
43
- allowedParams: ['posttype', 'tags', 'title', 'content', 'caption', 'show-via', 'canonicalUrl'],
43
+ allowedParams: [
44
+ 'posttype',
45
+ 'tags',
46
+ 'title',
47
+ 'content',
48
+ 'caption',
49
+ 'show-via',
50
+ 'canonicalUrl'
51
+ ]
44
52
  }
45
53
  case 'reddit':
46
54
  return {
@@ -48,7 +56,7 @@ const provider = computed(() => {
48
56
  shareBaseURL: 'https://www.reddit.com/submit',
49
57
  icon: 'bi:reddit',
50
58
  params: { title: props.text, url: props.url },
51
- allowedParams: ['title', 'url'],
59
+ allowedParams: ['title', 'url']
52
60
  }
53
61
  case 'telegram':
54
62
  return {
@@ -56,7 +64,7 @@ const provider = computed(() => {
56
64
  shareBaseURL: 'https://telegram.me/share/url',
57
65
  icon: 'bi:telegram',
58
66
  params: { text: props.text, url: props.url },
59
- allowedParams: ['text', 'url'],
67
+ allowedParams: ['text', 'url']
60
68
  }
61
69
  // case 'tumblr':
62
70
  // return {
@@ -72,7 +80,7 @@ const provider = computed(() => {
72
80
  shareBaseURL: 'https://twitter.com/intent/tweet',
73
81
  icon: 'bi:twitter',
74
82
  params: { text: props.text, url: props.url },
75
- allowedParams: ['text', 'url', 'hashtag', 'via'],
83
+ allowedParams: ['text', 'url', 'hashtag', 'via']
76
84
  }
77
85
  // case 'vk':
78
86
  // return {
@@ -88,7 +96,7 @@ const provider = computed(() => {
88
96
  shareBaseURL: 'whatsapp://send',
89
97
  icon: 'bi:whatsapp',
90
98
  params: { text: props.url },
91
- allowedParams: ['text'],
99
+ allowedParams: ['text']
92
100
  }
93
101
  default:
94
102
  return {}
@@ -106,10 +114,22 @@ const shareURL = computed(() => {
106
114
  </script>
107
115
 
108
116
  <template>
109
- <a :href="shareURL" target="_blank" rel="noopener" :aria-label="networkName"
110
- style="padding-left: 0.25rem; padding-right: 0.25rem;">
111
- <Icon v-if="['icon', 'both'].includes(props.displayMode)" :icon="networkIcon" :width="iconSize" :height="iconSize"
112
- class="fill-current text-gray-700 dark:text-gray-200 hover:text-blue-500 dark:hover:text-blue-400" />
113
- <template v-if="['text', 'both'].includes(props.displayMode)">&nbsp;{{ networkName }}</template>
117
+ <a
118
+ :href="shareURL"
119
+ target="_blank"
120
+ rel="noopener"
121
+ :aria-label="networkName"
122
+ style="padding-left: 0.25rem; padding-right: 0.25rem"
123
+ >
124
+ <Icon
125
+ v-if="['icon', 'both'].includes(props.displayMode)"
126
+ :icon="networkIcon"
127
+ :width="iconSize"
128
+ :height="iconSize"
129
+ class="fill-current text-gray-700 dark:text-gray-200 hover:text-blue-500 dark:hover:text-blue-400"
130
+ />
131
+ <template v-if="['text', 'both'].includes(props.displayMode)"
132
+ >&nbsp;{{ networkName }}</template
133
+ >
114
134
  </a>
115
135
  </template>
@@ -63,13 +63,17 @@ export type SharingComponentProps = {
63
63
  text: string
64
64
  }
65
65
 
66
- export const useUrlQueryParamsBuilder = (params: Record<string, string | undefined> | undefined): string => {
66
+ export const useUrlQueryParamsBuilder = (
67
+ params: Record<string, string | undefined> | undefined
68
+ ): string => {
67
69
  if (!params) {
68
70
  return ''
69
71
  }
70
72
  const esc = encodeURIComponent
71
73
  const paramKeys = Object.keys(params)
72
- if (paramKeys.length < 1) return ''
74
+ if (paramKeys.length < 1) {
75
+ return ''
76
+ }
73
77
 
74
78
  const s = paramKeys
75
79
  .filter((key) => params[key] !== undefined)
@@ -0,0 +1,30 @@
1
+ @import 'tailwindcss';
2
+ @variant dark (&:where(.dark, .dark *));
3
+
4
+ @theme {
5
+ --color-primary: rgb(59, 130, 246);
6
+ --color-primary-alt: rgb(29, 78, 216);
7
+ --color-primary-alt-dark: rgb(147, 197, 253);
8
+ --color-secondary: rgb(239, 68, 68);
9
+ --color-secondary-dark: rgb(234, 179, 8);
10
+ }
11
+
12
+ @utility component-border {
13
+ @apply border rounded-md border-gray-500 hover:border-secondary dark:hover:border-secondary-dark;
14
+ }
15
+
16
+ @utility link {
17
+ @apply no-underline hover:text-secondary dark:hover:text-secondary-dark;
18
+ }
19
+
20
+ @utility link-alt {
21
+ @apply text-primary-alt! dark:text-primary-alt-dark! link!;
22
+ }
23
+
24
+ :root {
25
+ --vp-c-brand-1: var(--color-primary);
26
+ }
27
+
28
+ .vp-doc a {
29
+ @apply link;
30
+ }