<div class="banner">
<div class="shallow-hero shallow-hero--overlay">
<picture>
<source media="(max-width: 430px)" srcset="/assets/example-content/England_squad_provisional.png">
<source media="(min-width: 431px)" srcset="/assets/example-content/squad-page-1440.png">
<img src="/assets/example-content/squad-page-1440.png" alt="background_image">
</picture>
<div class="shallow-hero__overlay">
<h3 class="shallow-hero__title">Information Page Hero Long Title</h3>
<div class="shallow-hero__description">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua</div>
<a class="shallow-hero__button" href="#">Find Disability Football Near You</a>
</div>
</div>
</div>
No notes defined.
{
"smallimage": "/assets/example-content/England_squad_provisional.png",
"bigimage": "/assets/example-content/squad-page-1440.png",
"title": "Information Page Hero Long Title",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua",
"button": "Find Disability Football Near You",
"modifier": "overlay"
}
.shallow-hero {
position: relative;
border-radius: 0.8rem;
display: block;
text-decoration: none;
&__img {
object-fit: cover;
object-position: center;
width: 100%;
height: 48.8rem !important;
}
&--overlay {
&::after {
background: linear-gradient(
180deg,
rgba(0, 0, 0, 0) 45.31%,
rgba(1, 30, 65, 0.34) 68.68%,
$blue 94.79%
);
bottom: 0;
content: '';
display: block;
height: 100%;
top: 0;
width: 100%;
position: absolute;
border-radius: 0 0 0.8rem 0.8rem;
z-index: 0;
}
}
&__overlay {
position: absolute;
display: flex;
flex-direction: column;
bottom: 8.2rem;
width: 100%;
max-width: 52rem;
left: 0;
right: 0;
margin: 0 auto;
padding: 0 1.7rem;
z-index: 10;
}
&__title {
font-family: var(--brand-text--font-family);
font-style: italic;
font-weight: bold;
font-size: var(--brand-heading-4--font-size);
line-height: var(--brand-heading-4--line-height);
text-align: center;
letter-spacing: -0.02em;
color: $white;
text-shadow: 0 0.1rem 0.6rem rgba(0, 0, 0, 0.2);
order: 0;
flex-grow: 0;
margin-bottom: 1rem;
}
&__description {
@include text-m;
font-family: var(--brand-text--font-family);
text-align: center;
color: $white;
flex: none;
order: 1;
flex-grow: 0;
margin-bottom: 1.6rem;
}
&__button {
display: flex;
font-family: var(--brand-text--font-family);
justify-content: center;
align-items: center;
width: 29.1rem;
height: 4.4rem;
background-color: $red;
border-radius: 0.2rem;
order: 2;
margin: 0 auto;
color: $white;
letter-spacing: 0.01em;
text-transform: uppercase;
font-size: 1.4rem;
text-decoration: none;
transition: background-color 0.2s ease-in;
&:hover {
background-color: var(--brand-tertiary);
color: var(--brand-secondary);
}
}
@media screen and (min-width: $mq-medium) {
&__img {
height: 56.1rem !important;
}
&__overlay {
bottom: 8.6rem;
left: 21.3rem;
margin: 0;
max-width: 61rem;
padding: 0;
}
&__title {
font-size: 7.8rem;
line-height: 6.8rem;
display: flex;
align-items: flex-end;
text-align: inherit;
margin-bottom: 1.6rem;
}
&__description {
text-align: inherit;
}
&__button {
margin: 0;
width: 30.3rem;
}
}
@media screen and (min-width: 820px) and (max-width: 1200px) {
&__overlay {
left: 8.3rem;
}
}
}
<div class="banner">
<div class="shallow-hero {{#if modifier}}shallow-hero--{{modifier}}{{/if}}">
<picture>
<source media="(max-width: 430px)" srcset="{{smallimage}}">
<source media="(min-width: 431px)" srcset="{{bigimage}}">
<img src="{{bigimage}}" alt="background_image">
</picture>
<div class="shallow-hero__overlay">
<h3 class="shallow-hero__title">{{title}}</h3>
<div class="shallow-hero__description">{{description}}</div>
<a class="shallow-hero__button" href="#">{{button}}</a>
</div>
</div>
</div>