Skip to content

Commit 01e2050

Browse files
authored
Update ko (#71)
* chore: up sponsors * docs: use positive offset in scroll * docs: fix new links * docs: update vitepress * docs: vm update * docs: twitter logo * docs: Add links for Mastering Pinia and Vue Certificate (vuejs#2036) * docs: update links for mastering pinia and Vue Certification banners (vuejs#2038)
1 parent 924433d commit 01e2050

39 files changed

+540
-401
lines changed

โ€Ždocs/.vitepress/config/shared.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ export const sharedConfig = defineConfig({
8080
content: 'summary_large_image',
8181
},
8282
],
83-
[
84-
'meta',
85-
{
86-
property: 'twitter:image',
87-
content: META_IMAGE,
88-
},
89-
],
83+
// [
84+
// 'meta',
85+
// {
86+
// property: 'twitter:image',
87+
// content: META_IMAGE,
88+
// },
89+
// ],
9090

9191
// Vue School Top banner
9292
[
@@ -107,7 +107,7 @@ export const sharedConfig = defineConfig({
107107
outline: [2, 3],
108108

109109
socialLinks: [
110-
{ icon: 'twitter', link: 'https://twitter.com/posva' },
110+
{ icon: 'x', link: 'https://twitter.com/posva' },
111111
{
112112
icon: 'github',
113113
link: 'https://github.com/vuejs/router',
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<script setup>
2+
const banners = [
3+
{
4+
id: 1,
5+
name: 'Vue.js Certification',
6+
link: 'https://certificates.dev/vuejs/?friend=VUEROUTER&utm_source=affiliate&utm_medium=vuerouter&utm_campaign=VueRouter_CERT&utm_content=sidebar',
7+
image: '/banners/vuejs-certification.svg',
8+
},
9+
{
10+
id: 2,
11+
name: 'Mastering Pinia',
12+
link: 'https://masteringpinia.com/?utm_source=affiliate&utm_medium=vuerouter&utm_campaign=VueRouter_MP&utm_content=sidebar',
13+
image: '/banners/mastering-pinia.png',
14+
},
15+
]
16+
</script>
17+
18+
<template>
19+
<a
20+
v-for="banner in banners"
21+
:key="banner.id"
22+
:href="banner.link"
23+
target="_blank"
24+
:class="`banner_image_${banner.id}`"
25+
>
26+
<img :src="banner.image" :alt="banner.name" />
27+
</a>
28+
</template>
29+
30+
<style scoped>
31+
.banner_image_1 {
32+
padding: 25px 10px 0px 0px;
33+
}
34+
35+
.banner_image_2 {
36+
padding: 15px 10px 15px 0px;
37+
}
38+
</style>
Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,51 @@
1-
<script setup lang="ts">
2-
</script>
1+
<script setup lang="ts"></script>
32

43
<template>
54
<div class="container">
65
<div class="inside">
7-
<a href="https://www.vuemastery.com/pinia?coupon=PINIA-DOCS&via=eduardo" target="_blank">
6+
<a
7+
href="https://www.vuemastery.com/pinia?coupon=PINIA-DOCS&via=eduardo"
8+
target="_blank"
9+
>
810
<span class="logo-wrapper">
9-
<img alt="Vue Mastery Logo" width="25px" src="https://firebasestorage.googleapis.com/v0/b/vue-mastery.appspot.com/o/flamelink%2Fmedia%2Fvue-mastery-logo-small.png?alt=media&token=941fcc3a-2b6f-40e9-b4c8-56b3890da108">
11+
<img
12+
alt="Vue Mastery Logo"
13+
width="25px"
14+
src="https://firebasestorage.googleapis.com/v0/b/vue-mastery.appspot.com/o/flamelink%2Fmedia%2Fvue-mastery-logo-small.png?alt=media&token=941fcc3a-2b6f-40e9-b4c8-56b3890da108"
15+
/>
1016
</span>
1117
<span class="description">
12-
Get the <span class="highlight">Pinia Cheat Sheet</span> from Vue Mastery
18+
Get the <span class="highlight">Pinia Cheat Sheet</span> from Vue
19+
Mastery
1320
</span>
1421
</a>
1522
</div>
1623
</div>
1724
</template>
1825

19-
2026
<style scoped>
2127
.container {
2228
text-align: center;
2329
margin-top: 30px;
2430
}
2531
.inside {
26-
width:960px;
32+
width: 960px;
2733
border-bottom: 1px solid var(--c-divider);
28-
padding-bottom:50px;
34+
padding-bottom: 50px;
2935
margin: 0 auto;
3036
}
3137
a {
3238
background-color: var(--c-bg-accent);
3339
border-radius: 8px;
3440
padding: 8px 16px 8px 8px;
41+
text-decoration: none !important;
3542
}
3643
.description {
3744
line-height: 20px;
3845
color: var(--c-text);
39-
margin-left:10px;
46+
margin-left: 10px;
4047
transition: color 0.5s;
4148
}
42-
a:hover {
43-
text-decoration: none !important;
44-
}
4549
a:hover .highlight {
4650
text-decoration: underline;
4751
}
@@ -50,14 +54,14 @@ a:hover .highlight {
5054
}
5155
@media (max-width: 960px) {
5256
.inside {
53-
width:100%;
57+
width: 100%;
5458
}
5559
}
5660
@media (max-width: 420px) {
5761
a {
58-
display:block;
62+
display: block;
5963
margin-left: 10px;
6064
margin-right: 10px;
6165
}
6266
}
63-
</style>
67+
</style>

โ€Ždocs/.vitepress/theme/components/VueMasteryLogoLink.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ a {
2626
align-items: center;
2727
margin-top: 10px;
2828
margin-bottom: 10px;
29+
text-decoration: none !important;
2930
}
3031
3132
.description {
@@ -38,10 +39,6 @@ a {
3839
transition: color 0.5s;
3940
}
4041
41-
a:hover {
42-
text-decoration: none !important;
43-
}
44-
4542
.description span {
4643
color: var(--vp-c-brand);
4744
}

โ€Ždocs/.vitepress/theme/components/sponsors.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,7 @@
2929
"imgSrcLight": "https://avatars.githubusercontent.com/u/4183726?u=6b50a8ea16de29d2982f43c5640b1db9299ebcd1&v=4"
3030
},
3131
{
32-
"href": "https://storyblok.com",
33-
"imgSrcLight": "https://posva-sponsors.pages.dev/logos/storyblok.png",
34-
"imgSrcDark": "https://posva-sponsors.pages.dev/logos/storyblok.png",
35-
"alt": "Storyblok"
36-
},
37-
{
38-
"href": "https://nuxtjs.org",
32+
"href": "https://nuxtlabs.com",
3933
"imgSrcLight": "https://posva-sponsors.pages.dev/logos/nuxt-light.svg",
4034
"imgSrcDark": "https://posva-sponsors.pages.dev/logos/nuxt-dark.svg",
4135
"alt": "Nuxt Labs"

โ€Ždocs/.vitepress/theme/index.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
import { h } from 'vue'
12
import { Theme, useData } from 'vitepress'
23
import DefaultTheme from 'vitepress/theme'
3-
// import AsideSponsors from './components/AsideSponsors.vue'
4+
import AsideSponsors from './components/AsideSponsors.vue'
45
// import HomeSponsors from './components/HomeSponsors.vue'
56
import './styles/vars.css'
67
import './styles/sponsors.css'
@@ -9,12 +10,12 @@ import VueMasteryLogoLink from './components/VueMasteryLogoLink.vue'
910

1011
const theme: Theme = {
1112
...DefaultTheme,
12-
// Layout() {
13-
// return h(DefaultTheme.Layout, null, {
14-
// 'home-features-after': () => h(HomeSponsors),
15-
// 'aside-ads-before': () => h(AsideSponsors),
16-
// })
17-
// },
13+
Layout() {
14+
return h(DefaultTheme.Layout, null, {
15+
// 'home-features-after': () => h(HomeSponsors),
16+
'aside-ads-before': () => h(AsideSponsors),
17+
})
18+
},
1819

1920
enhanceApp({ app }) {
2021
app.component('VueSchoolLink', VueSchoolLink)
Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
11
:root {
2-
--vp-code-block-bg: var(--vp-c-bg-alt);
2+
--vp-c-brand-1: var(--vp-c-green-1);
3+
--vp-c-brand-2: var(--vp-c-green-2);
4+
--vp-c-brand-3: var(--vp-c-green-3);
5+
--vp-c-brand-soft: var(--vp-c-green-soft);
6+
--vp-code-color: #476582;
37
}
4-
/**
5-
* Component: Home
6-
* -------------------------------------------------------------------------- */
78

8-
:root {
9-
--vp-home-hero-name-color: transparent;
10-
--vp-home-hero-name-background: linear-gradient(
11-
292deg,
12-
var(--vp-c-brand-light) 50%,
13-
var(--vp-c-brand-dark)
14-
);
15-
/* It doesn't look good... */
16-
/* --vp-home-hero-image-background-image: linear-gradient(
17-
15deg,
18-
var(--vp-c-brand-darker) 65%,
19-
var(--vp-c-brand-dark) 30%
9+
:root.dark {
10+
--vp-code-color: #c9def1;
11+
12+
--vp-home-hero-image-filter: blur(72px);
13+
--vp-home-hero-image-background-image: linear-gradient(
14+
0deg,
15+
var(--vp-c-brand-soft) 50%,
16+
var(--vp-c-brand-soft) 50%
2017
);
21-
--vp-home-hero-image-filter: blur(40px); */
2218
}

โ€Ždocs/api/index.md

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,25 +42,25 @@ API Documentation
4242

4343
### LocationQuery
4444

45-
ฦฌ **LocationQuery**: `Record`<`string`, `LocationQueryValue` \| `LocationQueryValue`[]\>
45+
ฦฌ **LocationQuery**: `Record`\<`string`, `LocationQueryValue` \| `LocationQueryValue`[]\>
4646

4747
Normalized query object that appears in [RouteLocationNormalized](interfaces/RouteLocationNormalized.md)
4848

4949
___
5050

5151
### LocationQueryRaw
5252

53-
ฦฌ **LocationQueryRaw**: `Record`<`string` \| `number`, `LocationQueryValueRaw` \| `LocationQueryValueRaw`[]\>
53+
ฦฌ **LocationQueryRaw**: `Record`\<`string` \| `number`, `LocationQueryValueRaw` \| `LocationQueryValueRaw`[]\>
5454

5555
Loose [LocationQuery](index.md#LocationQuery) object that can be passed to functions like
56-
[push](interfaces/Router.md#push) and [replace](interfaces/Router.md#replace) or anywhere when creating a
56+
[Router.push](interfaces/Router.md#push) and [Router.replace](interfaces/Router.md#replace) or anywhere when creating a
5757
[RouteLocationRaw](index.md#RouteLocationRaw)
5858

5959
___
6060

6161
### PathParserOptions
6262

63-
ฦฌ **PathParserOptions**: `Pick`<`_PathParserOptions`, ``"end"`` \| ``"sensitive"`` \| ``"strict"``\>
63+
ฦฌ **PathParserOptions**: `Pick`\<`_PathParserOptions`, ``"end"`` \| ``"sensitive"`` \| ``"strict"``\>
6464

6565
___
6666

@@ -82,13 +82,13 @@ ___
8282

8383
### RouteParams
8484

85-
ฦฌ **RouteParams**: `Record`<`string`, `RouteParamValue` \| `RouteParamValue`[]\>
85+
ฦฌ **RouteParams**: `Record`\<`string`, `RouteParamValue` \| `RouteParamValue`[]\>
8686

8787
___
8888

8989
### RouteParamsRaw
9090

91-
ฦฌ **RouteParamsRaw**: `Record`<`string`, `RouteParamValueRaw` \| `Exclude`<`RouteParamValueRaw`, ``null`` \| `undefined`\>[]\>
91+
ฦฌ **RouteParamsRaw**: `Record`\<`string`, `RouteParamValueRaw` \| `Exclude`\<`RouteParamValueRaw`, ``null`` \| `undefined`\>[]\>
9292

9393
___
9494

@@ -116,7 +116,7 @@ ___
116116

117117
### UseLinkOptions
118118

119-
ฦฌ **UseLinkOptions**: `VueUseOptions`<`RouterLinkOptions`\>
119+
ฦฌ **UseLinkOptions**: `VueUseOptions`\<`RouterLinkOptions`\>
120120

121121
## Variables
122122

@@ -130,14 +130,24 @@ ___
130130

131131
### RouterView
132132

133-
โ€ข `Const` **RouterView**: () => { `$props`: `AllowedComponentProps` & `ComponentCustomProps` & `VNodeProps` & [`RouterViewProps`](interfaces/RouterViewProps.md) ; `$slots`: { `default?`: (`__namedParameters`: { `Component`: `VNode`<`RendererNode`, `RendererElement`, { `[key: string]`: `any`; }\> ; `route`: [`RouteLocationNormalizedLoaded`](interfaces/RouteLocationNormalizedLoaded.md) }) => `VNode`<`RendererNode`, `RendererElement`, { `[key: string]`: `any`; }\>[] } }
133+
โ€ข `Const` **RouterView**: () => \{ `$props`: `AllowedComponentProps` & `ComponentCustomProps` & `VNodeProps` & [`RouterViewProps`](interfaces/RouterViewProps.md) ; `$slots`: \{ `default?`: (`__namedParameters`: \{ `Component`: `VNode`\<`RendererNode`, `RendererElement`, \{ `[key: string]`: `any`; }\> ; `route`: [`RouteLocationNormalizedLoaded`](interfaces/RouteLocationNormalizedLoaded.md) }) => `VNode`\<`RendererNode`, `RendererElement`, \{ `[key: string]`: `any`; }\>[] } }
134134

135135
#### Type declaration
136136

137-
โ€ข **new RouterView**()
137+
โ€ข **new RouterView**(): `Object`
138138

139139
Component to display the current route the user is at.
140140

141+
##### Returns
142+
143+
`Object`
144+
145+
| Name | Type |
146+
| :------ | :------ |
147+
| `$props` | `AllowedComponentProps` & `ComponentCustomProps` & `VNodeProps` & [`RouterViewProps`](interfaces/RouterViewProps.md) |
148+
| `$slots` | \{ `default?`: (`__namedParameters`: \{ `Component`: `VNode`\<`RendererNode`, `RendererElement`, \{ `[key: string]`: `any`; }\> ; `route`: [`RouteLocationNormalizedLoaded`](interfaces/RouteLocationNormalizedLoaded.md) }) => `VNode`\<`RendererNode`, `RendererElement`, \{ `[key: string]`: `any`; }\>[] } |
149+
| `$slots.default?` | (`__namedParameters`: \{ `Component`: `VNode`\<`RendererNode`, `RendererElement`, \{ `[key: string]`: `any`; }\> ; `route`: [`RouteLocationNormalizedLoaded`](interfaces/RouteLocationNormalizedLoaded.md) }) => `VNode`\<`RendererNode`, `RendererElement`, \{ `[key: string]`: `any`; }\>[] |
150+
141151
___
142152

143153
### START\_LOCATION
@@ -308,7 +318,7 @@ ___
308318

309319
### loadRouteLocation
310320

311-
โ–ธ **loadRouteLocation**(`route`): `Promise`<[`RouteLocationNormalizedLoaded`](interfaces/RouteLocationNormalizedLoaded.md)\>
321+
โ–ธ **loadRouteLocation**(`route`): `Promise`\<[`RouteLocationNormalizedLoaded`](interfaces/RouteLocationNormalizedLoaded.md)\>
312322

313323
Ensures a route is loaded, so it can be passed as o prop to `<RouterView>`.
314324

@@ -320,7 +330,7 @@ Ensures a route is loaded, so it can be passed as o prop to `<RouterView>`.
320330

321331
#### Returns
322332

323-
`Promise`<[`RouteLocationNormalizedLoaded`](interfaces/RouteLocationNormalizedLoaded.md)\>
333+
`Promise`\<[`RouteLocationNormalizedLoaded`](interfaces/RouteLocationNormalizedLoaded.md)\>
324334

325335
___
326336

@@ -372,19 +382,19 @@ ___
372382

373383
| Name | Type |
374384
| :------ | :------ |
375-
| `props` | `VueUseOptions`<`RouterLinkOptions`\> |
385+
| `props` | `VueUseOptions`\<`RouterLinkOptions`\> |
376386

377387
#### Returns
378388

379389
`Object`
380390

381391
| Name | Type |
382392
| :------ | :------ |
383-
| `href` | `ComputedRef`<`string`\> |
384-
| `isActive` | `ComputedRef`<`boolean`\> |
385-
| `isExactActive` | `ComputedRef`<`boolean`\> |
386-
| `navigate` | (`e`: `MouseEvent`) => `Promise`<`void` \| [`NavigationFailure`](interfaces/NavigationFailure.md)\> |
387-
| `route` | `ComputedRef`<[`RouteLocation`](interfaces/RouteLocation.md) & { `href`: `string` }\> |
393+
| `href` | `ComputedRef`\<`string`\> |
394+
| `isActive` | `ComputedRef`\<`boolean`\> |
395+
| `isExactActive` | `ComputedRef`\<`boolean`\> |
396+
| `navigate` | (`e`: `MouseEvent`) => `Promise`\<`void` \| [`NavigationFailure`](interfaces/NavigationFailure.md)\> |
397+
| `route` | `ComputedRef`\<[`RouteLocation`](interfaces/RouteLocation.md) & \{ `href`: `string` }\> |
388398

389399
___
390400

โ€Ždocs/api/interfaces/NavigationGuard.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Guards](/guide/advanced/navigation-guards.md).
1313

1414
### NavigationGuard
1515

16-
โ–ธ **NavigationGuard**(`to`, `from`, `next`): `NavigationGuardReturn` \| `Promise`<`NavigationGuardReturn`\>
16+
โ–ธ **NavigationGuard**(`to`, `from`, `next`): `NavigationGuardReturn` \| `Promise`\<`NavigationGuardReturn`\>
1717

1818
#### Parameters
1919

@@ -25,4 +25,4 @@ Guards](/guide/advanced/navigation-guards.md).
2525

2626
#### Returns
2727

28-
`NavigationGuardReturn` \| `Promise`<`NavigationGuardReturn`\>
28+
`NavigationGuardReturn` \| `Promise`\<`NavigationGuardReturn`\>

0 commit comments

Comments
ย (0)