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

Sync #50f3f20a #932

Merged
merged 58 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from 57 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
d3c861b
Update routing.md (#2786)
MrsLong Apr 10, 2024
c1de1dd
feat(Suspense): add suspensible prop information (#2785)
ferferga Apr 10, 2024
3d854a0
fix: add missing anchors on suspense (#2795)
mostafa-nematpour Apr 13, 2024
6e1c211
chore: update algolia api key
yyx990803 Apr 14, 2024
d8cd9c8
chore(deps): bump vue from 3.4.21 to 3.4.22 (#2800)
dependabot[bot] Apr 15, 2024
456e418
docs: rephrasing for understanding (#2783)
404answernotfound Apr 16, 2024
c5f2a3c
chore(deps): bump vue from 3.4.22 to 3.4.23 (#2803)
dependabot[bot] Apr 16, 2024
0beaed8
chore(deps): bump vitepress from 1.1.0 to 1.1.3 (#2808)
dependabot[bot] Apr 19, 2024
4cda226
docs: change tag from div to li element (#2814)
splendente Apr 22, 2024
44d4e75
docs: update slots.md (#2812)
RDistinct Apr 22, 2024
7da76f6
disable banner
yyx990803 Apr 24, 2024
658d337
Update themes.json (#2819)
phoenixcoded20 Apr 24, 2024
5451f5b
chore(deps): bump vue from 3.4.23 to 3.4.25 (#2820)
dependabot[bot] Apr 24, 2024
26666c0
document nullable types
yyx990803 Apr 25, 2024
ab109fd
doc: fix method handler access the DOM element way (#2824)
coderZoe Apr 25, 2024
3cfa678
docs: ensure consistency in example for class-and-style.md (#2822)
anoopbk123 Apr 25, 2024
4e4a963
fix: align play icon (#2818)
rluvaton Apr 25, 2024
31a6e6b
style: remove line breaks in sentences (#2802)
jay-es Apr 25, 2024
90e33ea
docs: fix update theme property to a reactive property (#2750)
GmavionR Apr 25, 2024
c42ab53
fix: update create-vue option info (#2826)
btea Apr 26, 2024
15ada9d
docs: link to suspense (#2827)
manniL Apr 26, 2024
306262e
docs: unifies playground link text (#2829)
xiaodong2008 Apr 26, 2024
7d47441
fix: `<pre>` inside `<p>` in example code (#2825)
xiaodong2008 Apr 26, 2024
21cd803
docs: format code block comments (#2831)
xiaodong2008 Apr 26, 2024
4976d7d
typo: Chrome should be capitalized (#2832)
xiaodong2008 Apr 26, 2024
8cf6815
update license to CC-BY-4.0 and explicitly exclude images
yyx990803 Apr 26, 2024
5bc30bf
add privacy policy
yyx990803 Apr 26, 2024
0112f1a
chore(deps): bump @vue/repl from 4.1.1 to 4.1.2
dependabot[bot] Apr 26, 2024
566533b
docs: fix grammar on keep-alive.md (#2840)
HP8585 Apr 29, 2024
e57413f
docs: missing anchors in new content (#2838)
AloisSeckar Apr 29, 2024
980866b
docs: ensure consistency in comment in guide step-11 (#2837)
xiaodong2008 Apr 29, 2024
c70fdb3
docs: add vue vapor repo link (#2836)
xiaodong2008 Apr 29, 2024
d4b8dec
chore(deps): bump vue from 3.4.25 to 3.4.26
dependabot[bot] Apr 29, 2024
baf27c8
chore(deps): bump vitepress from 1.1.3 to 1.1.4
dependabot[bot] Apr 29, 2024
b137c7a
add cute logo
yyx990803 Apr 30, 2024
4c1e2c1
docs: update link to official certification website (#2782)
nperegrine Apr 30, 2024
7ae6897
docs #2821: fix writing mistakes in letter case (#2828)
xiaodong2008 Apr 30, 2024
5699257
avoid uwu logo layout shift
yyx990803 Apr 30, 2024
b786ffd
feat: update isProxy() param type (#2801)
OnlyWick May 1, 2024
cbe0bcb
Update slots.md (#2806)
claushellsing May 1, 2024
43761be
docs (#2528): add references to help people new to getter functions i…
bencodezen May 1, 2024
c86beff
refactor: remove unuseful comments (#2833)
xiaodong2008 May 1, 2024
288f7bf
docs: add docs for v-model `update:*` event (#2839)
xiaodong2008 May 1, 2024
12a2591
Fix: uwu logo style & alt text from Home.vue (#2846)
yamanoku May 1, 2024
fddbd8e
fix: pdated playground for v-model arguments
NataliaTepluhina May 1, 2024
7aa1cb3
remove uwu logo due to font licensing
yyx990803 May 1, 2024
0d064f2
Add Vuemastery free-weekend banner may 2024 (#2847)
i5dr0id May 2, 2024
b3eb63c
fix: link to getter function definition (#2848)
AloisSeckar May 2, 2024
3044a81
docs: add warning to custom-directives (#2850)
xiaodong2008 May 3, 2024
a95e910
bring back the uwu logo
yyx990803 May 3, 2024
50f3f20
update privacy policy
yyx990803 May 3, 2024
f895ca2
Merge remote-tracking branch 'origin/upstream' into sync
wxsms May 6, 2024
d3b310c
update lockfile
wxsms May 6, 2024
5ba4805
fix lint issue
wxsms May 6, 2024
84b80b4
add todo badge
wxsms May 6, 2024
843afb6
translate suspense
xiaodong2008 May 6, 2024
094a01e
fix lint
xiaodong2008 May 6, 2024
c150587
Apply suggestions from code review
wxsms May 8, 2024
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
11 changes: 10 additions & 1 deletion .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const nav: ThemeConfig['nav'] = [
{ text: 'UI 组件', link: 'https://ui-libs.vercel.app/' },
{
text: '证书',
link: 'https://certification.vuejs.org/?ref=vuejs-nav'
link: 'https://certificates.dev/vuejs/?ref=vuejs-nav'
},
{ text: '找工作', link: 'https://vuejobs.com/?ref=vuejs' },
{ text: 'T-Shirt 商店', link: 'https://vue.threadless.com/' }
Expand Down Expand Up @@ -113,6 +113,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 @@ -634,6 +635,14 @@ export default defineConfigWithTheme<ThemeConfig>({
'utf-8'
)
],
[
'script',
{},
fs.readFileSync(
path.resolve(__dirname, './inlined-scripts/uwu.js'),
'utf-8'
)
],
[
'script',
{
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,5 +1,5 @@
<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'
Expand All @@ -8,13 +8,12 @@ import SponsorsGroup from './SponsorsGroup.vue'
// https://github.com/vuejs-translations/docs-zh-cn/issues/177
// 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" />
Copy link
Contributor

Choose a reason for hiding this comment

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

我们要同步这个彩蛋吗?

@vuejs-translations/zh-cn

Copy link
Member Author

Choose a reason for hiding this comment

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

个人觉得暂时无需特别处理,目前需要带上 ?uwu 才能显示该 logo,对正常使用无影响

<h1 class="tagline">
<span class="accent">渐进式</span>
<br />JavaScript 框架
Expand Down Expand Up @@ -356,4 +355,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>
283 changes: 283 additions & 0 deletions .vitepress/theme/components/VueMasteryBanner.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,283 @@
<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/free-weekend"
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">
FREE WEEKEND <span>MAY 10-12</span>
</h1>
<p class="vm-banner-sub">Watch all Vue Mastery courses free</p>
</div>
<button id="vm-banner-cta">Get Access</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;
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: 14px;
}
.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>
3 changes: 2 additions & 1 deletion .vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ import SponsorsAside from './components/SponsorsAside.vue'
import WwAds from './components/WwAds.vue'
// import TextAd from './components/TextAd.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),
'aside-bottom': () => h(WwAds),
Expand Down
4 changes: 2 additions & 2 deletions .vitepress/theme/styles/inline-demo.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
border: 2px solid var(--vt-c-green);
margin-right: 8px;
margin-left: 4px;
line-height: 15px;
padding-left: 4.5px;
line-height: 16px;
padding-left: 4.2px;
font-size: 11px;
}

Expand Down