diff --git a/src/.vitepress/config.mts b/src/.vitepress/config.mts index 59a5b4d..c7d773b 100644 --- a/src/.vitepress/config.mts +++ b/src/.vitepress/config.mts @@ -42,7 +42,7 @@ console.log({ base: typeof new_version !== 'undefined' ? '/' : '/docs/' }) // https://vitepress.dev/reference/site-config export default defineConfig({ - title: "Beeline Cloud", + title: "cloud", description: "Документация Beeline Cloud", head: [['link', { rel: 'icon', type: 'image/png', sizes: '32x32', href: '/bee-favicon.png' }]], base: typeof new_version !== 'undefined' ? '/' : '/docs/', @@ -63,7 +63,11 @@ export default defineConfig({ } }, themeConfig: { - logo: '/favicon.svg', + logo: { + light: '/logo-light-theme.svg', + dark: '/logo-dark-theme.svg', + alt: 'cloud', + }, search: { provider: 'local', options: { @@ -90,30 +94,27 @@ export default defineConfig({ } }, // https://vitepress.dev/reference/default-theme-config - // nav: [ - // ], - - // socialLinks: [ - // { icon: { svg: gitlab }, link: 'https://git.vimpelcom.ru/common/vega/docs' } - // ], - - // editLink: { - // pattern: 'https://git.vimpelcom.ru/-/ide/project/common/vega/docs/edit/develop/-/src/:path', - // text: 'Отредактируйте эту страницу на GitLab' - // }, + nav: [ + { + text: 'Документация', + link: '/guide/', + }, + { + text: 'API', + link: '', + }, + { + text: 'Terraform', + // link: '/terraform/', + link: '', + }, + ], docFooter: { next: 'Вперед', prev: 'Назад' }, - // lastUpdated: { - // text: 'Обновлена', - // formatOptions: { - // dateStyle: 'long', - // } - // }, - outline: { label: 'Содержание' }, diff --git a/src/.vitepress/theme/components/CustomButton.vue b/src/.vitepress/theme/components/CustomButton.vue index 273b76a..0d51486 100644 --- a/src/.vitepress/theme/components/CustomButton.vue +++ b/src/.vitepress/theme/components/CustomButton.vue @@ -5,7 +5,7 @@ import { EXTERNAL_URL_RE } from 'vitepress/dist/client/shared' interface Props { tag?: string - size?: 'medium' | 'big' + size?: 'medium' | 'big' | 'small' theme?: 'brand' | 'alt' | 'sponsor' text: string href?: string @@ -51,6 +51,15 @@ const component = computed(() => { transition: color 0.1s, border-color 0.1s, background-color 0.1s; } +.VPButton.small { + border-radius: 12px; + padding: 0 16px; + line-height: 20px; + height: 40px; + font-size: 15px; + font-weight: 500; +} + .VPButton.medium { border-radius: 12px; padding: 0 20px; diff --git a/src/.vitepress/theme/components/CustomNavBar.vue b/src/.vitepress/theme/components/CustomNavBar.vue index 8fc2c86..7b968e3 100644 --- a/src/.vitepress/theme/components/CustomNavBar.vue +++ b/src/.vitepress/theme/components/CustomNavBar.vue @@ -12,6 +12,7 @@ import VPNavBarSearch from 'vitepress/dist/client/theme-default/components/VPNav import VPNavBarSocialLinks from 'vitepress/dist/client/theme-default/components/VPNavBarSocialLinks.vue' import CustomNavBarTitle from './CustomNavBarTitle.vue' import VPNavBarTranslations from 'vitepress/dist/client/theme-default/components/VPNavBarTranslations.vue' +import CustomButton from './CustomButton.vue' defineProps<{ isScreenOpen: boolean @@ -27,6 +28,7 @@ const { hasLocalNav } = useLocalNav() const { frontmatter } = useData() const classes = ref>({}) +const loginUrl = import.meta.env.VITE_LOGIN_URL watchPostEffect(() => { classes.value = { @@ -51,14 +53,9 @@ watchPostEffect(() => {
- - - -
@@ -105,7 +102,7 @@ watchPostEffect(() => { @media (min-width: 768px) { .wrapper { - padding: 0 32px; + padding: 0 24px; } } @@ -187,7 +184,7 @@ watchPostEffect(() => { .content-body { display: flex; - justify-content: flex-end; + justify-content: space-between; align-items: center; height: var(--vp-nav-height); transition: background-color 0.5s; @@ -221,6 +218,10 @@ watchPostEffect(() => { height: 24px; background-color: var(--vp-c-divider); content: ""; + font-weight: 500; + font-size: 15px; + line-height: 20px; + letter-spacing: 0.2px; } .menu + .appearance::before, @@ -251,4 +252,9 @@ watchPostEffect(() => { background-color: rgba(255, 255, 255, 0.2); } } + +.search { + justify-content: flex-end; + margin-right: 24px; +} diff --git a/src/.vitepress/theme/components/CustomNavBarMenuLink.vue b/src/.vitepress/theme/components/CustomNavBarMenuLink.vue index 6148e28..7238b04 100644 --- a/src/.vitepress/theme/components/CustomNavBarMenuLink.vue +++ b/src/.vitepress/theme/components/CustomNavBarMenuLink.vue @@ -3,12 +3,16 @@ import type { DefaultTheme } from 'vitepress/theme' import { useData } from 'vitepress/dist/client/theme-default/composables/data' import { isActive } from 'vitepress/dist/client/shared' import VPLink from 'vitepress/dist/client/theme-default/components/VPLink.vue' +import { computed, ref } from 'vue' defineProps<{ item: DefaultTheme.NavItemWithLink }>() const { page } = useData() +const textRef = ref(null) + +const wrapperWidth = computed(() => textRef.value?.offsetWidth) - diff --git a/src/.vitepress/theme/components/CustomNavBarSearchButton.vue b/src/.vitepress/theme/components/CustomNavBarSearchButton.vue index 8b800f3..0b985b4 100644 --- a/src/.vitepress/theme/components/CustomNavBarSearchButton.vue +++ b/src/.vitepress/theme/components/CustomNavBarSearchButton.vue @@ -14,31 +14,22 @@ const $t = createSearchTranslate(defaultTranslations) diff --git a/src/.vitepress/theme/components/CustomNavBarTitle.vue b/src/.vitepress/theme/components/CustomNavBarTitle.vue index 47aa341..771b87e 100644 --- a/src/.vitepress/theme/components/CustomNavBarTitle.vue +++ b/src/.vitepress/theme/components/CustomNavBarTitle.vue @@ -38,10 +38,10 @@ const target = computed(() => :target="target" > -