Skip to content

Commit

Permalink
docs: add nuxt-nation banner
Browse files Browse the repository at this point in the history
  • Loading branch information
asvae committed Sep 21, 2023
1 parent 38bd9ab commit 6c36bd3
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 0 deletions.
65 changes: 65 additions & 0 deletions packages/docs/components/landing/banners/NuxtNationConference.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<template>
<div v-if="!isHiddenLocal" class="event-banner">
<a
href="https://nuxtnation.com/?utm_source=vuesticui&utm_medium=banner&utm_campaign=community"
target="_blank"
title="Nuxt Nation Conference"
>
<va-aspect-ratio
:ratio="1584/396"
:aria-hidden="true"
:max-width="1350"
>
<img
class="event-banner__img"
src="/landing/nuxtnation-event-banner.png"
alt=""
>
<div @click.prevent="hide" class="event-banner__close" />
</va-aspect-ratio>
</a>
</div>
</template>

<script setup lang="ts">
import { ref } from 'vue'
const officialPartnerCookie = useCookie('banner-closed')
const bannerName = 'vueforge-082023'
const isHiddenLocal = ref(officialPartnerCookie.value?.includes(bannerName))
const hide = () => {
isHiddenLocal.value = true
if (officialPartnerCookie.value) {
officialPartnerCookie.value += `,${bannerName}`
} else {
officialPartnerCookie.value = bannerName
}
}
</script>

<style lang="scss" scoped>
.event-banner {
position: relative;
display: flex;
justify-content: center;
background-color: #200543;
&__close {
position: absolute;
top: 30%;
right: 1%;
width: 4%;
height: 40%;
&:hover {
background-color: rgba(201, 200, 200, 0.2);
}
}
&__img {
min-width: 100%;
min-height: 100%;
}
}
</style>
1 change: 1 addition & 0 deletions packages/docs/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<div v-show="!isMobileMenuOpen">
<LandingPreview />
<LandingPartners />
<LandingBannersNuxtNationConference />
<LandingFeatures />
<LandingCustomize />
<LandingSeamlessIntegration />
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6c36bd3

Please sign in to comment.