docs: fix details padding bottom by prosem & add fixed height for logo

This commit is contained in:
YunYouJun 2024-12-05 23:06:23 +08:00
parent 79480a25f3
commit a775198779
13 changed files with 328 additions and 293 deletions

View File

@ -16,6 +16,10 @@ export default defineConfig({
title: 'Valaxy API Docs',
description: 'API Docs For Valaxy',
themeConfig: {
search: {
provider: 'local',
},
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: 'TypeDoc', link: '/typedoc' },

View File

@ -10,7 +10,7 @@
"typedoc": "typedoc --options ./typedoc.json"
},
"devDependencies": {
"typedoc": "^0.27.2",
"typedoc": "^0.27.3",
"typedoc-plugin-markdown": "^4.3.1",
"typedoc-vitepress-theme": "^1.1.1",
"vitepress": "^1.5.0"

View File

@ -26,6 +26,7 @@ declare module 'vue-router/auto-routes' {
'/addons/use': RouteRecordInfo<'/addons/use', '/addons/use', Record<never, never>, Record<never, never>>,
'/addons/why': RouteRecordInfo<'/addons/why', '/addons/why', Record<never, never>, Record<never, never>>,
'/addons/write': RouteRecordInfo<'/addons/write', '/addons/write', Record<never, never>, Record<never, never>>,
'/api/': RouteRecordInfo<'/api/', '/api', Record<never, never>, Record<never, never>>,
'/dev/': RouteRecordInfo<'/dev/', '/dev', Record<never, never>, Record<never, never>>,
'/dev/docs': RouteRecordInfo<'/dev/docs', '/dev/docs', Record<never, never>, Record<never, never>>,
'/dev/faq': RouteRecordInfo<'/dev/faq', '/dev/faq', Record<never, never>, Record<never, never>>,

View File

@ -0,0 +1,16 @@
<script setup lang="ts">
import { isClient } from '@vueuse/core'
import { onMounted } from 'vue'
onMounted(() => {
if (isClient) {
window.location.href = 'https://api.valaxy.site/typedoc/'
}
})
</script>
<template>
<div>
Redirecting...
</div>
</template>

View File

@ -3,7 +3,6 @@ title: Deployment
title_zh: 部署
categories:
- getting-started
end: false
top: 99
---

View File

@ -11,3 +11,6 @@
.fly-animation {
animation: fly 0.8s ease-in-out infinite alternate;
}
// override

View File

@ -29,7 +29,7 @@
},
"dependencies": {
"@rollup/pluginutils": "^5.1.3",
"axios": "^1.7.8",
"axios": "^1.7.9",
"body-parser": "^2.0.2",
"http-proxy-middleware": "^3.0.3",
"js-yaml": "^4.1.0",
@ -45,7 +45,7 @@
"splitpanes": "^3.1.5",
"typescript": "catalog:",
"unbuild": "^2.0.0",
"unplugin-vue-router": "^0.10.8",
"unplugin-vue-router": "^0.10.9",
"vite": "catalog:"
}
}

View File

@ -62,7 +62,7 @@ onContentUpdated(() => {
<slot name="main-content">
<Transition appear>
<ValaxyMd class="prose mx-auto w-full max-w-4xl" :frontmatter="frontmatter">
<ValaxyMd class="mx-auto w-full max-w-4xl" :frontmatter="frontmatter">
<h1 v-if="hasSidebar && !isHome && frontmatter.title" :id="frontmatter.title" tabindex="-1">
{{ localeTitle }}
<a class="header-anchor" :href="`#${frontmatter.title}`" aria-hidden="true" />

View File

@ -6,10 +6,10 @@ import 'vitepress/dist/client/theme-default/styles/icons.css'
// import 'vitepress/dist/client/theme-default/styles/base.css'
// import 'vitepress/dist/client/theme-default/styles/utils.css'
import 'vitepress/dist/client/theme-default/styles/components/custom-block.css'
import 'vitepress/dist/client/theme-default/styles/components/vp-code.css'
import 'vitepress/dist/client/theme-default/styles/components/vp-code-group.css'
import 'vitepress/dist/client/theme-default/styles/components/vp-doc.css'
import 'vitepress/dist/client/theme-default/styles/components/custom-block.css'
// import 'vitepress/dist/client/theme-default/styles/components/vp-sponsor.css'

View File

@ -5,7 +5,11 @@ import valaxyLogoPng from '../assets/images/valaxy-logo.png'
<template>
<div class="valaxy-logo-container" relative inline-flex justify="center" items="center">
<div class="absolute bg-img" />
<img class="fly-animation" w="50" aspect="420/386" m="auto" :src="valaxyLogoPng" alt="Valaxy Logo" z="1">
<img
class="fly-animation h-50"
aspect="420/386" m="auto"
:src="valaxyLogoPng" alt="Valaxy Logo" z="1"
>
</div>
</template>

View File

@ -25,15 +25,15 @@
// custom block
.custom-block {
margin: 16px 0;
p {
margin: 8px 0;
line-height: 24px;
}
}
p:first-child {
margin: 0;
.custom-block div[lang] {
p {
margin: 8px 0;
}
}

View File

@ -118,16 +118,16 @@
"ora": "^8.1.1",
"pascalcase": "^2.0.0",
"pathe": "^1.1.2",
"pinia": "^2.2.8",
"pinia": "^2.3.0",
"qrcode": "^1.5.4",
"resolve-global": "^2.0.0",
"sass": "^1.81.1",
"sass": "^1.82.0",
"shiki": "^1.24.0",
"star-markdown-css": "^0.5.3",
"unocss": "^0.65.0",
"unocss": "^0.65.1",
"unplugin-vue-components": "^0.27.5",
"unplugin-vue-markdown": "^0.27.1",
"unplugin-vue-router": "^0.10.8",
"unplugin-vue-router": "^0.10.9",
"vanilla-lazyload": "^19.1.3",
"vite": "catalog:",
"vite-plugin-vue-devtools": "^7.6.7",
@ -163,6 +163,6 @@
"gh-pages": "^6.2.0",
"https-localhost": "^4.7.1",
"rollup-plugin-visualizer": "^5.12.0",
"table": "^6.8.2"
"table": "^6.9.0"
}
}

File diff suppressed because it is too large Load Diff