valaxy-theme-press 0.0.2 → 0.0.4

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 (62) hide show
  1. package/client/index.ts +1 -0
  2. package/components/PressAlgoliaSearch.vue +208 -0
  3. package/components/PressArticle.vue +27 -16
  4. package/components/PressArticleCard.vue +6 -2
  5. package/components/PressAside.vue +38 -27
  6. package/components/PressBackdrop.vue +1 -1
  7. package/components/PressButton.vue +5 -12
  8. package/components/PressCategories.vue +24 -3
  9. package/components/PressCategory.vue +24 -15
  10. package/components/PressDocFooter.vue +15 -0
  11. package/components/PressDocFooterLastUpdated.vue +44 -0
  12. package/components/PressFeature.vue +1 -1
  13. package/components/PressFeatures.vue +1 -1
  14. package/components/PressFooter.vue +53 -0
  15. package/components/PressHome.vue +1 -7
  16. package/components/PressHomeFeatures.vue +1 -0
  17. package/components/PressHomeHero.vue +7 -8
  18. package/components/PressLocalNav.vue +9 -9
  19. package/components/PressNav.vue +30 -5
  20. package/components/PressNavBar.vue +94 -0
  21. package/components/PressNavBarAppearance.vue +5 -0
  22. package/components/PressNavBarHamburger.vue +79 -0
  23. package/components/PressNavBarMenu.vue +14 -0
  24. package/components/PressNavBarSearch.vue +40 -0
  25. package/components/PressNavBarSocialLinks.vue +26 -0
  26. package/components/PressNavBarTranslations.vue +5 -0
  27. package/components/PressNavItemGroup.vue +101 -0
  28. package/components/PressNavItemLink.vue +40 -0
  29. package/components/PressNavScreen.vue +95 -0
  30. package/components/PressNavScreenAppearance.vue +32 -0
  31. package/components/PressNavScreenMenu.vue +22 -0
  32. package/components/PressNavScreenMenuGroup.vue +115 -0
  33. package/components/PressNavScreenMenuGroupLink.vue +32 -0
  34. package/components/PressNavScreenMenuGroupSection.vue +37 -0
  35. package/components/PressNavScreenMenuLink.vue +33 -0
  36. package/components/PressNavScreenSocialLinks.vue +13 -0
  37. package/components/PressNavScreenTranslations.vue +7 -0
  38. package/components/{PressToc.vue → PressOutline.vue} +14 -39
  39. package/components/PressOutlineItem.vue +48 -0
  40. package/components/PressPostList.vue +3 -3
  41. package/components/PressSidebar.vue +31 -10
  42. package/components/PressSocialLink.vue +40 -0
  43. package/components/PressSocialLinks.vue +26 -0
  44. package/components/ValaxyMain.vue +60 -42
  45. package/composables/edit-link.ts +14 -0
  46. package/composables/index.ts +1 -0
  47. package/composables/nav.ts +37 -0
  48. package/config/index.ts +13 -2
  49. package/layouts/layout.vue +5 -3
  50. package/package.json +15 -5
  51. package/pages/[..all].vue +1 -0
  52. package/setup/main.ts +5 -4
  53. package/styles/css-vars.scss +16 -8
  54. package/styles/helper.scss +0 -10
  55. package/styles/markdown.scss +18 -8
  56. package/types/index.d.ts +76 -22
  57. package/utils/index.ts +9 -0
  58. package/valaxy.config.ts +7 -0
  59. package/LICENSE +0 -21
  60. package/components/DocsBoard.vue +0 -24
  61. package/components/nav/PressNavBar.vue +0 -123
  62. /package/components/{nav/PressSwitchAppearance.vue → PressSwitchAppearance.vue} +0 -0
@@ -0,0 +1,44 @@
1
+ <script setup lang="ts">
2
+ import { computed, onMounted, ref, watchEffect } from 'vue'
3
+ import { useData, useThemeConfig } from 'valaxy'
4
+
5
+ const data = useData()
6
+ const themeConfig = useThemeConfig()
7
+
8
+ const date = computed(() => new Date(data.lastUpdated!))
9
+ const isoDatetime = computed(() => date.value.toISOString())
10
+ const datetime = ref('')
11
+
12
+ // set time on mounted hook because the locale string might be different
13
+ // based on end user and will lead to potential hydration mismatch if
14
+ // calculated at build time
15
+ onMounted(() => {
16
+ watchEffect(() => {
17
+ datetime.value = date.value.toLocaleString(window.navigator.language)
18
+ })
19
+ })
20
+ </script>
21
+
22
+ <template>
23
+ <p class="press-lastUpdated">
24
+ {{ themeConfig.lastUpdatedText ?? 'Last updated' }}:
25
+ <time :datetime="isoDatetime">{{ datetime }}</time>
26
+ </p>
27
+ </template>
28
+
29
+ <style scoped>
30
+ .press-lastUpdated {
31
+ line-height: 24px;
32
+ font-size: 14px;
33
+ font-weight: 500;
34
+ color: var(--va-c-text-light);
35
+ }
36
+
37
+ @media (min-width: 640px) {
38
+ .press-lastUpdated {
39
+ line-height: 32px;
40
+ font-size: 14px;
41
+ font-weight: 500;
42
+ }
43
+ }
44
+ </style>
@@ -56,6 +56,6 @@ defineProps<{
56
56
  line-height: 24px;
57
57
  font-size: 14px;
58
58
  font-weight: 500;
59
- color: var(--va-c-text-light);
59
+ color: var(--va-c-text-lighter);
60
60
  }
61
61
  </style>
@@ -17,7 +17,7 @@ const grid = computed(() => {
17
17
 
18
18
  <template>
19
19
  <div class="press-features">
20
- <div class="m-auto container grid gap-4" :class="[grid]">
20
+ <div class="m-auto container grid gap-4" p="x-4" :class="[grid]">
21
21
  <div v-for="feature in features" :key="feature.title" class="inline-grid">
22
22
  <PressFeature :feature="feature" />
23
23
  </div>
@@ -0,0 +1,53 @@
1
+ <script setup lang="ts">
2
+ import { useSidebar } from 'valaxy'
3
+ import { useThemeConfig } from '../composables'
4
+
5
+ const themeConfig = useThemeConfig()
6
+ const { hasSidebar } = useSidebar()
7
+ </script>
8
+
9
+ <template>
10
+ <footer v-if="themeConfig.footer" class="press-footer" :class="{ 'has-sidebar': hasSidebar }">
11
+ <div flex="~ col" class="container">
12
+ <p v-if="themeConfig.footer.message" class="message" v-html="themeConfig.footer.message" />
13
+ <p v-if="themeConfig.footer.copyright" class="copyright" v-html="themeConfig.footer.copyright" />
14
+ </div>
15
+ </footer>
16
+ </template>
17
+
18
+ <style lang="scss" scoped>
19
+ .press-footer {
20
+ position: relative;
21
+ z-index: var(--pr-z-index-footer);
22
+ border-top: 1px solid var(--pr-c-divider-light);
23
+ padding: 32px 24px;
24
+ background-color: var(--va-c-bg);
25
+
26
+ &.has-sidebar {
27
+ display: none;
28
+ }
29
+ }
30
+
31
+ @media (min-width: 768px) {
32
+ .pr-footer {
33
+ padding: 32px;
34
+ }
35
+ }
36
+
37
+ .container {
38
+ margin: 0 auto;
39
+ max-width: var(--pr-layout-max-width);
40
+ text-align: center;
41
+ }
42
+
43
+ .message,
44
+ .copyright {
45
+ line-height: 24px;
46
+ font-size: 14px;
47
+ font-weight: 500;
48
+ color: var(--va-c-text-lighter);
49
+ }
50
+
51
+ .message { order: 2; }
52
+ .copyright { order: 1; }
53
+ </style>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="press-home">
2
+ <div class="press-home" style="--va-code-mobile-margin-x: 0">
3
3
  <slot name="home-hero-before" />
4
4
  <PressHomeHero />
5
5
  <slot name="home-hero-after" />
@@ -11,11 +11,5 @@
11
11
  <slot>
12
12
  <router-view />
13
13
  </slot>
14
-
15
- <p align="center">
16
- <a href="https://sponsors.yunyoujun.cn">
17
- <img src="https://sponsors.yunyoujun.cn/sponsors.svg">
18
- </a>
19
- </p>
20
14
  </div>
21
15
  </template>
@@ -1,5 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { useFrontmatter } from 'valaxy'
3
+
3
4
  const fm = useFrontmatter()
4
5
  </script>
5
6
 
@@ -6,19 +6,18 @@ const fm = useFrontmatter()
6
6
  </script>
7
7
 
8
8
  <template>
9
- <h1 m="md:t-24 t-10 md:t-20" text="center">
10
- <span text="5rem" font="black" class="gradient-text from-purple-800 to-blue-500" bg="gradient-to-r">
9
+ <div text="center" m="md:t-24 t-10 md:t-20" flex="~ col" justify="center" items="center">
10
+ <ValaxyLogo mb="2" />
11
+ <h1 my="10" text="4xl md:8xl" font="black" class="gradient-text from-purple-800 to-blue-500" bg="gradient-to-r">
11
12
  {{ fm.hero.name }}
12
- </span>
13
- <br>
14
- <small opacity="75">LOGO NOT READY</small>
15
- </h1>
13
+ </h1>
14
+ </div>
16
15
 
17
- <h1 m="y-10" text="center 6xl" font="black" leading="tight">
16
+ <h2 m="b-10" text="center 6xl" font="black" leading="tight">
18
17
  Next Generation
19
18
  <br>
20
19
  Static <span class="gradient-text from-blue-500 to-purple-700" bg="gradient-to-r">Blog</span> Framework
21
- </h1>
20
+ </h2>
22
21
 
23
22
  <div p="2" text="center">
24
23
  <PressButton
@@ -1,5 +1,5 @@
1
1
  <script lang="ts" setup>
2
- import { useSidebar } from 'valaxy/client'
2
+ import { useSidebar } from 'valaxy'
3
3
 
4
4
  defineProps<{
5
5
  open: boolean
@@ -21,7 +21,7 @@ function scrollToTop() {
21
21
  <button
22
22
  class="menu"
23
23
  :aria-expanded="open"
24
- aria-controls="VPSidebarNav"
24
+ aria-controls="pr-sidebar-nav"
25
25
  @click="$emit('openMenu')"
26
26
  >
27
27
  <div i-ri-align-left class="menu-icon" />
@@ -35,13 +35,13 @@ function scrollToTop() {
35
35
  </template>
36
36
 
37
37
  <style scoped lang="scss">
38
- @use 'valaxy/client/styles/mixins' as *;
38
+ @use 'valaxy/client/styles/mixins/index.scss' as *;
39
39
 
40
40
  .press-local-nav {
41
41
  position: sticky;
42
42
  top: 0;
43
43
  left: 0;
44
- z-index: var(--pr-z-index-local-nav);
44
+ z-index: var(--pr-z-local-nav);
45
45
  display: flex;
46
46
  justify-content: space-between;
47
47
  align-items: center;
@@ -51,7 +51,7 @@ function scrollToTop() {
51
51
  transition: border-color 0.5s;
52
52
  }
53
53
 
54
- @include media('md') {
54
+ @include screen('md') {
55
55
  .press-local-nav {
56
56
  display: none;
57
57
  }
@@ -73,7 +73,7 @@ function scrollToTop() {
73
73
  transition: color 0.25s;
74
74
  }
75
75
 
76
- @include media('md') {
76
+ @include screen('md') {
77
77
  .menu {
78
78
  padding: 0 32px;
79
79
  }
@@ -92,16 +92,16 @@ function scrollToTop() {
92
92
  line-height: 24px;
93
93
  font-size: 12px;
94
94
  font-weight: 500;
95
- color: var(--vp-c-text-2);
95
+ color: var(--pr-c-text-2);
96
96
  transition: color 0.5s;
97
97
  }
98
98
 
99
99
  .top-link:hover {
100
- color: var(--vp-c-text-1);
100
+ color: var(--pr-c-text-1);
101
101
  transition: color 0.25s;
102
102
  }
103
103
 
104
- @include media('md') {
104
+ @include screen('md') {
105
105
  .top-link {
106
106
  padding: 12px 32px 11px;
107
107
  }
@@ -1,17 +1,42 @@
1
+ <script setup lang="ts">
2
+ import { computed, provide } from 'vue'
3
+ import { useWindowScroll } from '@vueuse/core'
4
+ import { useSidebar } from 'valaxy'
5
+ import { useNav } from '../composables/nav'
6
+
7
+ const { y } = useWindowScroll()
8
+
9
+ const { isScreenOpen, closeScreen, toggleScreen } = useNav()
10
+ const { hasSidebar } = useSidebar()
11
+
12
+ provide('close-screen', closeScreen)
13
+
14
+ const classes = computed(() => ({
15
+ 'no-sidebar': !hasSidebar.value,
16
+ 'fill-bg': y.value > 0,
17
+ }))
18
+ </script>
19
+
1
20
  <template>
2
- <nav w="full" class="press-nav relative md:fixed md:z-99 font-bold">
3
- <PressNavBar />
21
+ <nav w="full" class="press-nav relative md:fixed md:z-99 font-bold" :class="classes">
22
+ <PressNavBar :is-screen-open="isScreenOpen" @toggle-screen="toggleScreen" />
23
+
24
+ <PressNavScreen :open="isScreenOpen" />
4
25
  </nav>
5
26
  </template>
6
27
 
7
28
  <style lang="scss">
8
- @use 'valaxy/client/styles/mixins' as *;
29
+ @use 'valaxy/client/styles/mixins/index.scss' as *;
9
30
 
10
31
  .press-nav {
11
- z-index: var(--pr-z-index-nav);
32
+ z-index: var(--pr-z-nav);
33
+ }
34
+
35
+ .pr-Nav.fill-bg {
36
+ background-color: var(--pr-nav-bg-color);
12
37
  }
13
38
 
14
- @include media('md') {
39
+ @include screen('md') {
15
40
  .press-nav {
16
41
  -webkit-backdrop-filter: saturate(50%) blur(8px);
17
42
  backdrop-filter: saturate(50%) blur(8px);
@@ -0,0 +1,94 @@
1
+ <script lang="ts" setup>
2
+ import { useSidebar, useSiteConfig } from 'valaxy'
3
+ import { useThemeConfig } from '../composables'
4
+
5
+ defineProps<{
6
+ isScreenOpen?: boolean
7
+ }>()
8
+
9
+ defineEmits<{
10
+ (e: 'toggleScreen'): void
11
+ }>()
12
+
13
+ const { hasSidebar } = useSidebar()
14
+
15
+ const siteConfig = useSiteConfig()
16
+ const themeConfig = useThemeConfig()
17
+ </script>
18
+
19
+ <template>
20
+ <div class="pr-navbar flex justify-between items-center pl-4 pr-2" :class="{ 'has-sidebar': hasSidebar }">
21
+ <router-link class="text-xl flex justify-center items-center" to="/" :aria-label="siteConfig.title">
22
+ <img v-if="themeConfig.logo" class="logo" :src="themeConfig.logo" alt="LOGO">
23
+ <span class="inline-flex">{{ siteConfig.title }}</span>
24
+ </router-link>
25
+ <div class="self-stretch flex justify-center items-center text-sm leading-5">
26
+ <PressNavBarSearch p="x-2" />
27
+ <PressNavBarMenu p="x-2" />
28
+ <PressNavBarTranslations p="x-2" />
29
+ <PressNavBarAppearance p="x-2" />
30
+ <PressNavBarSocialLinks p="x-2" />
31
+
32
+ <PressNavBarHamburger :active="isScreenOpen" @click="$emit('toggleScreen')" />
33
+ </div>
34
+ </div>
35
+ </template>
36
+
37
+ <style lang="scss">
38
+ @use 'valaxy/client/styles/mixins/index.scss' as *;
39
+
40
+ :root {
41
+ --pr-navbar-c-bg: rgba(255, 255, 255, 0.8);
42
+ }
43
+
44
+ .logo {
45
+ width: 32px;
46
+ height: 32px;
47
+ margin-right: 8px;
48
+ }
49
+
50
+ .dark {
51
+ --pr-navbar-c-bg: rgba(24, 24, 24, 0.3);
52
+ }
53
+
54
+ .pr-navbar {
55
+ position: relative;
56
+ border-bottom: 1px solid var(--pr-c-divider-light);
57
+ padding: 0 8px 0 24px;
58
+ height: var(--pr-nav-height);
59
+ transition: border-color 0.5s;
60
+ background-color: var(--pr-navbar-c-bg);
61
+ }
62
+
63
+ @include screen('md') {
64
+ .pr-navbar {
65
+ padding: 0 32px;
66
+ }
67
+ }
68
+
69
+ @include screen('md') {
70
+ .pr-navbar.has-sidebar .content {
71
+ margin-right: -32px;
72
+ padding-right: 32px;
73
+ -webkit-backdrop-filter: saturate(50%) blur(8px);
74
+ backdrop-filter: saturate(50%) blur(8px);
75
+ }
76
+
77
+ @supports not (backdrop-filter: saturate(50%) blur(8px)) {
78
+ .pr-navbar.has-sidebar .content {
79
+ background: rgba(255, 255, 255, 0.95);
80
+ }
81
+
82
+ .dark .pr-navbar.has-sidebar .content {
83
+ background: rgba(36, 36, 36, 0.95);
84
+ }
85
+ }
86
+ }
87
+
88
+ .container {
89
+ display: flex;
90
+ justify-content: space-between;
91
+ margin: 0 auto;
92
+ max-width: calc(var(--pr-layout-max-width) - 64px);
93
+ }
94
+ </style>
@@ -0,0 +1,5 @@
1
+ <template>
2
+ <div class="inline-flex items-center lt-lg:hidden">
3
+ <PressSwitchAppearance />
4
+ </div>
5
+ </template>
@@ -0,0 +1,79 @@
1
+ <script lang="ts" setup>
2
+ defineProps<{
3
+ active: boolean
4
+ }>()
5
+
6
+ defineEmits<{
7
+ (e: 'click'): void
8
+ }>()
9
+ </script>
10
+
11
+ <template>
12
+ <button
13
+ type="button"
14
+ class="pr-NavBarHamburger"
15
+ :class="{ active }"
16
+ aria-label="mobile navigation"
17
+ :aria-expanded="active"
18
+ aria-controls="pr-NavScreen"
19
+ @click="$emit('click')"
20
+ >
21
+ <span class="container">
22
+ <span class="top" />
23
+ <span class="middle" />
24
+ <span class="bottom" />
25
+ </span>
26
+ </button>
27
+ </template>
28
+
29
+ <style scoped>
30
+ .pr-NavBarHamburger {
31
+ display: flex;
32
+ justify-content: center;
33
+ align-items: center;
34
+ width: 48px;
35
+ height: var(--pr-nav-height);
36
+ }
37
+
38
+ @media (min-width: 768px) {
39
+ .pr-NavBarHamburger {
40
+ display: none;
41
+ }
42
+ }
43
+
44
+ .container {
45
+ position: relative;
46
+ width: 16px;
47
+ height: 14px;
48
+ overflow: hidden;
49
+ }
50
+
51
+ .pr-NavBarHamburger:hover .top { top: 0; left: 0; transform: translateX(4px); }
52
+ .pr-NavBarHamburger:hover .middle { top: 6px; left: 0; transform: translateX(0); }
53
+ .pr-NavBarHamburger:hover .bottom { top: 12px; left: 0; transform: translateX(8px); }
54
+
55
+ .pr-NavBarHamburger.active .top { top: 6px; transform: translateX(0) rotate(225deg); }
56
+ .pr-NavBarHamburger.active .middle { top: 6px; transform: translateX(16px); }
57
+ .pr-NavBarHamburger.active .bottom { top: 6px; transform: translateX(0) rotate(135deg); }
58
+
59
+ .pr-NavBarHamburger.active:hover .top,
60
+ .pr-NavBarHamburger.active:hover .middle,
61
+ .pr-NavBarHamburger.active:hover .bottom {
62
+ background-color: var(--pr-c-text-2);
63
+ transition: top .25s, background-color .25s, transform .25s;
64
+ }
65
+
66
+ .top,
67
+ .middle,
68
+ .bottom {
69
+ position: absolute;
70
+ width: 16px;
71
+ height: 2px;
72
+ background-color: var(--pr-c-text-1);
73
+ transition: top .25s, background-color .5s, transform .25s;
74
+ }
75
+
76
+ .top { top: 0; left: 0; transform: translateX(0); }
77
+ .middle { top: 6px; left: 0; transform: translateX(8px); }
78
+ .bottom { top: 12px; left: 0; transform: translateX(4px); }
79
+ </style>
@@ -0,0 +1,14 @@
1
+ <script lang="ts" setup>
2
+ import { useThemeConfig } from '../composables'
3
+
4
+ const themeConfig = useThemeConfig()
5
+ </script>
6
+
7
+ <template>
8
+ <div class="flex lt-md:hidden">
9
+ <template v-for="item in themeConfig.nav" :key="item.text">
10
+ <PressNavItemLink v-if="'link' in item" class="px-2" :item="item" />
11
+ <PressNavItemGroup v-else class="px-2" :item="item" />
12
+ </template>
13
+ </div>
14
+ </template>
@@ -0,0 +1,40 @@
1
+ <script lang="ts" setup>
2
+ import { useSiteConfig } from 'valaxy'
3
+ import { computed, defineAsyncComponent } from 'vue'
4
+
5
+ // ref vitepress search box
6
+ const siteConfig = useSiteConfig()
7
+ const isAlgolia = computed(() => siteConfig.value.search.type === 'algolia')
8
+
9
+ const PressAlgoliaSearch = isAlgolia.value
10
+ ? defineAsyncComponent(() => import('./PressAlgoliaSearch.vue'))
11
+ : null
12
+ </script>
13
+
14
+ <template>
15
+ <div v-if="siteConfig.search.enable" class="VPNavBarSearch">
16
+ <ClientOnly>
17
+ <PressAlgoliaSearch v-if="isAlgolia" />
18
+ </ClientOnly>
19
+ </div>
20
+ </template>
21
+
22
+ <style>
23
+ .VPNavBarSearch {
24
+ display: flex;
25
+ align-items: center;
26
+ }
27
+
28
+ @media (min-width: 768px) {
29
+ .VPNavBarSearch {
30
+ flex-grow: 1;
31
+ padding-left: 24px;
32
+ }
33
+ }
34
+
35
+ @media (min-width: 960px) {
36
+ .VPNavBarSearch {
37
+ padding-left: 32px;
38
+ }
39
+ }
40
+ </style>
@@ -0,0 +1,26 @@
1
+ <script lang="ts" setup>
2
+ import { useThemeConfig } from '../composables'
3
+
4
+ const themeConfig = useThemeConfig()
5
+ </script>
6
+
7
+ <template>
8
+ <PressSocialLinks
9
+ v-if="themeConfig.socialLinks"
10
+ class="pr-nav-bar-social-links"
11
+ :links="themeConfig.socialLinks"
12
+ />
13
+ </template>
14
+
15
+ <style scoped>
16
+ .pr-nav-bar-social-links {
17
+ display: none;
18
+ }
19
+
20
+ @media (min-width: 1280px) {
21
+ .pr-nav-bar-social-links {
22
+ display: flex;
23
+ align-items: center;
24
+ }
25
+ }
26
+ </style>
@@ -0,0 +1,5 @@
1
+ <template>
2
+ <div class="flex items-center lt-lg:hidden">
3
+ <PressToggleLocale />
4
+ </div>
5
+ </template>
@@ -0,0 +1,101 @@
1
+ <script lang="ts" setup>
2
+ import { ref } from 'vue'
3
+ import type { NavItemGroup } from '../types'
4
+
5
+ defineProps<{
6
+ item: NavItemGroup
7
+ }>()
8
+
9
+ const open = ref(false)
10
+ </script>
11
+
12
+ <template>
13
+ <div
14
+ class="flex self-stretch relative group"
15
+ :aria-expanded="open"
16
+ aria-haspopup="true"
17
+ @mouseenter="open = true"
18
+ @mouseleave="open = false"
19
+ >
20
+ <button
21
+ type="button"
22
+ class="button flex items-center"
23
+ @click="open = !open"
24
+ >
25
+ <span class="text">
26
+ {{ item.text }}
27
+ </span>
28
+ <div i-ri-arrow-drop-down-line />
29
+ </button>
30
+
31
+ <div class="menu grow" flex="~ col" items="start">
32
+ <AppLink v-for="itemLink in item.items" :key="itemLink.text" class="menu-item" p="x-3" :to="itemLink.link">
33
+ {{ itemLink.text }}
34
+ </AppLink>
35
+ </div>
36
+ </div>
37
+ </template>
38
+
39
+ <style lang="scss" scoped>
40
+ .group .button{
41
+ color: var(--pr-nav-text);
42
+ font-weight: 500;
43
+ font-size: 14px;
44
+ }
45
+
46
+ .group[aria-expanded="true"] .button{
47
+ color: rgba(60, 60, 60, 0.70);
48
+ transition: color 0.25s;
49
+
50
+ .dark &{
51
+ color: rgba(235, 235, 235, 0.6)
52
+ }
53
+ }
54
+
55
+ .menu {
56
+ position: absolute;
57
+ left: 50%;
58
+
59
+ min-width: 128px;
60
+ opacity: 0;
61
+ visibility: hidden;
62
+ transition: opacity 0.25s, visibility 0.25s, transform 0.25s;
63
+ transform: translateX(-50%) translateY(calc(var(--pr-nav-height) / 2));
64
+
65
+ border-radius: 12px;
66
+ padding: 12px;
67
+ border: 1px solid rgba(60, 60, 60, 0.12);
68
+ background-color: #ffffff;
69
+ box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.08);
70
+ .dark &{
71
+ background-color: #242424;
72
+ }
73
+
74
+ &-item{
75
+ display: flex;
76
+ width: 100%;
77
+ border-radius: 6px;
78
+ color: var(--pr-nav-text);
79
+ line-height: 32px;
80
+ font-size: 14px;
81
+ font-weight: 500;
82
+ white-space: nowrap;
83
+ transition: background-color .25s,color .25s;
84
+
85
+ &:hover{
86
+ background-color: #f1f1f1;
87
+ color: var(--va-c-brand);
88
+
89
+ .dark &{
90
+ background-color: #2f2f2f;
91
+ }
92
+ }
93
+
94
+ }
95
+ }
96
+
97
+ .group[aria-expanded="true"] > .menu {
98
+ opacity: 1;
99
+ visibility: visible;
100
+ }
101
+ </style>