Skip to content
Snippets Groups Projects
Verified Commit 85261405 authored by Huste, Tobias's avatar Huste, Tobias
Browse files

Redesign events on the frontpage

parent 4e5e1c93
Branches
No related tags found
3 merge requests!203WIP: Test MR,!192Improve layout of cards on frontpage,!177HIFIS unified step 1
{%- comment -%}
This is a card displaying event title and date.
Parameters:
event: The event which sould be displayed on the card
{%- endcomment -%}
<div class="card bg-light">
<div class="card-body card-overlay">
<div class="card-title">
<span class="badge badge-secondary">
<i class="fas fa-calendar-day" aria-hidden="true"></i>
{{ include.event.date | date: "%d.&thinsp;%b.&thinsp;%y" }}
</span>
<span class="badge badge-secondary">
<i class="fas fa-tag" aria-hidden="true"></i>
{{ include.event.type | capitalize }}
</span>
</div>
<div class="card-text">
<a href="{{ include.event.url | relative_url }}" class="stretched-link">
<h4>{{ include.event.title }}</h4>
</a>
</div>
</div>
</div>
{% if include.image_path %} {% if include.image_path %}
{% assign image_path = site.directory.images | append: include.image_path %} {% assign image_path = site.directory.images | append: include.image_path %}
{% assign url = include.url %} {% assign url = include.url %}
......
...@@ -27,8 +27,7 @@ ...@@ -27,8 +27,7 @@
{% else %} {% else %}
{% assign has_upcoming_events = true %} {% assign has_upcoming_events = true %}
{% endif %} {% endif %}
{% include frontpage/event-card.html {% include cards/event_card.html event = event %}
title = event.excerpt %}
{% assign events_counter = events_counter|plus:1 %} {% assign events_counter = events_counter|plus:1 %}
{% if events_counter >= 3 %} {% if events_counter >= 3 %}
{% break %} {% break %}
......
...@@ -12,8 +12,9 @@ ...@@ -12,8 +12,9 @@
.card { .card {
@include drop-shadow; @include drop-shadow;
width: 13rem; width: 12rem;
margin: 0.5rem; margin: 0.5rem;
height: 9rem;
.badge { .badge {
@include drop-shadow( @include drop-shadow(
...@@ -22,6 +23,12 @@ ...@@ -22,6 +23,12 @@
$color: rgba(black, 0.25) $color: rgba(black, 0.25)
); );
} }
.card-overlay {
display: flex;
flex-direction: column;
justify-content: flex-start;
}
} }
.card-body { .card-body {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment