Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update vitepress and add active match to nav #486

Merged
merged 4 commits into from
Jun 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ export default defineConfig({
},

nav: [
{ text: 'ガイド', link: '/guide/' },
{ text: '設定', link: '/config/' },
{ text: 'プラグイン', link: '/plugins/' },
{ text: 'ガイド', link: '/guide/', activeMatch: '/guide/' },
{ text: '設定', link: '/config/', activeMatch: '/config/' },
{ text: 'プラグイン', link: '/plugins/', activeMatch: '/plugins/' },
{
text: 'リンク',
items: [
Expand Down
1 change: 1 addition & 0 deletions .vitepress/theme/components/HomeSponsors.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const { data } = useSponsor()
<VPHomeSponsors
v-if="data"
message="Vite is free and open source, made possible by wonderful sponsors."
action-text="Become a sponsor"
Comment on lines 10 to +11
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

今更ながら、ここら辺は訳さないでいいのかな🤔と迷いつつ、一旦そのまま以降だけしました。

action-link="https://github.com/sponsors/yyx990803"
:data="data"
/>
Expand Down
3 changes: 1 addition & 2 deletions .vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { h } from 'vue'
import Theme from 'vitepress/theme'
import './styles/vars.css'
import './styles/custom.css'
import HomeSponsors from './components/HomeSponsors.vue'
import AsideSponsors from './components/AsideSponsors.vue'

Expand All @@ -10,7 +9,7 @@ export default {
Layout() {
return h(Theme.Layout, null, {
'home-features-after': () => h(HomeSponsors),
'aside-outline-after': () => h(AsideSponsors)
'aside-ads-before': () => h(AsideSponsors)
})
}
}
15 changes: 0 additions & 15 deletions .vitepress/theme/styles/custom.css

This file was deleted.

19 changes: 19 additions & 0 deletions .vitepress/theme/styles/vars.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,25 @@
#bd34fe 30%,
#41d1ff
);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

差分開始行が1行違うのは #451 の対応が反映されれば解消されるため無視してもらえればと思います。

--vp-home-hero-image-background-image: linear-gradient(
-45deg,
#bd34fe 50%,
#47caff 50%
);
--vp-home-hero-image-filter: blur(40px);
}

@media (min-width: 640px) {
:root {
--vp-home-hero-image-filter: blur(56px);
}
}

@media (min-width: 960px) {
:root {
--vp-home-hero-image-filter: blur(72px);
}
}

/**
Expand Down
4 changes: 2 additions & 2 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ hero:
text: 次世代フロントエンドツール
tagline: 最先端をいく開発環境を構築しましょう
image:
light: /vite-splash-light.jpg
dark: /vite-splash-dark.jpg
src: /logo-with-shadow.png
alt: Vite
actions:
- theme: brand
text: Vite を始める
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"textlint": "^12.0.2",
"textlint-filter-rule-allowlist": "^4.0.0",
"textlint-rule-preset-vuejs-jp": "git+https://github.com/vuejs-jp/textlint-rule-preset-vuejs-jp.git",
"vitepress": "1.0.0-draft.6",
"vitepress": "1.0.0-draft.8",
"yorkie": "^2.0.0"
},
"gitHooks": {
Expand Down
Binary file added public/logo-with-shadow.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/vite-splash-dark.jpg
Binary file not shown.
Binary file removed public/vite-splash-light.jpg
Binary file not shown.
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3045,10 +3045,10 @@ vite@^2.9.7:
optionalDependencies:
fsevents "~2.3.2"

vitepress@1.0.0-draft.6:
version "1.0.0-draft.6"
resolved "https://registry.yarnpkg.com/vitepress/-/vitepress-1.0.0-draft.6.tgz#c07e467b11d419c5fac4809ba5fde2b73f067ec2"
integrity sha512-l5V9Z31+D9EBFy4na7aNhAQ4MKRGVuwjBlFKDkY4kSRHPDPUC9XcNbH1mbWepeYaauJc9IDniWj7uVU6ZqJ53g==
vitepress@1.0.0-draft.8:
version "1.0.0-draft.8"
resolved "https://registry.yarnpkg.com/vitepress/-/vitepress-1.0.0-draft.8.tgz#522e27218f34e09dce501c83d3c8b52d1a229d26"
integrity sha512-r1cphHgtJ/KFwtph3cyusGWjRyX0NHvwfBboKnG5mRJpOP/JyvX5q5+NIiRYElPgdFXU7Roxkl8BcJbxWht56Q==
dependencies:
"@docsearch/css" "^3.0.0"
"@docsearch/js" "^3.0.0"
Expand Down