Skip to content

Commit 264cade

Browse files
authored
Merge pull request #502 from Gumball12/__yuki-no-batch-pr
#293 ~ #501 문서 번역
2 parents ef6392b + 1c6746f commit 264cade

39 files changed

Lines changed: 1459 additions & 1143 deletions

.vitepress/config.ts

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
import fs from 'fs'
22
import path from 'path'
3-
import { defineConfigWithTheme } from 'vitepress'
3+
import { defineConfigWithTheme, type Plugin } from 'vitepress'
44
import type { Config as ThemeConfig } from '@vue/theme'
55
// import llmstxt from 'vitepress-plugin-llms'
66
import baseConfig from '@vue/theme/config'
77
import { headerPlugin } from './headerMdPlugin'
88
// import { textAdPlugin } from './textAdMdPlugin'
9+
import {
10+
groupIconMdPlugin,
11+
groupIconVitePlugin
12+
} from 'vitepress-plugin-group-icons'
913

1014
const nav: ThemeConfig['nav'] = [
1115
{
@@ -496,7 +500,7 @@ export const sidebar: ThemeConfig['sidebar'] = {
496500
{
497501
text: '트랜지션이 있는 리스트',
498502
link: '/examples/#list-transition'
499-
},
503+
}
500504
]
501505
},
502506
{
@@ -709,7 +713,7 @@ export default defineConfigWithTheme<ThemeConfig>({
709713
{
710714
link: 'https://ru.vuejs.org',
711715
text: 'Русский',
712-
repo: 'https://github.com/translation-gang/docs-ru'
716+
repo: 'https://github.com/vuejs-translations/docs-ru'
713717
},
714718
{
715719
link: 'https://cs.vuejs.org',
@@ -721,6 +725,11 @@ export default defineConfigWithTheme<ThemeConfig>({
721725
text: '繁體中文',
722726
repo: 'https://github.com/vuejs-translations/docs-zh-hk'
723727
},
728+
{
729+
link: 'https://pl.vuejs.org',
730+
text: 'Polski',
731+
repo: 'https://github.com/vuejs-translations/docs-pl'
732+
},
724733
{
725734
link: '/translations/',
726735
text: '번역에 참가하세요!',
@@ -732,7 +741,7 @@ export default defineConfigWithTheme<ThemeConfig>({
732741
algolia: {
733742
indexName: 'vuejs-korea',
734743
appId: 'MEIERGO63D',
735-
apiKey: '736f8ceee537a06dcd6ecea297cb7942',
744+
apiKey: '736f8ceee537a06dcd6ecea297cb7942'
736745
// searchParameters: {
737746
// facetFilters: ['version:v3']
738747
// }
@@ -766,7 +775,7 @@ export default defineConfigWithTheme<ThemeConfig>({
766775
markdown: {
767776
theme: 'github-dark',
768777
config(md) {
769-
md.use(headerPlugin)
778+
md.use(headerPlugin).use(groupIconMdPlugin)
770779
// .use(textAdPlugin)
771780
}
772781
},
@@ -795,6 +804,14 @@ export default defineConfigWithTheme<ThemeConfig>({
795804
},
796805
json: {
797806
stringify: true
798-
}
807+
},
808+
plugins: [
809+
groupIconVitePlugin({
810+
customIcon: {
811+
cypress: 'vscode-icons:file-type-cypress',
812+
'testing library': 'logos:testing-library'
813+
}
814+
}) as Plugin
815+
]
799816
}
800817
})

.vitepress/inlined-scripts/restorePreference.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
restore('vue-docs-prefer-composition', 'prefer-composition', true)
99
restore('vue-docs-prefer-sfc', 'prefer-sfc', true)
1010

11-
window.__VUE_BANNER_ID__ = 'vueconfus2024'
11+
window.__VUE_BANNER_ID__ = 'viteconf2025'
1212
restore(`vue-docs-banner-${__VUE_BANNER_ID__}`, 'banner-dismissed')
1313
})()

.vitepress/theme/components/Banner.vue

Lines changed: 161 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,48 @@ function dismiss() {
2020
}
2121
</script>
2222

23+
2324
<template>
2425
<div class="banner" v-if="open">
25-
<a target="_blank"></a>
26+
<svg style="margin-right: 0.5rem" width="20" height="20" viewBox="0 0 30 30" fill="none"
27+
xmlns="http://www.w3.org/2000/svg">
28+
<g>
29+
<path
30+
d="M20.3653 1.01733L11.1779 2.87249C11.0895 2.87249 11.0012 2.96082 11.0012 2.96082C10.9128 3.04916 10.9128 3.13751 10.9128 3.13751L10.3828 13.2083C10.3828 13.2967 10.3828 13.2967 10.3828 13.3851C10.3828 13.4734 10.4711 13.4734 10.4711 13.4734C10.4711 13.4734 10.5595 13.5618 10.6478 13.5618C10.7361 13.5618 10.7361 13.5618 10.8245 13.5618L13.3864 12.9433C13.6514 12.855 13.8281 13.12 13.8281 13.3851L13.033 17.3603C12.9447 17.6254 13.2097 17.8905 13.4748 17.8021L15.0648 17.272C15.3299 17.1837 15.5066 17.4487 15.5066 17.7137L14.2697 23.8976C14.1815 24.251 14.7115 24.5159 14.8882 24.1626L15.0648 23.8976L22.5738 8.08458C22.5738 7.90789 22.3088 7.55453 22.0438 7.64287L19.3935 8.17292C19.1286 8.26125 18.9519 7.99624 19.0402 7.73122L20.7187 1.45903C20.807 1.19401 20.6304 0.928988 20.3653 1.01733Z"
31+
fill="url(#paint0_linear_648_13)" />
32+
<path
33+
d="M29.6424 3.75619C29.2891 3.22614 28.5824 2.96112 27.964 3.04945L20.985 4.37457L20.72 5.43465L28.2289 4.10955C28.494 4.02121 28.7591 4.19788 28.9357 4.37457C29.1124 4.63959 29.1124 4.90462 28.9357 5.16964L15.773 28.5799C15.6846 28.845 15.4196 28.9332 15.1545 28.9332C14.8896 28.9332 14.6245 28.7566 14.5361 28.5799L1.10836 5.08129C0.931674 4.90462 0.931674 4.55125 1.10836 4.37457C1.28504 4.19788 1.46172 4.10955 1.72674 4.10955C1.72674 4.10955 1.81508 4.10955 1.90342 4.10955L9.85411 5.523L9.94246 4.55125L1.99176 3.04945C1.28504 2.96112 0.666654 3.22614 0.313291 3.75619C-0.0400717 4.28623 -0.128412 4.99295 0.22495 5.61134L13.6528 29.1099C13.9178 29.64 14.5361 29.9933 15.1545 29.9933C15.773 29.9933 16.303 29.64 16.6563 29.1099L29.8191 5.61134C30.0842 4.99295 30.0842 4.28623 29.6424 3.75619Z"
34+
fill="url(#paint1_linear_648_13)" />
35+
</g>
36+
<defs>
37+
<linearGradient id="paint0_linear_648_13" x1="10.5947" y1="3.97762" x2="20.9471" y2="17.0584"
38+
gradientUnits="userSpaceOnUse">
39+
<stop stop-color="#B047FF" />
40+
<stop offset="0.75" stop-color="#FFD0D0" />
41+
<stop offset="0.9167" stop-color="#FFF3E6" />
42+
</linearGradient>
43+
<linearGradient id="paint1_linear_648_13" x1="8.078" y1="1.32911" x2="23.118" y2="18.0977"
44+
gradientUnits="userSpaceOnUse">
45+
<stop stop-color="#57CCFF" />
46+
<stop offset="1" stop-color="#AF48FF" />
47+
</linearGradient>
48+
</defs>
49+
</svg>
50+
<p class="vt-banner-text">
51+
<span class="vt-main">ViteConf 2025</span>
52+
<span class="vt-tagline"> · 첫 <span style="font-weight: 900;">오프라인</span> 컨퍼런스</span>
53+
<span class="vt-place"> · 암스테르담</span>
54+
<span class="vt-date"> · Oct 09-10</span>
55+
<a target="_blank" class="vt-primary-action"
56+
href="https://viteconf.amsterdam/?utm_source=vuejs&utm_content=top_banner">
57+
등록하기
58+
</a>
59+
</p>
2660
<button @click="dismiss">
2761
<VTIconPlus class="close" />
2862
</button>
63+
<div class="glow glow--purple"></div>
64+
<div class="glow glow--blue"></div>
2965
</div>
3066
</template>
3167

@@ -46,31 +82,80 @@ html:not(.banner-dismissed) {
4682
height: var(--vt-banner-height);
4783
line-height: var(--vt-banner-height);
4884
text-align: center;
49-
font-size: 13px;
50-
font-weight: 600;
51-
color: #fff;
52-
background-color: var(--vt-c-green);
53-
background: linear-gradient(
54-
90deg,
55-
rgba(66, 184, 131, 1) 0%,
56-
rgba(39, 179, 137, 1) 19%,
57-
rgba(100, 126, 255, 1) 100%
58-
);
85+
font-size: 12px;
86+
color: white;
87+
background: #262626;
88+
display: flex;
89+
justify-content: center;
90+
align-items: center;
91+
overflow: hidden;
5992
}
6093
61-
.banner-dismissed .banner {
62-
display: none;
94+
.glow.glow--purple {
95+
position: absolute;
96+
bottom: -15%;
97+
left: -75%;
98+
width: 80%;
99+
aspect-ratio: 1.5;
100+
pointer-events: none;
101+
border-radius: 100%;
102+
background: linear-gradient(270deg, #7a23a1, #715ebde6 60% 80%, #bd34fe00);
103+
filter: blur(15vw);
104+
transform: none;
105+
opacity: .6
106+
}
107+
108+
.glow.glow--blue {
109+
position: absolute;
110+
bottom: -15%;
111+
right: -40%;
112+
width: 80%;
113+
aspect-ratio: 1.5;
114+
pointer-events: none;
115+
border-radius: 100%;
116+
background: linear-gradient(180deg, #61d9ff, #0000);
117+
filter: blur(15vw);
118+
transform: none;
119+
opacity: .3
120+
}
121+
122+
@media (min-width: 768px) {
123+
.glow.glow--blue {
124+
top: -15%;
125+
right: -40%;
126+
width: 80%;
127+
}
128+
129+
.glow.glow--purple {
130+
bottom: -15%;
131+
left: -40%;
132+
width: 80%;
133+
}
63134
}
64135
65-
a:hover {
66-
text-decoration: underline;
136+
@media (min-width: 1025px) {
137+
.glow.glow--blue {
138+
top: -15%;
139+
right: -40%;
140+
width: 80%;
141+
}
142+
143+
.glow.glow--purple {
144+
bottom: -15%;
145+
left: -40%;
146+
width: 80%;
147+
}
148+
}
149+
150+
.banner-dismissed .banner {
151+
display: none;
67152
}
68153
69154
button {
70155
position: absolute;
71156
right: 0;
72157
top: 0;
73-
padding: 5px;
158+
padding: 5px 5px;
74159
}
75160
76161
.close {
@@ -79,10 +164,66 @@ button {
79164
fill: #fff;
80165
transform: rotate(45deg);
81166
}
82-
/*
83-
@media (max-width: 720px) {
84-
a > span {
167+
168+
.vt-banner-text {
169+
color: #fff;
170+
font-size: 12px;
171+
}
172+
173+
.vt-main {
174+
color: transparent;
175+
background-image: linear-gradient(120deg, #b047ff 16%, #9499ff, #9499ff);
176+
background-clip: text;
177+
}
178+
179+
.vt-primary-action {
180+
background: radial-gradient(141.42% 141.42% at 100% 0%, #ffffff80, #fff0), radial-gradient(140.35% 140.35% at 100% 94.74%, #bd34fe, #bd34fe00), radial-gradient(89.94% 89.94% at 18.42% 15.79%, #41d1ff, #41d1ff00);
181+
color: #fff;
182+
padding: 4px 8px;
183+
border-radius: 5px;
184+
font-size: 10px;
185+
text-decoration: none;
186+
margin: 0 10px;
187+
transition: all .2s ease-in-out;
188+
189+
&:hover {
190+
box-shadow: 0 1px #fffc inset;
191+
}
192+
}
193+
194+
195+
@media (max-width: 1280px) {
196+
.banner .vt-banner-text {
197+
font-size: 14px;
198+
}
199+
200+
.vt-tagline {
201+
display: none;
202+
}
203+
}
204+
205+
@media (max-width: 780px) {
206+
.vt-tagline {
85207
display: none;
86208
}
87-
} */
209+
210+
.vt-coupon {
211+
display: none;
212+
}
213+
214+
.vt-primary-action {
215+
margin: 0 10px;
216+
padding: 4px 8px;
217+
}
218+
219+
.vt-time-now {
220+
display: none;
221+
}
222+
}
223+
224+
@media (max-width: 560px) {
225+
.vt-place {
226+
display: none;
227+
}
228+
}
88229
</style>
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<template>
2+
<div class="scrimba">
3+
<a
4+
:href="href"
5+
target="_blank"
6+
rel="sponsored noopener"
7+
:title="title"
8+
>
9+
<slot>Scrimba에서 무료 인터랙티브 튜토리얼 보기</slot>
10+
</a>
11+
</div>
12+
</template>
13+
<script>
14+
export default {
15+
props: {
16+
href: { type: String, required: true },
17+
title: { type: String, required: true }
18+
}
19+
}
20+
</script>
21+
<style scoped>
22+
.scrimba {
23+
margin: 28px 0;
24+
background-color: var(--vt-c-bg-soft);
25+
padding: 1em 1.25em;
26+
border-radius: 2px;
27+
position: relative;
28+
display: flex;
29+
border-radius: 8px;
30+
}
31+
.scrimba a {
32+
color: var(--c-text);
33+
position: relative;
34+
padding-left: 36px;
35+
}
36+
.scrimba a:before {
37+
content: '';
38+
position: absolute;
39+
display: block;
40+
width: 30px;
41+
height: 30px;
42+
top: calc(50% - 15px);
43+
left: -4px;
44+
border-radius: 50%;
45+
background-color: #73abfe;
46+
}
47+
.scrimba a:after {
48+
content: '';
49+
position: absolute;
50+
display: block;
51+
width: 0;
52+
height: 0;
53+
top: calc(50% - 5px);
54+
left: 8px;
55+
border-top: 5px solid transparent;
56+
border-bottom: 5px solid transparent;
57+
border-left: 8px solid #fff;
58+
}
59+
</style>

.vitepress/theme/index.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,18 @@ import {
1010
} from './components/preferences'
1111
import SponsorsAside from './components/SponsorsAside.vue'
1212
import VueSchoolLink from './components/VueSchoolLink.vue'
13-
// import Banner from './components/Banner.vue'
13+
import ScrimbaLink from './components/ScrimbaLink.vue'
14+
import Banner from './components/Banner.vue'
1415
// import TextAd from './components/TextAd.vue'
1516

17+
import 'vitepress/dist/client/theme-default/styles/components/vp-code-group.css'
18+
import 'virtual:group-icons.css'
19+
1620
export default Object.assign({}, VPTheme, {
1721
Layout: () => {
1822
// @ts-ignore
1923
return h(VPTheme.Layout, null, {
20-
// banner: () => h(Banner),
24+
banner: () => h(Banner),
2125
'sidebar-top': () => h(PreferenceSwitch),
2226
'sidebar-bottom': () => h(SecurityUpdateBtn),
2327
'aside-mid': () => h(SponsorsAside)
@@ -28,6 +32,7 @@ export default Object.assign({}, VPTheme, {
2832
app.provide('prefer-sfc', preferSFC)
2933
app.provide('filter-headers', filterHeadersByPreference)
3034
app.component('VueSchoolLink', VueSchoolLink)
35+
app.component('ScrimbaLink', ScrimbaLink)
3136
// app.component('TextAd', TextAd)
3237
}
3338
})

0 commit comments

Comments
 (0)