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

Upstream sync #278

Merged
merged 47 commits into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
9370f37
docs: update forms.md (#2582)
Perlover Nov 29, 2023
2fbe449
docs: updated introduction.md (#2483)
anamayfield Nov 29, 2023
80bb429
chore(deps): bump vue, vitepress, @vue/repl and theme
yyx990803 Nov 30, 2023
8dc0a33
docs: add composition api to style-guide (#2585)
Shinigami92 Nov 30, 2023
b2bca55
fix syntax highlight for vitepress rc.31 shijiki migration
yyx990803 Dec 1, 2023
662c7da
add vue 2 nes banner (#2581)
leonibr Dec 1, 2023
0517a16
feat: add hasInjectionContext API
NataliaTepluhina Dec 1, 2023
95ec9ea
fix: temporary fix escaped expressions
NataliaTepluhina Dec 1, 2023
05a2590
fix: removed outdated test libraries
NataliaTepluhina Dec 1, 2023
48ea900
docs: added events as props and typing with object based emits (#2583)
pikax Dec 1, 2023
e88e878
fix: bump vue and fix syntax highlighting for interpolations
yyx990803 Dec 4, 2023
1350d08
fix: initial value of template refs in Options API (#2587)
jay-es Dec 4, 2023
6f67576
style: fix Special Sponsor loading (#2590)
the-pesar Dec 6, 2023
32c0a6a
Note that verbatimModuleSyntax meets the suggested criteria for `isol…
bmulholland Dec 6, 2023
a509248
remove partner
yyx990803 Dec 6, 2023
56949a8
bump recommended minimum Node.js version
yyx990803 Dec 6, 2023
f9823d9
add ui components link
yyx990803 Dec 8, 2023
51ccfee
chore: remove outdated warning for reactive provide (#2601)
manniL Dec 11, 2023
4151f82
docs: fix minor grammatical mistake (#2602)
magbello157 Dec 12, 2023
f51e4b4
sync with contributor-covenant attribution (#2593)
the-pesar Dec 13, 2023
9400e01
fix: replace TestingApiSwitcher with VTCodeGroup (#2595)
the-pesar Dec 13, 2023
629dc65
docs: replaces 'Not available' with 'search' (#2604)
kenji-webdev Dec 13, 2023
c0f3490
Fix terminology and grammar (#2603)
omar-saleem Dec 13, 2023
7d08ac3
use 3.4 beta
yyx990803 Dec 14, 2023
4cbc64e
Update docs on usage of external types in defineProps (#2600)
franklin-tina Dec 14, 2023
c394c62
docs: fix line break (#2610)
KiritaniAyaka Dec 15, 2023
e9cdaff
feat: add vuemastery banner (#2591)
i5dr0id Dec 18, 2023
10c8163
chore: fix backticks (#2612)
jay-es Dec 18, 2023
3a32866
fix: remove unnecessary paragraph
NataliaTepluhina Dec 18, 2023
09d541a
fix: change redirection link (#2614)
i5dr0id Dec 19, 2023
a0b4a90
List transition example fix (#2611)
AloisSeckar Dec 19, 2023
c15a06f
chore(deps): bump vue from 3.4.0-beta.1 to 3.4.0-beta.2 (#2609)
dependabot[bot] Dec 19, 2023
bcc313c
feat: add pnpm, yarn and bun support in quick-start (#2605)
the-pesar Dec 19, 2023
048a3be
bump vue
yyx990803 Dec 20, 2023
0475ae0
update monterail image
yyx990803 Dec 20, 2023
c345f04
chore(deps): bump @vue/repl from 3.0.0 to 3.0.1 (#2616)
dependabot[bot] Dec 20, 2023
f7555f2
fix: Update broken link in accessibility.md (#2618)
megancoyle Dec 21, 2023
4514929
chore(deps): bump vue from 3.4.0-beta.4 to 3.4.0-rc.1 (#2624)
dependabot[bot] Dec 26, 2023
6dea6b8
chore(deps): bump @vue/repl from 3.0.1 to 3.1.0 (#2619)
dependabot[bot] Dec 26, 2023
0067173
chore: use 3.4 rc2
yyx990803 Dec 26, 2023
35e1aed
Update tauri domain (#2626)
6-78 Dec 26, 2023
810409f
bump to 3.4 rc3
yyx990803 Dec 27, 2023
7e75936
fix: delete meaningless paragraphs (#2632)
heygsc Dec 28, 2023
14d762c
unify "See also" links (#2628)
AloisSeckar Dec 28, 2023
f3a65c0
Merge branch 'main-upstream' into upstream-sync
matrunchyk Dec 28, 2023
b7d4c5c
Apply suggestions from code review
matrunchyk Dec 28, 2023
9a66173
fix: closing tag
matrunchyk Dec 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const nav: ThemeConfig['nav'] = [
items: [
{ text: 'Партнери', link: '/partners/' },
{ text: 'Теми', link: '/ecosystem/themes' },
{ text: 'UI компоненти', link: 'https://ui-libs.vercel.app/' },
{
text: 'Сертифікація',
link: 'https://certification.vuejs.org/?ref=vuejs-nav'
Expand Down
4 changes: 2 additions & 2 deletions .vitepress/inlined-scripts/restorePreference.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
restore('vue-docs-prefer-composition', 'prefer-composition', true)
restore('vue-docs-prefer-sfc', 'prefer-sfc', true)

// window.__VUE_BANNER_ID__ = ''
// restore(`vue-docs-banner-${__VUE_BANNER_ID__}`, 'banner-dismissed')
window.__VUE_BANNER_ID__ = 'herodevs-vue2-nes'
restore(`vue-docs-banner-${__VUE_BANNER_ID__}`, 'banner-dismissed')
})()
369 changes: 336 additions & 33 deletions .vitepress/theme/components/Banner.vue

Large diffs are not rendered by default.

38 changes: 18 additions & 20 deletions .vitepress/theme/components/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,28 +41,26 @@ onMounted(async () => {
</p>
</section>

<section id="special-sponsor">
<section v-if="data && data.special" id="special-sponsor">
<span class="lead">Спеціальний спонсор</span>
<template v-if="data && data.special">
<template v-for="{ url, img, name, description } of data.special">
<a :href="url" target="_blank" rel="sponsored noopener">
<picture v-if="img.endsWith('png')">
<source
type="image/avif"
:srcset="`${base}/images/${img.replace(/\.png$/, '.avif')}`"
/>
<img :src="`${base}/images/${img}`" :alt="name" />
</picture>
<img
width="168"
height="42"
v-else
:src="`${base}/images/${img}`"
:alt="name"
<template v-for="{ url, img, name, description } of data.special">
<a :href="url" target="_blank" rel="sponsored noopener">
<picture v-if="img.endsWith('png')">
<source
type="image/avif"
:srcset="`${base}/images/${img.replace(/\.png$/, '.avif')}`"
/>
</a>
<span>{{ description }}</span>
</template>
<img :src="`${base}/images/${img}`" :alt="name" />
</picture>
<img
width="168"
height="42"
v-else
:src="`${base}/images/${img}`"
:alt="name"
/>
</a>
<span>{{ description }}</span>
</template>
</section>

Expand Down
284 changes: 284 additions & 0 deletions .vitepress/theme/components/VueMasteryBanner.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,284 @@
<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/holiday"
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">
Вивчайте Vue з Еваном Ю
<!-- <span>Dec 18-29</span> -->
</h1>
<p class="vm-banner-sub">Отримайте знижку 60% на рік курсів Vue</p>
</div>
<button id="vm-banner-cta">Розблокуйте свою знижку</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-DECEMBER-2023'

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>
4 changes: 3 additions & 1 deletion .vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ 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 VueMasteryBanner from './components/VueMasteryBanner.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)
})
Expand Down
11 changes: 3 additions & 8 deletions .vitepress/theme/styles/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@
@import "./utilities.css";
@import "./style-guide.css";

:root {
--vp-sidebar-width-small: 289px !important;
}

/* bugfix: https://github.com/vuejs/theme/pull/95 */

.vt-flyout-menu {
max-height: calc(100vh - var(--vt-nav-height) - var(--vt-banner-height, 0px)) !important;
/* vitepress rc.31 migrated to shijiki and need this to apply code styles */
.vp-code span {
color: var(--shiki-dark, inherit);
}
Loading