Skip to content

Commit

Permalink
feat: a page for daily checkins
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyrremann committed Mar 2, 2024
1 parent 8868a83 commit 1035af4
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
3 changes: 3 additions & 0 deletions _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
<li class="pure-menu-item">
<a class="pure-menu-link" href="{{ '/breweries' | prepend: site.baseurl }}">Breweries</a>
</li>
<li class="pure-menu-item">
<a class="pure-menu-link" href="{{ '/checkins' | prepend: site.baseurl }}">Checkins</a>
</li>
<li class="pure-menu-item">
<a class="pure-menu-link" href="{{ '/countries' | prepend: site.baseurl }}">Countries</a>
</li>
Expand Down
54 changes: 54 additions & 0 deletions checkins.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
layout: default
---

<div class="banner">
<h1 class="banner-head">I have had beers on {{ site.data.checkins_by_day | size }} different days</h1>
</div>

<div class="l-content information">
{% assign title = site.data.beers %}
<div class="pure-u-1" id="checkins">
<!--input class="search" placeholder="Filter"-->
<table class="pure-table pure-table-striped" style="width: 100%;">
<thead>
<tr>
<th class="sort" data-sort="year">Year</th>
<th class="sort" data-sort="month" style="min-width: 2.7em;">Month</th>
<th class="sort" data-sort="day" style="min-width: 2.7em;">Day</th>
<th class="sort" data-sort="checkins" style="min-width: 2.7em;">Checkins</th>
<th class="sort" data-sort="unique_checkins" style="min-width: 2.7em;">Unique checkins</th>
</tr>
</thead>
<tbody class="list">
{% for checkin in site.data.checkins_by_day %}
<tr>
<td class="year">
{{ checkin.year }}
</td>
<td class="month">
{{ checkin.month }}
</td>
<td class="day">
{{ checkin.day }}
</td>
<td class="checkins">
{{ checkin.checkins }}
</td>
<td class="unique_checkins">
{{ checkin.unique_checkins }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>

<script>
let options = {
valueNames: [ "year", "month", "day", "checkins", "unique_checkins" ]
};

let beers = new List("checkins", options);
</script>

0 comments on commit 1035af4

Please sign in to comment.