Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/upstream'
Browse files Browse the repository at this point in the history
  • Loading branch information
mostafa-nematpour committed Jan 24, 2025
2 parents 001d4a6 + 3f4d223 commit fd22cc9
Show file tree
Hide file tree
Showing 13 changed files with 681 additions and 303 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ dist/
# vitepress build output
.vitepress/dist
.vitepress/cache
.vitepress/.temp

# Serverless directories
.serverless/
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__ = 'madvue2025_1'
restore(`vue-docs-banner-${__VUE_BANNER_ID__}`, 'banner-dismissed')
})()
96 changes: 82 additions & 14 deletions .vitepress/theme/components/Banner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,32 @@ function dismiss() {

<template>
<div class="banner" v-if="open">
<a target="_blank"></a>
<p class="vt-banner-text">
<span class="vt-text-primary">
<span style="color:#f97844">Mad</span>
<span>Vue</span>
</span>
<span class="vt-tagline"> · The Vue.js Event in Madrid</span>
<span class="vt-place"> · Spain</span>
<span class="vt-date"> · 29 May 2025</span>
<a target="_blank" class="vt-primary-action"
href="https://madvue.es/?utm_source=vuejs&utm_content=top_banner">
Register
</a>
</p>
<button @click="dismiss">
<VTIconPlus class="close" />
</button>
<p class="vt-banner-text vt-coupon">
<span class="vt-text-primary">Early bird</span> tickets available
<span class="vt-text-primary">Get 30% off</span>
</p>
</div>
</template>

<style>
html:not(.banner-dismissed) {
--vt-banner-height: 30px;
--vt-banner-height: 60px;
}
</style>

Expand All @@ -50,12 +66,10 @@ html:not(.banner-dismissed) {
font-weight: 600;
color: #fff;
background-color: var(--vt-c-green);
background: linear-gradient(
90deg,
rgba(66, 184, 131, 1) 0%,
rgba(39, 179, 137, 1) 19%,
rgba(100, 126, 255, 1) 100%
);
background: #0f172a;
display: flex;
justify-content: center;
align-items: center;
}
.banner-dismissed .banner {
Expand All @@ -70,7 +84,7 @@ button {
position: absolute;
right: 0;
top: 0;
padding: 5px;
padding: 20px 10px;
}
.close {
Expand All @@ -79,10 +93,64 @@ button {
fill: #fff;
transform: rotate(45deg);
}
/*
@media (max-width: 720px) {
a > span {
.vt-banner-text {
color: #fff;
font-size: 16px;
}
.vt-text-primary {
color: #c4d141;
}
.vt-primary-action {
background: #f97844;
color: #fff;
padding: 6px 12px;
border-radius: 5px;
font-size: 14px;
text-decoration: none;
margin: 0 20px;
font-weight: bold;
}
.vt-primary-action:hover {
text-decoration: none;
background: #c4d141;
}
@media (max-width: 1280px) {
.banner .vt-banner-text {
font-size: 14px;
}
.vt-tagline {
display: none;
}
} */
</style>
}
@media (max-width: 780px) {
.vt-tagline {
display: none;
}
.vt-coupon {
display: none;
}
.vt-primary-action {
margin: 0 10px;
padding: 5px 8px;
}
.vt-time-now {
display: none;
}
}
@media (max-width: 560px) {
.vt-place {
display: none;
}
}
</style>
2 changes: 1 addition & 1 deletion .vitepress/theme/components/SponsorsGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function track(interest?: boolean) {
}
function resolveList(data: SponsorData) {
let currentTier = data[props.tier]
let currentTier = data[props.tier] || []
// in aside, treat platinum+priority as special
if (props.placement === 'aside') {
if (props.tier === 'platinum') {
Expand Down
4 changes: 2 additions & 2 deletions .vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ 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'

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

0 comments on commit fd22cc9

Please sign in to comment.