Skip to content

Commit 5b98b82

Browse files
authored
Update ko (#83)
* chore: add security.md [ci skip] * docs: add vuejsde conf banner may (vuejs#2208) * docs: add sponsors block
1 parent b188fae commit 5b98b82

File tree

8 files changed

+159
-0
lines changed

8 files changed

+159
-0
lines changed

โ€ŽSECURITY.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# ์ทจ์•ฝ์  ๋ณด๊ณ 
2+
3+
์ทจ์•ฝ์ ์„ ๋ณด๊ณ ํ•˜๋ ค๋ฉด [email protected]๋กœ ์ด๋ฉ”์ผ์„ ๋ณด๋‚ด์ฃผ์„ธ์š”.
4+
5+
์ƒˆ๋กœ์šด ์ทจ์•ฝ์  ๋ฐœ๊ฒฌ์€ ๋“œ๋ฌผ์ง€๋งŒ, ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์˜ ์ตœ๋Œ€ ๋ณด์•ˆ์„ ์œ„ํ•ด ํ•ญ์ƒ ์ตœ์‹  ๋ฒ„์ „์˜ Vue์™€ ๊ณต์‹ ๋™๋ฐ˜ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์„ ๊ถŒ์žฅํ•ฉ๋‹ˆ๋‹ค.

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

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,48 @@
1+
<script setup lang="ts">
2+
import { computed } from 'vue'
3+
import { VPDocAsideSponsors } from 'vitepress/theme'
4+
import sponsors from './sponsors.json'
5+
6+
// to avoid the never[] type in json
7+
interface Sponsor {
8+
alt: string
9+
href: string
10+
imgSrcDark: string
11+
imgSrcLight: string
12+
}
13+
14+
const asideSponsors = computed(() => {
15+
return [
16+
{
17+
size: 'mini',
18+
items: sponsors.platinum.length ? sponsors.platinum.map((sponsor: Sponsor) => ({
19+
name: sponsor.alt,
20+
url: sponsor.href,
21+
img: sponsor.imgSrcLight,
22+
})) : [
23+
{
24+
name: 'Become a sponsor',
25+
url: 'https://github.com/sponsors/posva',
26+
img: '/your-logo-here.svg'
27+
}
28+
],
29+
},
30+
{
31+
size: 'xmini',
32+
// TODO: use gold instead once I have some
33+
items: sponsors.silver.map((sponsor: Sponsor) => ({
34+
name: sponsor.alt,
35+
url: sponsor.href,
36+
img: sponsor.imgSrcLight,
37+
})),
38+
},
39+
]
40+
})
41+
</script>
42+
143
<template>
44+
<VPDocAsideSponsors :data="asideSponsors" />
45+
246
<a
347
class="banner mp"
448
href="https://masteringpinia.com/?utm_source=affiliate&utm_medium=vuerouter&utm_campaign=VueRouter_MP&utm_content=sidebar"
@@ -27,6 +71,19 @@
2771
</template>
2872

2973
<style scoped>
74+
.VPDocAsideSponsors {
75+
margin-top: 8px !important;
76+
}
77+
78+
:deep(.vp-sponsor-grid.mini .vp-sponsor-grid-image) {
79+
max-width: 158px;
80+
max-height: 48px;
81+
}
82+
:deep(.vp-sponsor-grid.xmini .vp-sponsor-grid-image) {
83+
max-width: 80px;
84+
max-height: 32px;
85+
}
86+
3087
.banner {
3188
margin: 0.25rem 0;
3289
padding: 0.4rem 0;
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
<template>
2+
<div class="banner banner-vuejsconf" v-if="isVisible">
3+
<a href="https://conf.vuejs.de/?utm_source=vuejs&utm_medium=referral&utm_campaign=banner-placement&utm_content=banner"
4+
target="_blank">
5+
<picture>
6+
<source media="(min-width:1200px)" srcset="/vuejsde-conf/vuejsdeconf_banner_large.png" />
7+
<source media="(min-width:920px)" srcset="/vuejsde-conf/vuejsdeconf_banner_medium.png" />
8+
<img src="/vuejsde-conf/vuejsdeconf_banner_small.png" alt="" />
9+
</picture>
10+
</a>
11+
<div class="close-btn" @click.stop.prevent="closeBanner">
12+
<span class="close">&times;</span>
13+
</div>
14+
</div>
15+
</template>
16+
17+
<script setup lang="ts">
18+
import { ref, onMounted } from 'vue'
19+
20+
const isVisible = ref(false)
21+
22+
const nameStorage = 'VUEJSDECONF-BANNER-MAY-2024'
23+
24+
const resetLayoutTopHeight = () => {
25+
document.documentElement.classList.add('banner-dismissed')
26+
}
27+
28+
const closeBanner = () => {
29+
// Hide the banner
30+
isVisible.value = false
31+
// Save action in the local storage
32+
localStorage.setItem(nameStorage, String(true))
33+
resetLayoutTopHeight()
34+
}
35+
36+
onMounted(() => {
37+
isVisible.value = !localStorage.getItem(nameStorage)
38+
39+
if (!isVisible.value) {
40+
resetLayoutTopHeight()
41+
}
42+
})
43+
</script>
44+
<style>
45+
html:not(.banner-dismissed) {
46+
--vp-layout-top-height: 60px;
47+
}
48+
</style>
49+
<style scoped>
50+
.banner {
51+
position: fixed;
52+
z-index: var(--vp-z-index-layout-top);
53+
box-sizing: border-box;
54+
top: 0;
55+
left: 0;
56+
right: 0;
57+
height: var(--vp-layout-top-height);
58+
line-height: 0;
59+
text-align: center;
60+
font-size: 12px;
61+
font-weight: 600;
62+
color: #fff;
63+
}
64+
65+
.banner-dismissed .banner {
66+
display: none;
67+
}
68+
69+
a {
70+
text-decoration: underline;
71+
}
72+
73+
.banner-vuejsconf {
74+
background: linear-gradient(90deg, #fff 50%, #43b883 50%);
75+
}
76+
77+
.banner-vuejsconf a {
78+
display: inline-block;
79+
margin: 0 auto;
80+
}
81+
82+
.banner-vuejsconf .close-btn {
83+
top: 10px;
84+
right: 10px;
85+
z-index: 99;
86+
position: absolute;
87+
border-radius: 50%;
88+
padding: 10px;
89+
cursor: pointer;
90+
}
91+
</style>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ import './styles/vars.css'
77
import './styles/sponsors.css'
88
import VueSchoolLink from './components/VueSchoolLink.vue'
99
import VueMasteryLogoLink from './components/VueMasteryLogoLink.vue'
10+
import VuejsdeConfBanner from './components/VuejsdeConfBanner.vue'
1011

1112
const theme: Theme = {
1213
extends: DefaultTheme,
1314
Layout() {
1415
return h(DefaultTheme.Layout, null, {
1516
// 'home-features-after': () => h(HomeSponsors),
1617
'aside-ads-before': () => h(AsideSponsors),
18+
// 'layout-top': () => h(VuejsdeConfBanner)
1719
})
1820
},
1921

Loading
Loading
Loading

โ€Ždocs/public/your-logo-here.svg

Lines changed: 4 additions & 0 deletions
Loading

0 commit comments

Comments
ย (0)