<a class="navigation-tile" href="/">
<div class="navigation-tile__bg-image-only" style="background-image: url(/assets/example-content/tile-background.jpg);"></div>
</a>
No notes defined.
{
"title": "Latest News",
"link": "/",
"alttext": "Football Image",
"without-text": "true"
}
.navigation-tile {
position: relative;
width: 14.8rem;
height: 9rem;
border-radius: 0.4rem;
cursor: pointer;
overflow: hidden;
display: flex;
flex-direction: column;
text-decoration: none;
&:hover {
background: #fff;
color: #011e41;
border-radius: 0.4rem;
border-bottom: 0.1rem solid #fff;
}
&__bg-image-only {
width: 14.8rem;
height: 9rem;
border-radius: 0.4rem;
background-position: center;
background-size: cover;
-webkit-transition: 0.5s ease;
-moz-transition: 0.5s ease;
transition: 0.5s ease;
&:hover {
-webkit-transform: scale(1.2);
-moz-transform: scale(1.2);
transform: scale(1.2);
}
}
&__bg-image {
position: relative;
width: 14.8rem;
height: 9rem;
display: flex;
align-items: center;
text-align: center;
justify-content: center;
background-position: center;
background-size: cover;
border-radius: 0.4rem;
&::before {
background-color: #011e41;
content: '';
display: block;
height: 100%;
position: absolute;
width: 100%;
opacity: 0.9;
border-radius: 0.4rem;
}
}
&:focus .navigation-tile__bg-image::before {
opacity: 0.5;
transition: all 0.5s;
}
&:hover .navigation-tile__bg-image::before {
opacity: 0.5;
transition: all 0.5s;
}
&__title {
font-family: var(--brand-heading--font-family);
font-style: italic;
font-weight: 400;
font-size: 2rem;
line-height: 2.2rem;
letter-spacing: 0.02em;
color: $white;
height: 4.8rem;
text-transform: uppercase;
overflow: hidden;
justify-content: center;
display: grid;
align-items: center;
z-index: 1;
overflow-wrap: anywhere;
text-align: center;
position: absolute;
top: 50%;
transform: translateY(-50%);
width: 100%;
padding: 0 2rem;
abbr {
text-decoration: none;
}
}
@media screen and (min-width: $mq-medium) {
width: 18.8rem;
height: 10.4rem;
flex-direction: initial;
&__bg-image-only {
width: 18.8rem;
height: 10.4rem;
}
&__bg-image {
width: 18.8rem;
height: 10.4rem;
}
&__title {
font-size: 2.2rem;
line-height: 2.4rem;
}
}
}
[data-brand='mens'],
[data-brand='womens'] {
.navigation-tile {
&__title {
font-size: 2.4rem;
letter-spacing: 0.08em;
font-style: normal;
}
@media screen and (min-width: $mq-medium) {
&__title {
font-size: 3.2rem;
line-height: 2.8rem;
height: 5.8rem;
}
}
}
}
.navigation-tile:focus .navigation-tile__title {
text-decoration: underline;
transition: all 0.5s;
}
.navigation-tile:hover .navigation-tile__title {
text-decoration: underline;
transition: all 0.5s;
}
<a class="navigation-tile" href="{{link}}">
{{#if without-text}}
<div class="navigation-tile__bg-image-only" style="background-image: url(/assets/example-content/tile-background.jpg);"></div>
{{/if}}
{{#unless without-text}}
<div class="navigation-tile__bg-image" style="background-image: url(/assets/example-content/tile-background-text.jpg);"></div>
<div class="navigation-tile__title">{{title}}</div>
{{/unless}}
</a>