-
Notifications
You must be signed in to change notification settings - Fork 113
/
Copy pathshowcase.html
31 lines (29 loc) · 1.04 KB
/
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
28
29
30
31
---
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 %}
{% if item.width >= 4 -%}
{%- assign width_sm = 12 -%}
{%- assign width_xs = 12 -%}
{%- elsif item.width >= 2 -%}
{%- assign width_sm = 6 -%}
{%- assign width_xs = 6 -%}
{%- else -%}
{%- assign width_sm = item.width | times: 2 | at_most: 12 -%}
{%- assign width_xs = item.width | times: 2 | at_most: 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 %}