Skip to content

Commit

Permalink
remove banner (#1378)
Browse files Browse the repository at this point in the history
Co-authored-by: Evan You <[email protected]>
  • Loading branch information
jay-es and yyx990803 committed May 24, 2023
1 parent 448e39c commit 2e2ef29
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .vitepress/inlined-scripts/restorePreference.js
Expand Up @@ -8,6 +8,6 @@
restore('vue-docs-prefer-composition', 'prefer-composition')
restore('vue-docs-prefer-sfc', 'prefer-sfc', true)

window.__VUE_BANNER_ID__ = 'mid-2023-conf-promo'
restore(`vue-docs-banner-${__VUE_BANNER_ID__}`, 'banner-dismissed')
// window.__VUE_BANNER_ID__ = ''
// restore(`vue-docs-banner-${__VUE_BANNER_ID__}`, 'banner-dismissed')
})()
8 changes: 3 additions & 5 deletions .vitepress/theme/components/Banner.vue
Expand Up @@ -22,9 +22,7 @@ function dismiss() {

<template>
<div class="banner" v-if="open">
<a href="http://vueconf.us/" target="_blank"
><span>Upcoming: </span>VueConf US - New Orleans - May 24-26</a
>
<a target="_blank"></a>
<button @click="dismiss">
<VTIconPlus class="close" />
</button>
Expand Down Expand Up @@ -81,10 +79,10 @@ button {
fill: #fff;
transform: rotate(45deg);
}
/*
@media (max-width: 720px) {
a > span {
display: none;
}
}
} */
</style>
4 changes: 2 additions & 2 deletions .vitepress/theme/index.ts
Expand Up @@ -9,14 +9,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),
'aside-mid': () => h(SponsorsAside)
})
Expand Down

1 comment on commit 2e2ef29

@vercel
Copy link

@vercel vercel bot commented on 2e2ef29 May 24, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.