-
Notifications
You must be signed in to change notification settings - Fork 0
/
showcase.html
27 lines (23 loc) · 936 Bytes
/
showcase.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
---
layout: default
title : Showcase
navbar_title: Showcase
---
{% assign cards_by_group = site.showcase | sort: "date" | reverse | where: "show", true | group_by_exp: "item", "item.group" %}
{% for group in cards_by_group %}
<h1>{{ group.name }}</h1>
<div class="row grid mb-4">
<div class="grid-sizer col-1"></div>
{% for item in group.items %}
{% assign width_sm = item.width | times: 2 | at_most: 12 %}
{% if width_sm > 6 %}{% assign width_sm = 12 %}{% endif %}
{% assign width_xs = item.width | times: 3 | at_most: 12 %}
{% if width_xs > 6 %}{% assign width_xs = 12 %}{% endif %}
<div class="p-2 grid-item col-md-{{ item.width | at_most: 12 }} col-sm-{{ width_sm }} col-{{ width_xs }}">
<div class="{% if item.class != null %}{{ item.class }}{% else %}card border-0 shadow-sm bg-white{% endif %}">
{{ item.content }}
</div>
</div>
{% endfor %}
</div>
{% endfor %}