Advanced event types

This commit is contained in:
2019-10-17 20:35:18 +02:00
parent d6d0d0fcbb
commit ad3b216a0d
9 changed files with 151 additions and 38 deletions

View File

@@ -14,7 +14,8 @@
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
{% endblock %}
{% block body %}
<div class="content">
{% block navbar %}
{% set nav_bar = [
('/season', 'seasons', 'Seasons', 'fas fa-calendar'),
@@ -22,7 +23,7 @@
('/enemy', 'enemies', 'Enemies', 'fas fa-skull-crossbones'),
('/drink', 'drinks', 'Drinks', 'fas fa-beer')
]-%}
<div class="container">
<div class="container nav-container">
<nav class="navbar navbar-expand-lg bg-dark navbar-dark">
<a class="navbar-brand">
@@ -56,13 +57,14 @@
{% block content %}
<div class="container">
{% block page %}
{% endblock %}
<div>
{% block footer %}
&copy; Sauf Software by D⁵: <a href="#">Durstiger Donnerstag Digital Drinking Divison</a>.
{% endblock %}
</div>
</div>
{% endblock %}
</div>
{% endblock %}
</div>
<div class="container footer">&copy; Sauf Software by D⁵: <a href="#">Durstiger Donnerstag Digital Drinking Divison</a>.</div>
{% endblock %}

View File

@@ -19,6 +19,7 @@
<th scope="col" class="col-sm-auto text-center">Name</th>
<th scope="col" class="col-sm-auto text-center">Season</th>
<th scope="col" class="col-sm-auto text-center">Boss Enemy</th>
<th scope="col" class="col-sm-auto text-center">Defeated</th>
{% if g.is_editor %}
<th scope="col" class="col-sm-auto text-center">Editor</th>
@@ -32,7 +33,12 @@
<td class="col-sm-auto text-center">{{ enemy.season.game }}</td>
<td class="col-sm-auto text-center">
{% if enemy.boss %}
<span class="fas fa-check"></span>
<i class="fas fa-check"></i>
{% endif %}
</td>
<td class="col-sm-auto text-center">
{% if enemy.is_defeated %}
<i class="fas fa-check"></i>
{% endif %}
</td>

View File

@@ -17,7 +17,7 @@
{% endif %}
<div class="row">
<div class="col-sm-6">
<div class="col-sm-4">
<!--region Info Card-->
@@ -46,7 +46,7 @@
</li>
<li class="list-group-item">
<span class="font-weight-bold">Enemies Defeated:</span>
{{ 0 }}
{{ model.victories|length or 0 }}
</li>
<li class="list-group-item">
<span class="font-weight-bold">Deaths:</span>
@@ -59,8 +59,6 @@
<!--endregion-->
<hr>
<!--region Player Card-->
<div class="card">
@@ -72,12 +70,14 @@
<thead>
<tr>
<th scope="col" class="col-sm-auto text-center">Name</th>
<th scope="col" class="col-sm-auto text-center">Playtime</th>
</tr>
</thead>
<tbody>
{% for player in model.players %}
<tr>
<td class="col-sm-auto text-center">{{ player.name }}</td>
<td class="col-sm-auto text-center">{{ "0m" }}</td>
</tr>
{% endfor %}
</tbody>
@@ -89,7 +89,7 @@
</div>
<div class="col-sm-6">
<div class="col-sm-8">
<!--region Deaths Card-->
@@ -130,6 +130,45 @@
<!--endregion-->
<!--region Victories Card-->
<div class="card">
<div class="card-header text-center">
Victories
</div>
<div class="card-body">
{% if model.victories %}
<table class="table table-striped table-bordered">
<thead>
<tr>
<th scope="col" class="col-xs-auto text-center">Time</th>
<th scope="col" class="col-xs text-center">Enemy</th>
<th scope="col" class="col-xs text-center">Player</th>
</tr>
</thead>
<tbody>
{% for entry in model.victories %}
<tr>
<td class="col-xs-auto text-center">{{ entry.time|format_time }}</td>
<td class="col-xs text-center">{{ entry.enemy.name }}</td>
<td class="col-xs text-center">{{ entry.player.name }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<div class="alert alert-info">No Enemies were defeated</div>
{% endif %}
</div>
</div>
<!--endregion-->
</div>
</div>
{% endblock %}