diff --git a/docs/.vitepress/config.mjs b/docs/.vitepress/config.mjs index b098eb9..ea0c1e8 100644 --- a/docs/.vitepress/config.mjs +++ b/docs/.vitepress/config.mjs @@ -20,7 +20,7 @@ const localeMap = { lang: 'zh-CN', hreflang: 'zh-CN' }, - 'en': { + en: { ogLocale: 'en_US', twitterSite: '@datawhale', lang: 'en-US', @@ -1025,7 +1025,7 @@ export default defineConfig({ locales: { // 根路径 — 仅用于 404 页面兜底,实际首页由 docs/index.md 自动重定向 root: { - label: '简体中文', + label: '', lang: 'zh-CN', link: '/zh-cn/', themeConfig: { @@ -1778,7 +1778,7 @@ export default defineConfig({ }, // 英文 - 'en': { + en: { label: 'English', lang: 'en-US', link: '/en/', @@ -1794,7 +1794,8 @@ export default defineConfig({ ...commonThemeConfig, notFound: { title: 'Page Not Found', - quote: 'The page you are looking for does not exist or has been moved.', + quote: + 'The page you are looking for does not exist or has been moved.', linkText: 'Take me home', linkUrl: '/en/' }, @@ -2015,8 +2016,8 @@ export default defineConfig({ ...commonThemeConfig, notFound: { title: 'Page non trouvée', - quote: 'La page que vous recherchez n\'existe pas ou a été déplacée.', - linkText: 'Retour à l\'accueil', + quote: "La page que vous recherchez n'existe pas ou a été déplacée.", + linkText: "Retour à l'accueil", linkUrl: '/fr-fr/' }, outline: { @@ -2138,7 +2139,8 @@ export default defineConfig({ ...commonThemeConfig, notFound: { title: 'Không tìm thấy trang', - quote: 'Trang bạn đang tìm kiếm không tồn tại hoặc đã được di chuyển.', + quote: + 'Trang bạn đang tìm kiếm không tồn tại hoặc đã được di chuyển.', linkText: 'Về trang chủ', linkUrl: '/vi-vn/' }, diff --git a/docs/.vitepress/theme/components/AppendixFlowMap.vue b/docs/.vitepress/theme/components/AppendixFlowMap.vue index a9c4e86..547c81a 100644 --- a/docs/.vitepress/theme/components/AppendixFlowMap.vue +++ b/docs/.vitepress/theme/components/AppendixFlowMap.vue @@ -1,5 +1,5 @@ @@ -219,24 +302,19 @@ const articleCount = categories.reduce((sum, cat) => sum + cat.articles.length, margin: 0; } +.bento-main { + display: grid; + grid-template-columns: 1fr 360px; + gap: 1rem; + align-items: start; +} + .bento-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; } -@media (max-width: 900px) { - .bento-grid { - grid-template-columns: repeat(2, 1fr); - } -} - -@media (max-width: 600px) { - .bento-grid { - grid-template-columns: 1fr; - } -} - .bento-card { position: relative; background: var(--vp-c-bg); @@ -269,7 +347,6 @@ const articleCount = categories.reduce((sum, cat) => sum + cat.articles.length, .bento-card.active { border-color: var(--card-color); - background: var(--vp-c-bg); } .bento-card.active::before { @@ -312,79 +389,210 @@ const articleCount = categories.reduce((sum, cat) => sum + cat.articles.length, color: var(--card-color); } -.card-articles { - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; +/* 右侧面板 */ +.detail-panel { background: var(--vp-c-bg); - border-radius: 15px; - padding: 1rem; - overflow-y: auto; - z-index: 2; + border: 1px solid var(--panel-color); + border-radius: 16px; + overflow: hidden; display: flex; flex-direction: column; - gap: 0.25rem; + max-height: 520px; +} + +.panel-header { + padding: 1rem; + border-bottom: 1px solid var(--vp-c-divider); + background: var(--vp-c-bg-soft); +} + +.panel-title-row { + display: flex; + gap: 0.75rem; + align-items: flex-start; + margin-bottom: 0.75rem; +} + +.panel-icon { + font-size: 1.75rem; + flex-shrink: 0; +} + +.panel-title-group { + flex: 1; + min-width: 0; +} + +.panel-title { + font-size: 1.1rem; + font-weight: 600; + color: var(--vp-c-text-1); + margin: 0 0 0.25rem; +} + +.panel-desc { + font-size: 0.8rem; + color: var(--vp-c-text-2); + margin: 0; + line-height: 1.4; +} + +.panel-intro { + margin-bottom: 0.75rem; +} + +.intro-text { + font-size: 0.8rem; + color: var(--vp-c-text-2); + line-height: 1.5; + margin: 0; +} + +/* 学习目标 */ +.panel-goals { + margin-top: 0.75rem; +} + +.goals-title { + font-size: 0.75rem; + font-weight: 600; + color: var(--panel-color); + margin: 0 0 0.5rem; +} + +.goals-list { + display: flex; + flex-wrap: wrap; + gap: 0.4rem; +} + +.goal-tag { + font-size: 0.75rem; + padding: 0.3rem 0.6rem; + background: var(--vp-c-bg); + border: 1px solid var(--vp-c-divider); + border-radius: 6px; + color: var(--vp-c-text-1); +} + +/* 文章列表区 */ +.panel-articles { + flex: 1; + display: flex; + flex-direction: column; + overflow: hidden; + min-height: 0; +} + +.articles-header { + display: flex; + align-items: center; + gap: 0.5rem; + padding: 0.75rem 1rem; + background: var(--vp-c-bg-soft); + border-bottom: 1px solid var(--vp-c-divider); +} + +.articles-icon { + font-size: 1.1rem; +} + +.articles-title { + font-size: 0.85rem; + font-weight: 600; + color: var(--panel-color); +} + +.articles-list-scroll { + flex: 1; + overflow-y: auto; + padding: 0.75rem; } .article-item { display: flex; - align-items: center; - gap: 0.5rem; - padding: 0.6rem 0.75rem; + align-items: flex-start; + gap: 0.6rem; + padding: 0.6rem; border-radius: 8px; text-decoration: none; - transition: all 0.2s ease; - color: var(--vp-c-text-1); + transition: all 0.15s ease; + margin-bottom: 0.25rem; } -.article-item:hover { +.article-item:hover, +.article-item.hover { background: var(--vp-c-bg-soft); } -.article-dot { +.article-bullet { width: 6px; height: 6px; border-radius: 50%; - background: var(--card-color); + background: var(--panel-color); flex-shrink: 0; + margin-top: 0.4rem; } -.article-title { +.article-info { flex: 1; + min-width: 0; + display: flex; + flex-direction: column; + gap: 0.15rem; +} + +.article-name { font-size: 0.85rem; + color: var(--vp-c-text-1); font-weight: 500; } -.article-arrow { - opacity: 0; - color: var(--card-color); - transition: all 0.2s ease; - font-size: 0.9rem; +.article-desc { + font-size: 0.75rem; + color: var(--vp-c-text-2); + line-height: 1.3; } -.article-item:hover .article-arrow { - opacity: 1; - transform: translateX(3px); +/* 动画 */ +.slide-enter-active { + transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); } -/* Animations */ -.pop-enter-active { - transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); -} - -.pop-leave-active { +.slide-leave-active { transition: all 0.2s ease; } -.pop-enter-from { +.slide-enter-from { opacity: 0; - transform: scale(0.95); + transform: translateX(20px); } -.pop-leave-to { +.slide-leave-to { opacity: 0; - transform: scale(0.95); + transform: translateX(20px); +} + +/* 响应式 */ +@media (max-width: 1100px) { + .bento-main { + grid-template-columns: 1fr; + } + + .detail-panel { + max-height: 400px; + } +} + +@media (max-width: 900px) { + .bento-grid { + grid-template-columns: repeat(2, 1fr); + } +} + +@media (max-width: 600px) { + .bento-grid { + grid-template-columns: 1fr; + } } \ No newline at end of file diff --git a/docs/.vitepress/theme/components/appendix/data/DataAggregationDemo.vue b/docs/.vitepress/theme/components/appendix/data/DataAggregationDemo.vue new file mode 100644 index 0000000..f8445c8 --- /dev/null +++ b/docs/.vitepress/theme/components/appendix/data/DataAggregationDemo.vue @@ -0,0 +1,275 @@ + + + + + diff --git a/docs/.vitepress/theme/components/appendix/data/DataAnalysisDemo.vue b/docs/.vitepress/theme/components/appendix/data/DataAnalysisDemo.vue deleted file mode 100644 index d49127a..0000000 --- a/docs/.vitepress/theme/components/appendix/data/DataAnalysisDemo.vue +++ /dev/null @@ -1,1252 +0,0 @@ - - - - - diff --git a/docs/.vitepress/theme/components/appendix/data/DataTrackingDemo.vue b/docs/.vitepress/theme/components/appendix/data/DataTrackingDemo.vue index 30d4bf3..8be66c8 100644 --- a/docs/.vitepress/theme/components/appendix/data/DataTrackingDemo.vue +++ b/docs/.vitepress/theme/components/appendix/data/DataTrackingDemo.vue @@ -1,124 +1,95 @@