feat(docs): replace logo with SVG and update navigation styling
- Replace PNG logo with high-definition SVG version for better quality and scalability - Update navigation to use logo image instead of text title for improved branding - Add custom styling for logo display in navigation bar - Exclude navigation logo from automatic image styling rules - Update sitemap timestamps to reflect recent changes
This commit is contained in:
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 9.5 KiB |
@@ -306,7 +306,8 @@ const commonHead = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
const commonThemeConfig = {
|
const commonThemeConfig = {
|
||||||
logo: `${base}logo.png`.replace('//', '/'),
|
logo: '/assets/easy-vibe-logo-hd.svg',
|
||||||
|
siteTitle: false,
|
||||||
search: {
|
search: {
|
||||||
provider: 'local'
|
provider: 'local'
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import DefaultTheme from 'vitepress/theme'
|
import DefaultTheme from 'vitepress/theme'
|
||||||
import { useData, useRoute } from 'vitepress'
|
import { useData, useRoute, withBase } from 'vitepress'
|
||||||
import TextType from './components/TextType.vue'
|
import TextType from './components/TextType.vue'
|
||||||
import GitHubStars from './components/GitHubStars.vue'
|
import GitHubStars from './components/GitHubStars.vue'
|
||||||
import { onMounted, ref, watch, computed } from 'vue'
|
import { onMounted, ref, watch, computed } from 'vue'
|
||||||
@@ -11,6 +11,13 @@ import easyVibePaths from './data/easyVibePaths.json'
|
|||||||
const { frontmatter } = useData()
|
const { frontmatter } = useData()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|
||||||
|
const openWelcomeFromWordmark = () => {
|
||||||
|
const currentPath = window.location.pathname
|
||||||
|
window.location.href = withBase(
|
||||||
|
`/welcome/?next=${encodeURIComponent(currentPath)}`
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
const homeTaglineTyping = {
|
const homeTaglineTyping = {
|
||||||
typingSpeed: 45,
|
typingSpeed: 45,
|
||||||
initialDelay: 0,
|
initialDelay: 0,
|
||||||
@@ -418,9 +425,12 @@ watch(sidebarCollapsed, (collapsed) => {
|
|||||||
</ClientOnly>
|
</ClientOnly>
|
||||||
</template>
|
</template>
|
||||||
<template #home-hero-info-before>
|
<template #home-hero-info-before>
|
||||||
<div
|
<button
|
||||||
v-if="frontmatter.layout === 'home'"
|
v-if="frontmatter.layout === 'home'"
|
||||||
class="vp-home-wordmark"
|
class="vp-home-wordmark"
|
||||||
|
type="button"
|
||||||
|
aria-label="打开欢迎页"
|
||||||
|
@click="openWelcomeFromWordmark"
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
viewBox="0 0 460 220"
|
viewBox="0 0 460 220"
|
||||||
@@ -447,7 +457,7 @@ watch(sidebarCollapsed, (collapsed) => {
|
|||||||
class="vp-home-wordmark-path"
|
class="vp-home-wordmark-path"
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
<template #home-hero-info-after>
|
<template #home-hero-info-after>
|
||||||
<div
|
<div
|
||||||
@@ -493,6 +503,16 @@ watch(sidebarCollapsed, (collapsed) => {
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
.VPNavBarTitle .VPImage.logo,
|
||||||
|
.VPNavBarTitle .logo {
|
||||||
|
width: 84px !important;
|
||||||
|
height: 40px !important;
|
||||||
|
max-width: 84px !important;
|
||||||
|
max-height: 40px !important;
|
||||||
|
object-fit: contain;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
/* 隐藏默认的 tagline,因为我们用打字机效果替代了它 */
|
/* 隐藏默认的 tagline,因为我们用打字机效果替代了它 */
|
||||||
.VPHomeHero .tagline {
|
.VPHomeHero .tagline {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
@@ -542,6 +562,11 @@ watch(sidebarCollapsed, (collapsed) => {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-top: -12px;
|
margin-top: -12px;
|
||||||
margin-bottom: 18px;
|
margin-bottom: 18px;
|
||||||
|
width: 100%;
|
||||||
|
padding: 0;
|
||||||
|
border: none;
|
||||||
|
background: transparent;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.vp-home-wordmark-svg {
|
.vp-home-wordmark-svg {
|
||||||
width: min(380px, 52vw);
|
width: min(380px, 52vw);
|
||||||
|
|||||||
@@ -1650,11 +1650,6 @@ const topPromoStyle = computed(() => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const replayIntro = () => {
|
|
||||||
const currentPath = window.location.pathname
|
|
||||||
router.go(withBase(`/welcome/?next=${encodeURIComponent(currentPath)}`))
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const introDuration = 1800
|
const introDuration = 1800
|
||||||
const colorDelay = 500
|
const colorDelay = 500
|
||||||
@@ -1920,13 +1915,19 @@ const appendixCards = [
|
|||||||
<nav class="sticky-nav glass">
|
<nav class="sticky-nav glass">
|
||||||
<div class="nav-content">
|
<div class="nav-content">
|
||||||
<div class="nav-cluster">
|
<div class="nav-cluster">
|
||||||
<button
|
<div
|
||||||
class="nav-title"
|
class="nav-title"
|
||||||
type="button"
|
:aria-label="t.nav.title"
|
||||||
@click="replayIntro"
|
|
||||||
>
|
>
|
||||||
{{ t.nav.title }}
|
<img
|
||||||
</button>
|
class="nav-title-logo"
|
||||||
|
:src="withBase('/assets/easy-vibe-logo-hd.svg')"
|
||||||
|
:alt="t.nav.title"
|
||||||
|
width="64"
|
||||||
|
height="30"
|
||||||
|
draggable="false"
|
||||||
|
>
|
||||||
|
</div>
|
||||||
<div class="nav-links">
|
<div class="nav-links">
|
||||||
<button
|
<button
|
||||||
:class="{ active: activeTab === 'home' }"
|
:class="{ active: activeTab === 'home' }"
|
||||||
@@ -2346,16 +2347,27 @@ a {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.nav-title {
|
.nav-title {
|
||||||
font-weight: 500;
|
|
||||||
font-size: 12px;
|
|
||||||
color: var(--vp-c-text-1) !important;
|
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
letter-spacing: -0.008em;
|
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
cursor: pointer;
|
cursor: default;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-title-logo {
|
||||||
|
display: block;
|
||||||
|
max-width: 64px !important;
|
||||||
|
max-height: 30px !important;
|
||||||
|
height: 30px !important;
|
||||||
|
width: 64px !important;
|
||||||
|
min-width: 64px;
|
||||||
|
min-height: 30px;
|
||||||
|
object-fit: contain;
|
||||||
|
flex: 0 0 auto;
|
||||||
|
filter: grayscale(1) brightness(0.28) contrast(1.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-links {
|
.nav-links {
|
||||||
|
|||||||
@@ -1787,6 +1787,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const applyImageStyle = (img) => {
|
const applyImageStyle = (img) => {
|
||||||
|
if (img.classList.contains('nav-title-logo')) return
|
||||||
const { naturalWidth, naturalHeight } = img
|
const { naturalWidth, naturalHeight } = img
|
||||||
if (!naturalWidth || !naturalHeight) return
|
if (!naturalWidth || !naturalHeight) return
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 9.5 KiB |
@@ -3,7 +3,7 @@
|
|||||||
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||||
<url>
|
<url>
|
||||||
<loc>https://datawhalechina.github.io/easy-vibe/zh-cn/</loc>
|
<loc>https://datawhalechina.github.io/easy-vibe/zh-cn/</loc>
|
||||||
<lastmod>2026-03-16T00:53:29+08:00</lastmod>
|
<lastmod>2026-03-18T12:12:42+08:00</lastmod>
|
||||||
<changefreq>weekly</changefreq>
|
<changefreq>weekly</changefreq>
|
||||||
<priority>1.0</priority>
|
<priority>1.0</priority>
|
||||||
<xhtml:link rel="alternate" hreflang="zh-CN" href="https://datawhalechina.github.io/easy-vibe/zh-cn/"/>
|
<xhtml:link rel="alternate" hreflang="zh-CN" href="https://datawhalechina.github.io/easy-vibe/zh-cn/"/>
|
||||||
@@ -921,7 +921,7 @@
|
|||||||
</url>
|
</url>
|
||||||
<url>
|
<url>
|
||||||
<loc>https://datawhalechina.github.io/easy-vibe/zh-cn/stage-2/backend/2.2-database-supabase/</loc>
|
<loc>https://datawhalechina.github.io/easy-vibe/zh-cn/stage-2/backend/2.2-database-supabase/</loc>
|
||||||
<lastmod>2026-02-27T18:45:52+08:00</lastmod>
|
<lastmod>2026-03-18T09:34:06+08:00</lastmod>
|
||||||
<changefreq>weekly</changefreq>
|
<changefreq>weekly</changefreq>
|
||||||
<priority>0.8</priority>
|
<priority>0.8</priority>
|
||||||
<xhtml:link rel="alternate" hreflang="zh-CN" href="https://datawhalechina.github.io/easy-vibe/zh-cn/stage-2/backend/2.2-database-supabase/"/>
|
<xhtml:link rel="alternate" hreflang="zh-CN" href="https://datawhalechina.github.io/easy-vibe/zh-cn/stage-2/backend/2.2-database-supabase/"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user