Skip to content

Commit

Permalink
Update ko (#67)
Browse files Browse the repository at this point in the history
* docs: update slots.md (#2812)

* disable banner

* Update themes.json (#2819)

* document nullable types
ref vuejs/core#3948

* doc: fix method handler access the DOM element way (#2824)

* docs: ensure consistency in example for class-and-style.md (#2822)

* fix: align play icon (#2818)

* style: remove line breaks in sentences (#2802)

* docs: fix update theme property to a reactive property (#2750)

* fix: update create-vue option info (#2826)

* docs: link to suspense (#2827)

* fix: `<pre>` inside `<p>` in example code (#2825)

* docs: format code block comments (#2831)

* update license to CC-BY-4.0 and explicitly exclude images

* add privacy policy

* docs: fix grammar on keep-alive.md (#2840)

* docs: missing anchors in new content (#2838)

* docs: ensure consistency in comment in guide step-11 (#2837)

* docs: add vue vapor repo link (#2836)

* add cute logo

* docs: update link to official certification website (#2782)

* docs #2821: fix writing mistakes in letter case (#2828)

* avoid uwu logo layout shift

* feat: update isProxy() param type (#2801)

* Update slots.md (#2806)

* docs (#2528): add references to help people new to getter functions i… (#2817)

* refactor: remove unuseful comments (#2833)

* docs: add docs for v-model `update:*` event (#2839)

* Fix: uwu logo style & alt text from Home.vue (#2846)

* fix: pdated playground for v-model arguments

* remove uwu logo due to font licensing

* Add Vuemastery free-weekend banner may 2024 (#2847)

* docs: add warning to custom-directives (#2850)

* bring back the uwu logo

* update privacy policy

* fix: link to getter function definition (#2854)

* fix: broken header plugin (#2858)

* Vuemastery banner may link (#2867)

* docs: improve scoped slots explanation of mixing default and named sc… (#2853)

* Domain csstriggers.com was dropped. Need to remove. (#2861)

* Update template-syntax.md (#2862)

* docs: Correct browser support sentences for Playwright and Cypress (#2865)

* fix(testing): broken playwright link (#2870)

* fix(playground): update codesandbox link (#2868)
  • Loading branch information
niceplugin authored May 19, 2024
1 parent 2538c45 commit 7b34765
Show file tree
Hide file tree
Showing 49 changed files with 1,575 additions and 564 deletions.
11 changes: 10 additions & 1 deletion .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const nav: ThemeConfig['nav'] = [
{ text: '파트너', link: '/partners/' },
{ text: '테마', link: '/ecosystem/themes' },
{ text: 'UI 컴포넌트', link: 'https://ui-libs.vercel.app/' },
{ text: '자격증', link: 'https://certification.vuejs.org/?ref=vuejs-nav' },
{ text: '자격증', link: 'https://certificates.dev/vuejs/?ref=vuejs-nav' },
{ text: '일자리', link: 'https://vuejobs.com/?ref=vuejs' },
{ text: 'T-셔츠샵', link: 'https://vue.threadless.com/' }
]
Expand Down Expand Up @@ -109,6 +109,7 @@ const nav: ThemeConfig['nav'] = [
link: '/about/community-guide'
},
{ text: '행동 강령', link: '/about/coc' },
{ text: '개인정보 보호정책', link: '/about/privacy' },
{
text: '다큐멘터리',
link: 'https://www.youtube.com/watch?v=OrxmtDw4pVI'
Expand Down Expand Up @@ -605,6 +606,14 @@ export default defineConfigWithTheme<ThemeConfig>({
'utf-8'
)
],
[
'script',
{},
fs.readFileSync(
path.resolve(__dirname, './inlined-scripts/uwu.js'),
'utf-8'
)
],
[
'script',
{
Expand Down
2 changes: 2 additions & 0 deletions .vitepress/headerMdPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export interface AugmentedHeader extends Header {
}

export const headerPlugin = (md: MarkdownIt) => {
md.core.ruler.enable('text_join')

md.renderer.rules.heading_open = (tokens, i, options, env, self) => {
for (const child of tokens[i + 1].children!) {
if (child.type === 'text' && child.content.endsWith('*')) {
Expand Down
3 changes: 3 additions & 0 deletions .vitepress/inlined-scripts/uwu.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if (location.search.includes('?uwu')) {
document.documentElement.classList.add('uwu')
}
26 changes: 22 additions & 4 deletions .vitepress/theme/components/Home.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
<script setup lang="ts">
import { onMounted } from 'vue'
import { ref, onMounted } from 'vue'
import SiteMap from './SiteMap.vue'
// import NewsLetter from './NewsLetter.vue'
import { load, data, base } from './sponsors'
import SponsorsGroup from './SponsorsGroup.vue'
import VueMasteryModal from './VueMasteryModal.vue'
onMounted(async () => {
await load()
})
onMounted(load)
</script>

<template>
<section id="hero">
<img id="uwu" alt="Vue.js Kawaii Logo by @icarusgkx" />
<h1 class="tagline">

<span class="accent">프로그레시브</span>
Expand Down Expand Up @@ -306,4 +305,23 @@ html:not(.dark) .accent,
font-size: 36px;
}
}
#uwu {
display: none;
}
.uwu #uwu {
display: block;
width: 100%;
max-width: 720px;
margin: -120px auto -20px;
aspect-ratio: 192 / 108;
content: url(/logo-uwu.png);
}
@media (max-width: 576px) {
.uwu #uwu {
margin: -60px auto -10px;
}
}
</style>
287 changes: 287 additions & 0 deletions .vitepress/theme/components/VueMasteryBanner.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,287 @@
<template>
<div class="vuemastery-banner-wrapper" role="banner" v-if="isVisible">
<div
:class="{ 'show-flash': showFlash }"
class="vuemastery-background-dim"
ref="vuemastery-banner-flash"
></div>
<a
id="vm-banner"
href="https://www.vuemastery.com/pricing/?coupon=FREEWEEKEND2024"
target="_blank"
>
<img
id="vm-logo-full"
src="/vuemastery/vuemastery-white.svg"
alt="vuemastery"
/>
<img
id="vm-logo-small"
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"
alt="vuemastery"
/>
<div class="vm-banner-wrapper">
<div class="vm-banner-content">
<h1 class="vm-banner-title">
Get
<span> 60% </span>
off a year of Vue Mastery courses
</h1>
</div>
<button id="vm-banner-cta">Get discount</button>
</div>
<button id="vm-banner-close" @click.prevent="closeBanner">
<VTIconPlus class="close" />
</button>
</a>
</div>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue'
import { VTIconPlus } from '@vue/theme'
const isVisible = ref<Boolean>(true)
const showFlash = ref<Boolean>(false)
const nameStorage = 'VUEMASTERY-BANNER-FREE_WEEKEND-MAY-10-12-2024'
const closeBanner = () => {
// Hide the banner
isVisible.value = false
// Save action in the local storage
localStorage.setItem(nameStorage, String(true))
document.documentElement.classList.remove('vuemastery-menu-fixed')
}
onMounted(() => {
isVisible.value = !localStorage.getItem(nameStorage)
if (isVisible.value) {
document.documentElement.classList.add('vuemastery-menu-fixed')
setTimeout(() => {
showFlash.value = true
}, 2000)
}
})
</script>
<style scoped>
.vuemastery-banner-wrapper {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 61;
width: 100%;
height: 100%;
max-height: 70px;
background: linear-gradient(45deg, #0a2b4e, #835ec2);
background-size: 110%;
background-position: 50% 50%;
overflow: hidden;
padding: 12px;
margin: 0;
transition: background-size 0.25s cubic-bezier(0.39, 0.575, 0.565, 1);
}
.vuemastery-banner-wrapper:hover {
background-size: 100%;
}
.vuemastery-banner-wrapper:before {
content: '';
background: url(/vuemastery/background-bubbles-vuemastery.svg) left
center no-repeat;
background-size: cover;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
transition: all 0.3s ease-out 0.1s;
transform: scale(1.1);
width: 100%;
height: 100%;
}
.vuemastery-banner-wrapper:after {
content: '';
background: url(/vuemastery/lock-vuemastery.svg) right center no-repeat;
background-size: auto 100%;
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
pointer-events: none;
}
.vuemastery-banner-wrapper:hover:after {
background-image: url(/vuemastery/unlock-vuemastery.svg);
}
#vm-banner {
position: relative;
width: 100%;
height: 100%;
text-decoration: none;
color: white;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
}
#vm-logo-full {
position: absolute;
left: 15px;
width: 120px;
}
#vm-logo-small {
display: none;
}
.vm-banner-wrapper {
display: flex;
align-items: center;
}
.vm-banner-content {
display: flex;
}
.vm-banner-title {
margin: 0;
padding: 0;
font-weight: bold;
font-size: 24px;
text-align: center;
}
.vm-banner-title span{
background: linear-gradient(145deg, #c3ffac, #86ec87, #38a56a);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.vm-banner-sub {
margin: 0 2em;
padding: 0;
font-size: 16px;
text-align: center;
color: #fff;
}
#vm-banner-cta {
position: relative;
margin-left: 10px;
padding: 10px 24px;
background: linear-gradient(to top right, #41b782, #86d169);
border: none;
border-radius: 30px;
color: #fff;
font-size: 12px;
font-weight: bold;
text-decoration: none;
text-transform: uppercase;
}
#vm-banner-cta:hover {
background: linear-gradient(to bottom right, #41b782, #86d169);
}
#vm-banner-close {
position: absolute;
right: 12px;
color: #fff;
font-size: 20px;
font-weight: bold;
display: flex;
align-items: center;
justify-content: center;
}
#vm-banner-close > .close {
width: 20px;
height: 20px;
fill: #fff;
transform: rotate(45deg);
}
@media (max-width: 1200px) {
#vm-banner-cta {
display: none;
}
.vm-banner-content {
flex-direction: column;
}
.vm-banner-sub {
margin: 0 1em;
}
}
@media (max-width: 850px) {
.vuemastery-banner-wrapper:after {
background: none;
}
}
@media (max-width: 767px) {
#vm-logo-full {
left: 10px;
width: 100px;
}
}
@media (max-width: 767px) {
#vm-logo-full {
display: none;
}
#vm-logo-small {
position: absolute;
display: block;
left: 10px;
width: 40px;
}
.vm-banner-title {
font-size: 12px;
}
.vm-banner-sub {
font-size: 12px;
margin: 0;
}
}
.vuemastery-background-dim {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
}
.vuemastery-background-dim:after {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(
90deg,
transparent,
rgba(255, 255, 255, 0.4),
transparent
);
transition: 0.5s;
transition-delay: 0.5s;
}
.vuemastery-background-dim.show-flash:after {
left: 100%;
}
</style>

<style>
html.vuemastery-menu-fixed {
--vt-banner-height: 70px;
}
</style>
5 changes: 3 additions & 2 deletions .vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ import {
} from './components/preferences'
import SponsorsAside from './components/SponsorsAside.vue'
import VueSchoolLink from './components/VueSchoolLink.vue'
import Banner from './components/Banner.vue'
// import Banner from './components/Banner.vue'
// import TextAd from './components/TextAd.vue'
import VueMasteryBanner from './components/VueMasteryBanner.vue'

export default Object.assign({}, VPTheme, {
Layout: () => {
// @ts-ignore
return h(VPTheme.Layout, null, {
banner: () => h(Banner),
banner: () => h(VueMasteryBanner),
'sidebar-top': () => h(PreferenceSwitch),
'aside-mid': () => h(SponsorsAside)
})
Expand Down
Loading

0 comments on commit 7b34765

Please sign in to comment.