arrowcounter/counter/templates/index.html

35 lines
1.3 KiB
HTML

{% extends 'base.html' %}
{# vim: set ts=2 sw=2 et tw=80: #}
{% block title %}Home{% endblock %}
{% block content %}
<h1 class="center">Arrow counter</h1>
<h5 class="center">A simple online arrow counter</h5>
{% if user.is_authenticated %}
<p class="center" style="margin-bottom: 3rem">
<a class="btn waves-effect waves-light" href="{% url "count_export" %}">
Excel Data (CSV) <i class="material-icons right">file_download</i>
</a>
</p>
<div class="card-panel grey lighten-2">
<h5 class="center">Arrows shot this year:</h5>
<p class="center"><strong style="font-size: 2.7rem">{{ yearArrows }}</strong></p>
</div>
{% if diffTarget is not False %}
<div class="card-panel lighten-2 {% if diffTarget < 0 %}red{% elif diffTarget is 0 %}yellow
{% else %}green{% endif %}">
<h5 class="center">Difference with target:</h5>
<p class="center"><strong style="font-size: 2.7rem">{{ diffTarget }}</strong></p>
</div>
{% endif %}
<div class="card-panel grey lighten-2">
<h5 class="center">Arrows shot this month:</h5>
<p class="center"><strong style="font-size: 2.7rem">{{ monthArrows }}</strong></p>
</div>
<div class="card-panel grey lighten-2">
<h5 class="center">Arrows shot this week:</h5>
<p class="center"><strong style="font-size: 2.7rem">{{ weekArrows }}</strong></p>
</div>
{% endif %}
{% endblock %}