Skip to content
Merged
Changes from all commits
Commits
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
19 changes: 11 additions & 8 deletions packages/docs/.vitepress/theme/components/MadVueBanner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { ref, onMounted } from 'vue'

const isVisible = ref(false)
const nameStorage = 'MADVUE-BANNER-MARCH-2025'
const nameStorage = 'MADVUE-BANNER-MARCH-25'
const target = 'https://madvue.es/?utm_source=vue-router&utm_content=top_banner'

function closeBanner() {
Expand All @@ -18,14 +18,17 @@ onMounted(() => {
return
}

const keys = Object.keys(localStorage).filter(
key => key.includes('FREEWEEKEND25') && key.endsWith('_CLOSED')
)
document.documentElement.classList.add('has-banner')
isVisible.value = true

if (keys.length > 0 && keys.every(key => localStorage.getItem(key) != null)) {
isVisible.value = true
document.documentElement.classList.add('has-banner')
}
// const keys = Object.keys(localStorage).filter(
// key => key.includes('FREEWEEKEND25') && key.endsWith('_CLOSED')
// )

// if (keys.length > 0 && keys.every(key => localStorage.getItem(key) != null)) {
// isVisible.value = true
// document.documentElement.classList.add('has-banner')
// }
})
</script>

Expand Down