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
@@ -1,24 +0,0 @@
1
- <script lang="ts" setup>
2
- import { useI18n } from 'vue-i18n'
3
-
4
- const { t } = useI18n()
5
- </script>
6
-
7
- <template>
8
- <YunBoard m="t-4">
9
- 这里是 Valaxy 的文档兼测试站点
10
-
11
- <ul>
12
- <li>
13
- <a href="/docs" :title="t('docs.view_docs')">
14
- {{ t('docs.view_docs') }}
15
- </a>
16
- </li>
17
- <li>
18
- <router-link class="flex justify-center" to="/examples">
19
- Examples
20
- </router-link>
21
- </li>
22
- </ul>
23
- </YunBoard>
24
- </template>
@@ -1,123 +0,0 @@
1
- <script lang="ts" setup>
2
- import { useConfig, useSidebar } from 'valaxy'
3
- import { useThemeConfig } from '../../composables'
4
- import PressSwitchAppearance from './PressSwitchAppearance.vue'
5
-
6
- defineProps<{
7
- isScreenOpen?: boolean
8
- }>()
9
-
10
- defineEmits<{
11
- (e: 'toggle-screen'): void
12
- }>()
13
-
14
- const { hasSidebar } = useSidebar()
15
-
16
- const config = useConfig()
17
- const themeConfig = useThemeConfig()
18
- </script>
19
-
20
- <template>
21
- <div class="press-navbar flex justify-between items-center px-6 py-4" :class="{ 'has-sidebar': hasSidebar }">
22
- <a class="text-xl" href="/" :aria-label="config.title">
23
- <span class="md:inline">{{ config.title }}</span>
24
- </a>
25
- <div class="flex justify-center items-centertext-sm leading-5">
26
- <template v-for="(item, i) in themeConfig.nav" :key="i">
27
- <a
28
- class="hover:text-gray-700"
29
- :href="item.link"
30
- target="_blank"
31
- rel="noopener"
32
- >{{ item.text }}</a>
33
-
34
- <span v-if="i !== themeConfig.nav.length - 1" class="mr-2 ml-2">·</span>
35
- </template>
36
-
37
- <PressToggleLocale m="x-2" />
38
- <PressSwitchAppearance m="l-2" />
39
- </div>
40
- </div>
41
- </template>
42
-
43
- <style lang="scss" scoped>
44
- @use 'valaxy/client/styles/mixins' as *;
45
-
46
- .press-navbar {
47
- position: relative;
48
- border-bottom: 1px solid var(--pr-c-divider-light);
49
- padding: 0 8px 0 24px;
50
- height: var(--pr-nav-height);
51
- transition: border-color 0.5s, background-color 0.5s;
52
- }
53
-
54
- @include media('md') {
55
- .press-navbar {
56
- padding: 0 32px;
57
- }
58
- }
59
-
60
- @include media('md') {
61
- .press-navbar.has-sidebar .content {
62
- margin-right: -32px;
63
- padding-right: 32px;
64
- -webkit-backdrop-filter: saturate(50%) blur(8px);
65
- backdrop-filter: saturate(50%) blur(8px);
66
- background: rgba(255, 255, 255, 0.7);
67
- }
68
-
69
- .dark .press-navbar.has-sidebar .content {
70
- background: rgba(36, 36, 36, 0.7);
71
- }
72
-
73
- @supports not (backdrop-filter: saturate(50%) blur(8px)) {
74
- .press-navbar.has-sidebar .content {
75
- background: rgba(255, 255, 255, 0.95);
76
- }
77
-
78
- .dark .press-navbar.has-sidebar .content {
79
- background: rgba(36, 36, 36, 0.95);
80
- }
81
- }
82
- }
83
-
84
- .container {
85
- display: flex;
86
- justify-content: space-between;
87
- margin: 0 auto;
88
- max-width: calc(var(--pr-layout-max-width) - 64px);
89
- }
90
-
91
- .content {
92
- display: flex;
93
- justify-content: flex-end;
94
- align-items: center;
95
- flex-grow: 1;
96
- }
97
-
98
- .menu + .translations::before,
99
- .menu + .appearance::before,
100
- .menu + .social-links::before,
101
- .translations + .appearance::before,
102
- .appearance + .social-links::before {
103
- margin-right: 8px;
104
- margin-left: 8px;
105
- width: 1px;
106
- height: 24px;
107
- background-color: var(--pr-c-divider-light);
108
- content: "";
109
- }
110
-
111
- .menu + .appearance::before,
112
- .translations + .appearance::before {
113
- margin-right: 16px;
114
- }
115
-
116
- .appearance + .social-links::before {
117
- margin-left: 16px;
118
- }
119
-
120
- .social-links {
121
- margin-right: -8px;
122
- }
123
- </style>