arrowcounter/counter/templates/stats.html
2019-08-06 14:51:29 +02:00

38 lines
1.2 KiB
HTML

{# vim: set ts=2 sw=2 et tw=80: #}
{% extends 'base.html' %}
{% load i18n %}
{% load static %}
{% block title %}{% trans "Stats" %}{% endblock %}
{% block scripts %}
<script id="data-weekly" type="application/json">
{% autoescape off %}{{ data_weekly }}{% endautoescape %}
</script>
<script id="data-cumulative" type="application/json">
{% autoescape off %}{{ data_cumulative }}{% endautoescape %}
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.2/Chart.min.js"></script>
<script src="{% static 'js/dateformat.js' %}?v=2"></script>
<script src="{% static 'js/weeklystats.js' %}?v=2"></script>
{% endblock %}
{% block content %}
<h1 class="center">{% trans "Stats" %}</h1>
<div class="card-panel">
<h4 class="center chart-title">{% trans "Arrows shot by week" %}</h4>
<div class="chart scrollable wrapper">
<div class="chart area-wrapper">
<canvas id="chart-weekly"></canvas>
</div>
</div>
</div>
<div class="card-panel">
<h4 class="center chart-title">{% trans "Arrows shot this year" %}</h4>
<div class="chart wrapper">
<canvas id="chart-cumulative"></canvas>
</div>
</div>
{% endblock %}