diff --git a/.vitepress/theme/Layout.vue b/.vitepress/theme/Layout.vue index f2765fe..4c8fd07 100644 --- a/.vitepress/theme/Layout.vue +++ b/.vitepress/theme/Layout.vue @@ -101,8 +101,15 @@ const handleRouteChangeComplete = async (to: string) => { router.onBeforeRouteChange = handleRouteChangeStart; router.onAfterRouteChange = handleRouteChangeComplete; -function makeHomeAnimation() { - if (router.route.path !== '/openmcp/') { +const allowHomeAnimationRoutes = [ + '/openmcp/', + '/openmcp/zh/', + '/openmcp/en/', + '/openmcp/ja/', +]; + +function makeHomeAnimation() { + if (!allowHomeAnimationRoutes.includes(router.route.path)) { return; } diff --git a/.vitepress/theme/components/KTab/index.vue b/.vitepress/theme/components/KTab/index.vue index 7a825a1..7d4b88d 100644 --- a/.vitepress/theme/components/KTab/index.vue +++ b/.vitepress/theme/components/KTab/index.vue @@ -135,6 +135,12 @@ onMounted(() => { gap: 8px; } +@media screen and (max-width: 741px) { + .k-tabs-tags { + flex-direction: column; + } +} + .k-tabs-tag-item { background-color: var(--vp-button-alt-bg); border-radius: .5em; @@ -165,6 +171,25 @@ html[lang="ja"] .k-tabs-content { min-height: 600px; } + +@media screen and (max-width: 741px) { + html[lang="zh"] .k-tabs-content { + position: relative; + min-height: 600px; + } + + html[lang="en"] .k-tabs-content { + position: relative; + min-height: 900px; + } + + html[lang="ja"] .k-tabs-content { + position: relative; + min-height: 760px; + } +} + + .k-tabs-content>* { position: absolute; top: 0; diff --git a/.vitepress/theme/components/bilibli-player/index.vue b/.vitepress/theme/components/bilibli-player/index.vue index c839417..3724207 100644 --- a/.vitepress/theme/components/bilibli-player/index.vue +++ b/.vitepress/theme/components/bilibli-player/index.vue @@ -123,6 +123,13 @@ onMounted(() => { } } +@media screen and (max-width: 741px) { + .bilibili-player-container iframe { + width: 95%; + height: 230px !important; + } +} + .bilibili-player-container:hover { border-color: var(--vp-c-brand-1); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15); diff --git a/.vitepress/theme/css/style.css b/.vitepress/theme/css/style.css index ffcef2b..ae0825d 100644 --- a/.vitepress/theme/css/style.css +++ b/.vitepress/theme/css/style.css @@ -217,6 +217,12 @@ iframe { transition: border-color 0.3s ease; } +@media screen and (max-width: 741px) { + iframe { + height: 210px; + width: 100%; + } +} .VPMenu { background-color: rgba(255, 255, 255, 0.55) !important;