<div class="grid-item">
<a class="grid-item__link" href="#">
<div class="grid-item__container">
<div class="grid-item__background-image" style="background: url(../../assets/images/indexing-bg.jpg) no-repeat scroll center center/cover;"></div>
<div class="grid-item__filter"></div>
<div class="grid-item__content">
<h4 class="grid-item__content__title"><span>New Era in Indexing</span></h4>
<div class="grid-item__content__btn"><span class="btn--transparent">Read more</span></div>
</div>
</div>
</a>
</div>
<div class="grid-item">
<a class="grid-item__link{% if overlay_image %} lightbox_trigger{% endif %}" {% if overlay_image %} data-modal-open= modal-{{ id }}{% endif %} href="{% if overlay_image %}{{ overlay_image.img_src }}{% else %}{{ link.url }}{% endif %}">
<div class="grid-item__container">
<div class="grid-item__background-image" style="background: url({{ background_image }}) no-repeat scroll center center/cover;"></div>
<div class="grid-item__filter"></div>
<div class="grid-item__content">
{% if style == "square__big" %}
{% if image %}
{% else %}
<h2 class="h1 grid-item__content__title">{{ title }}</h2>
{% endif %}
{% else %}
{% if image %}
<img class="grid-item__content__image" src="{{ image }}">
{% else %}
{% if category %}
<div class="grid-item__content--top">
{% if category %}<div class="grid-item__category">{{ category }}</div> {% endif %}
{% if label %}
<div class="grid-item__label">
{% if label == "Trending" %}
<svg class="icon">
<use xlink:href="/assets/sprites/icons.svg#ico-trending"></use>
</svg>
{% endif %}
<span>
{{ label }}
</span>
</div>
{% endif %}
</div>
{% endif %}
<h4 class="grid-item__content__title"><span>{{ title }}</span></h4>
{% endif %}
{% endif %}
{% if text %}
<h5 class="grid-item__content__text">{{ text }}</h5>
{% endif %}
{% if link %}<div class="grid-item__content__btn"><span class="btn--transparent">{{ link.text }}</span></div> {% endif %}
{% if tag %}
<div class="grid-item__content--bottom">
{% if tag %}<div class="grid-item__tag">#{{ tag }}</div> {% endif %}
{% if date %}<div class="grid-item__date">{{ date }}</div> {% endif %}
</div>
{% endif %}
</div>
</div>
</a>
{% if overlay_image %}
<div data-modal= modal-{{ id }} class="lightbox">
<div class="modal__close" data-modal-close="modal-{{ id }}"><span></span>
</div>
<div class="lightbox__content">
<img src="{{ overlay_image.img_src }}">
</div>
</div>
{% endif %}
</div>
{
"title": "New Era in Indexing",
"background_image": "../../assets/images/indexing-bg.jpg",
"id": null,
"link": {
"text": "Read more",
"url": "#"
},
"style": "square",
"align": "center",
"vertical_align": "center",
"filter": "radial"
}
.grid-item {
background-color: $gray-light;
background-position: center;
background-size: cover;
position: relative;
height: 100%;
width: 100%;
overflow: hidden;
.overlay-image {
display: none;
}
&__background-image {
width: 100%;
height: 100%;
position: absolute;
transition: all 2s ease-out;
}
&__container {
display: flex;
height: 100%;
width: 100%;
}
&__filter {
height: 100%;
opacity: .9;
position: absolute;
width: 100%;
&.filter--radial {
background: radial-gradient(transparent, rgba(0, 0, 0, 0.9));
}
&.filter--linear {
background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
}
}
&__tag,
&__category,
&__date {
font-size: $font-size-sm;
}
&__tag {
color: $gray;
}
&__label {
padding: $space-xxs $space-xs;
background-color: #F9B86A;
color: $white;
text-transform: uppercase;
font-size: $font-size-xxs;
.icon {
fill: $white;
height: .75rem;
width: .75rem;
}
& > * {
display: inline-block;
vertical-align: bottom;
}
}
&__category {
text-transform: uppercase;
}
a:hover {
.grid-item__background-image {
transform: scale(1.09);
}
.grid-item__content__title {
transform: scale(.95);
}
.grid-item__content__text {
transform: scale(1.02);
}
}
&__content {
width:100%;
z-index: 1;
color: $white;
display: flex;
flex-direction: column;
justify-content: space-between;
padding: $space-xl;
&--top {
display: flex;
justify-content: space-between;
}
&--bottom {
display: flex;
justify-content: space-between;
}
@include mq($breakpoint-lg) {
padding: $space-xxl $space-xl;
}
&__title {
flex: 3 1 auto;
display: flex;
align-items: flex-end;
span {
width: 100%;
}
}
&__title,
&__text {
font-weight: $font-weight-light;
margin-top: 0;
padding-bottom: $space-lg;
transition: all 0.6s ease-out;
transform-origin: left;
@include mq-only($breakpoint-mob) {
padding-bottom: 0;
}
}
h2 {
@include mq-only($breakpoint-mob) {
font-size: 1.8rem;
}
}
&__image {
display: block;
margin: 0 auto;
padding-bottom: $space-xxl;
width: 80%;
}
.btn {
@include mq-only($breakpoint-mob) {
display: none;
}
}
}
}
There are no notes for this item.