summaryrefslogtreecommitdiff
path: root/templates/_history_months.html.ep
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-04-07 18:44:33 +0200
committerDaniel Friesel <derf@finalrewind.org>2019-04-07 18:44:33 +0200
commitffee7177ac26f4e79227cdf0abcd83f80f34faa4 (patch)
tree9232d785b19f5e10239be0c20ca55bcc60062700 /templates/_history_months.html.ep
parent828dd54266dfaf2b58c0498b7ced6c06d6e104ef (diff)
Refactor history template, add yearly stats
Diffstat (limited to 'templates/_history_months.html.ep')
-rw-r--r--templates/_history_months.html.ep12
1 files changed, 12 insertions, 0 deletions
diff --git a/templates/_history_months.html.ep b/templates/_history_months.html.ep
new file mode 100644
index 0000000..465a159
--- /dev/null
+++ b/templates/_history_months.html.ep
@@ -0,0 +1,12 @@
+<div class="row">
+ <div class="col s12">
+ <ul class="pagination">
+ % while ($since < $now) {
+ % my $link_to = $since->strftime('%Y/%m');
+ % my $class = $link_to eq $current ? 'active' : 'waves-effect';
+ <li class="<%= $class %>"><a href="/history/<%= $link_to %>"><%= $since->strftime('%m.%Y') %></a></li>
+ % $since->add(months => 1)->set(day => 1, hour => 0, minute => 0, second => 0);
+ % }
+ </ul>
+ </div>
+</div>