forked from mondaynightskippys/mondaynightskippys.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtwitchers.html
More file actions
34 lines (31 loc) · 957 Bytes
/
Copy pathtwitchers.html
File metadata and controls
34 lines (31 loc) · 957 Bytes
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
32
33
34
---
layout: default
title: Twitch Streamers
---
<h1>{{ page.title }}</h1>
{% assign total = site.data.twitchers | size %}
{% assign columns = 2 %}
{% assign rows = total | divided_by: columns %}
{% assign remainder = total | modulo: columns %}
<!-- {{ total }} -->
<!-- {{ columns }} -->
<!-- {{ rows }} -->
<!-- {{ remainder }} -->
{% assign rows = rows | plus: remainder %}
{% assign index = 0 %}
{% for row in (1..rows) %}
<div class="card-deck mt-3">
{% for column in (1..columns) %}
{% assign twitcher = site.data.twitchers[index] %}
<div class="card">
<h5 class="card-header">{{ twitcher.name }}</h5>
<div class="card-body embed-responsive embed-responsive-16by9">
{% if twitcher %}
<iframe class="embed-responsive-item" src="https://player.twitch.tv/?channel={{ twitcher.channel }}" allowfullscreen></iframe>
{% endif %}
</div>
</div>
{% assign index = index | plus: 1 %}
{% endfor %}
</div>
{% endfor %}