Add option for alignment, image, toggle CTA buttons
This commit is contained in:
parent
f51df87c25
commit
e868695b96
1 changed files with 34 additions and 14 deletions
|
@ -2,42 +2,62 @@
|
|||
const {
|
||||
Title,
|
||||
Description,
|
||||
CallToAction,
|
||||
CallToAction_Primary,
|
||||
CallToAction_Secondary,
|
||||
CallToAction_Primary_Text,
|
||||
CallToAction_Primary_Link,
|
||||
CallToAction_Secondary_Text,
|
||||
CallToAction_Secondary_Link
|
||||
CallToAction_Secondary_Link,
|
||||
Alignment,
|
||||
Image
|
||||
} = Astro.props
|
||||
|
||||
if (Alignment === 'left') {
|
||||
var AlignmentIsLeft = true
|
||||
}
|
||||
---
|
||||
|
||||
<div class="hero">
|
||||
<div style={'justify-content: ' + Alignment + '; text-align: ' + Alignment + '; background: url("' + Image + '")' } class="hero">
|
||||
<div class="hero-content">
|
||||
<h2>{Title}</h2>
|
||||
<p>{Description}</p>
|
||||
{CallToAction ?
|
||||
<div class="call-to-actions">
|
||||
{CallToAction_Primary ?
|
||||
<a class="call-to-action" href={CallToAction_Primary_Link}>{CallToAction_Primary_Text}</a>
|
||||
:
|
||||
null
|
||||
}
|
||||
{CallToAction_Secondary ?
|
||||
<a id="secondary" class="call-to-action" href={CallToAction_Secondary_Link}>{CallToAction_Secondary_Text}</a>
|
||||
</div>
|
||||
:
|
||||
null
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{AlignmentIsLeft ?
|
||||
<style lang="scss">
|
||||
.hero {
|
||||
padding-left: 60px;
|
||||
h2 {
|
||||
margin: 0px !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
:
|
||||
null
|
||||
}
|
||||
|
||||
<style lang="scss">
|
||||
.hero {
|
||||
background: url(/images/banners/Hero-Games.png);
|
||||
background-position: top;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
min-height: 500px;
|
||||
border-radius: 10px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
margin-top: -24px;
|
||||
margin-top: 0px;
|
||||
.hero-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
|
Reference in a new issue