Created
September 20, 2021 19:17
-
-
Save frecklebit/8100f5387f498e58352e8fb79ecb6c90 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script lang="ts"> | |
import { Vue, Prop, Component } from 'vue-property-decorator'; | |
import { VCard, VImg } from 'vuetify/lib/components'; | |
import type { HeroBanner, OverlayContent } from '../Hero.d'; | |
import Overlay from '../components/HeroOverlay.ts.vue'; | |
@Component({ | |
components: { | |
VCard, | |
VImg, | |
Overlay, | |
}, | |
}) | |
export default class VariationOne extends Vue { | |
@Prop({ | |
required: true, | |
}) | |
readonly content: HeroBanner; | |
get overlayContent(): OverlayContent { | |
const { | |
heroText, | |
heroSubtitle, | |
calloutLink, | |
} = this.content; | |
return { | |
heroText, | |
heroSubtitle, | |
calloutLink, | |
}; | |
} | |
} | |
</script> | |
<template> | |
<VCard | |
class="Hero--variation1" | |
:elevation="2" | |
> | |
<VImg | |
v-if="content.calloutImage" | |
class="Hero--variation1__background" | |
:alt="content.calloutImage.imageAlt" | |
:lazy-src="content.calloutImage.imageLink" | |
:src="content.calloutImage.imageLink" | |
gradient="rgba(51, 51, 51, .70), rgba(51, 51, 51, .70)" | |
height="400px" | |
width="100%" | |
/> | |
<Overlay | |
:background="true" | |
:overlay-content="overlayContent" | |
/> | |
</VCard> | |
</template> | |
<style lang="scss"> | |
.Hero--variation1 { | |
background-color: $color-gray-20; | |
position: relative; | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment