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.
- package/client/index.ts +1 -0
- package/components/PressAlgoliaSearch.vue +208 -0
- package/components/PressArticle.vue +27 -16
- package/components/PressArticleCard.vue +6 -2
- package/components/PressAside.vue +38 -27
- package/components/PressBackdrop.vue +1 -1
- package/components/PressButton.vue +5 -12
- package/components/PressCategories.vue +24 -3
- package/components/PressCategory.vue +24 -15
- package/components/PressDocFooter.vue +15 -0
- package/components/PressDocFooterLastUpdated.vue +44 -0
- package/components/PressFeature.vue +1 -1
- package/components/PressFeatures.vue +1 -1
- package/components/PressFooter.vue +53 -0
- package/components/PressHome.vue +1 -7
- package/components/PressHomeFeatures.vue +1 -0
- package/components/PressHomeHero.vue +7 -8
- package/components/PressLocalNav.vue +9 -9
- package/components/PressNav.vue +30 -5
- package/components/PressNavBar.vue +94 -0
- package/components/PressNavBarAppearance.vue +5 -0
- package/components/PressNavBarHamburger.vue +79 -0
- package/components/PressNavBarMenu.vue +14 -0
- package/components/PressNavBarSearch.vue +40 -0
- package/components/PressNavBarSocialLinks.vue +26 -0
- package/components/PressNavBarTranslations.vue +5 -0
- package/components/PressNavItemGroup.vue +101 -0
- package/components/PressNavItemLink.vue +40 -0
- package/components/PressNavScreen.vue +95 -0
- package/components/PressNavScreenAppearance.vue +32 -0
- package/components/PressNavScreenMenu.vue +22 -0
- package/components/PressNavScreenMenuGroup.vue +115 -0
- package/components/PressNavScreenMenuGroupLink.vue +32 -0
- package/components/PressNavScreenMenuGroupSection.vue +37 -0
- package/components/PressNavScreenMenuLink.vue +33 -0
- package/components/PressNavScreenSocialLinks.vue +13 -0
- package/components/PressNavScreenTranslations.vue +7 -0
- package/components/{PressToc.vue → PressOutline.vue} +14 -39
- package/components/PressOutlineItem.vue +48 -0
- package/components/PressPostList.vue +3 -3
- package/components/PressSidebar.vue +31 -10
- package/components/PressSocialLink.vue +40 -0
- package/components/PressSocialLinks.vue +26 -0
- package/components/ValaxyMain.vue +60 -42
- package/composables/edit-link.ts +14 -0
- package/composables/index.ts +1 -0
- package/composables/nav.ts +37 -0
- package/config/index.ts +13 -2
- package/layouts/layout.vue +5 -3
- package/package.json +15 -5
- package/pages/[..all].vue +1 -0
- package/setup/main.ts +5 -4
- package/styles/css-vars.scss +16 -8
- package/styles/helper.scss +0 -10
- package/styles/markdown.scss +18 -8
- package/types/index.d.ts +76 -22
- package/utils/index.ts +9 -0
- package/valaxy.config.ts +7 -0
- package/LICENSE +0 -21
- package/components/DocsBoard.vue +0 -24
- package/components/nav/PressNavBar.vue +0 -123
- /package/components/{nav/PressSwitchAppearance.vue → PressSwitchAppearance.vue} +0 -0
package/components/DocsBoard.vue
DELETED
|
@@ -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>
|
|
File without changes
|