Many frontend improvements
All checks were successful
Build Formula10 Docker Image / build-docker (push) Successful in 14s
All checks were successful
Build Formula10 Docker Image / build-docker (push) Successful in 14s
This commit is contained in:
@ -7,18 +7,32 @@
|
||||
{% block body %}
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Leaderboard</h5>
|
||||
<h6 class="card-subtitle">Points only include race picks</h6>
|
||||
<div class="card-header">
|
||||
Note
|
||||
</div>
|
||||
|
||||
<table class="table table-bordered table-sm table-responsive mt-3">
|
||||
<div class="card-body">
|
||||
Points only include race picks.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mt-2">
|
||||
<div class="card-header">
|
||||
Leaderboard
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="d-inline-block overflow-x-scroll w-100">
|
||||
<table class="table table-bordered table-sm table-responsive">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="text-center" style="min-width: 50px;">Place</th>
|
||||
<th scope="col" class="text-center" style="min-width: 50px;">User</th>
|
||||
<th scope="col" class="text-center" style="min-width: 100px;">Points</th>
|
||||
<th scope="col" class="text-center" style="min-width: 100px;">Total picks</th>
|
||||
<th scope="col" class="text-center" style="min-width: 100px;" data-bs-toggle="tooltip" title="Any points count as correct">Correct picks</th>
|
||||
<th scope="col" class="text-center" style="min-width: 100px;" data-bs-toggle="tooltip"
|
||||
title="Any points count as correct">Correct picks
|
||||
</th>
|
||||
<th scope="col" class="text-center" style="min-width: 100px;">Points per pick</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -39,6 +53,7 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# <div class="card mt-2">#}
|
||||
{# <div class="card-body">#}
|
||||
|
@ -14,7 +14,10 @@
|
||||
|
||||
{% block body %}
|
||||
|
||||
{# Put table in this div to make right padding work #}
|
||||
<div class="d-inline-block overflow-x-scroll w-100">
|
||||
<table class="table table-bordered table-sm table-responsive shadow-sm">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" rowspan="2" class="text-center" style="width: 125px;">Race</th>
|
||||
@ -35,11 +38,14 @@
|
||||
|
||||
{# Link should only be visible if all users are visible #}
|
||||
{% if model.active_user is not none %}
|
||||
<td class="text-center text-nowrap" style="min-width: 100px;">{{ model.active_user.name }} ({{ points.total_points_by(model.active_user.name) }})</td>
|
||||
<td class="text-center text-nowrap" style="min-width: 100px;">{{ model.active_user.name }}
|
||||
({{ points.total_points_by(model.active_user.name) }})
|
||||
</td>
|
||||
{% else %}
|
||||
{% for user in model.all_users() %}
|
||||
<td class="text-center text-nowrap" style="min-width: 100px;">
|
||||
<a href="/race/{{ user.name_sanitized }}" class="link-dark">{{ user.name }} ({{ points.total_points_by(user.name) }})</a>
|
||||
<a href="/race/{{ user.name_sanitized }}" class="link-dark">{{ user.name }}
|
||||
({{ points.total_points_by(user.name) }})</a>
|
||||
</td>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
@ -193,5 +199,6 @@
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{% endblock body %}
|
@ -42,15 +42,16 @@
|
||||
|
||||
{% block body %}
|
||||
|
||||
<div class="grid" style="grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));">
|
||||
<div class="grid" style="grid-template-columns: repeat(auto-fit, minmax(325px, 1fr)); grid-row-gap: 0; grid-column-gap: 8px;">
|
||||
|
||||
<div class="card shadow-sm" style="width: 450px;">
|
||||
<div class="card-body">
|
||||
|
||||
<h5 class="card-title">
|
||||
<div class="card shadow-sm mb-2" style="max-width: 450px;">
|
||||
<div class="card-header">
|
||||
{{ model.active_result_race_name_or_current_race_name() }}
|
||||
</h5>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="d-inline-block overflow-x-scroll w-100">
|
||||
<div style="width: 410px;">
|
||||
{% set race_result_open=model.race_result_open(model.active_result_race_name_or_current_race_name()) %}
|
||||
{% if race_result_open == true %}
|
||||
{% set action_save_href = "/result-enter/" ~ model.active_result_race_name_or_current_race_name_sanitized() %}
|
||||
@ -70,13 +71,15 @@
|
||||
<ul id="columns" class="list-group list-group-flush d-inline-block float-end">
|
||||
|
||||
{% for driver in model.all_drivers_or_active_result_standing_drivers() %}
|
||||
<li class="list-group-item {% if race_result_open == true %}column{% endif %} p-1" {% if race_result_open == true %}draggable="true"{% endif %}>
|
||||
<li class="list-group-item {% if race_result_open == true %}column{% endif %} p-1"
|
||||
{% if race_result_open == true %}draggable="true"{% endif %}>
|
||||
{{ driver.name }}
|
||||
|
||||
<div class="d-inline-block float-end" style="margin-left: 30px;">
|
||||
{# Driver DNFed at first #}
|
||||
<div class="form-check form-check-reverse d-inline-block">
|
||||
<input type="checkbox" class="form-check-input" value="{{ driver.name }}"
|
||||
<input type="checkbox" class="form-check-input"
|
||||
value="{{ driver.name }}"
|
||||
id="first-dnf-{{ driver.name }}" name="first-dnf-drivers"
|
||||
{% if (model.active_result is not none) and (driver in model.active_result.initial_dnf) %}checked{% endif %}
|
||||
{% if race_result_open == false %}readonly="readonly"{% endif %}>
|
||||
@ -86,7 +89,8 @@
|
||||
|
||||
{# Driver DNFed #}
|
||||
<div class="form-check form-check-reverse d-inline-block mx-2">
|
||||
<input type="checkbox" class="form-check-input" value="{{ driver.name }}"
|
||||
<input type="checkbox" class="form-check-input"
|
||||
value="{{ driver.name }}"
|
||||
id="dnf-{{ driver.name }}" name="dnf-drivers"
|
||||
{% if (model.active_result is not none) and (driver in model.active_result.all_dnfs) %}checked{% endif %}
|
||||
{% if race_result_open == false %}readonly="readonly"{% endif %}>
|
||||
@ -96,7 +100,8 @@
|
||||
|
||||
{# Driver Excluded #}
|
||||
<div class="form-check form-check-reverse d-inline-block">
|
||||
<input type="checkbox" class="form-check-input" value="{{ driver.name }}"
|
||||
<input type="checkbox" class="form-check-input"
|
||||
value="{{ driver.name }}"
|
||||
id="exclude-{{ driver.name }}" name="excluded-drivers"
|
||||
{% if (model.active_result is not none) and (driver in model.active_result.standing_exclusions) %}checked{% endif %}
|
||||
{% if race_result_open == false %}readonly="readonly"{% endif %}>
|
||||
@ -115,7 +120,8 @@
|
||||
<input type="submit" class="btn btn-danger mt-2 w-100" value="Save"
|
||||
{% if race_result_open == false %}disabled="disabled"{% endif %}>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -5,10 +5,12 @@
|
||||
{% set active_page = "/rules" %}
|
||||
|
||||
{% block body %}
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Format</h5>
|
||||
<div class="card mb-2">
|
||||
<div class="card-header">
|
||||
Format
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<p>
|
||||
Das Tippspiel wird dieses Jahr in zwei Teile aufgespalten: Renntips (für jedes Rennen) und Bonustipps
|
||||
(für die ganze Saison).
|
||||
@ -20,10 +22,12 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mt-2">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Renntipps</h5>
|
||||
<div class="card mb-2">
|
||||
<div class="card-header">
|
||||
Renntipps
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<p>
|
||||
Jedes Rennen besteht aus zwei Tipps.
|
||||
Einem Platzierungstipp (PX-Tipp) und einem Tipp welcher Fahrer als Erstes das Rennen abbricht
|
||||
@ -39,10 +43,12 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mt-2">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Punkte</h5>
|
||||
<div class="card mb-2">
|
||||
<div class="card-header">
|
||||
Punkte
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<p>
|
||||
Für einen korrekten Tipp werden 10 Punkte vergeben.
|
||||
Beim PX-Tipp werden 6 Punkte für einen Platz Abweichung, 3 Punkte für zwei plätze Abweichung und 1 Punkt
|
||||
@ -56,10 +62,12 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mt-2">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Bonustipps</h5>
|
||||
<div class="card mb-2">
|
||||
<div class="card-header">
|
||||
Bonustipps
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<p>
|
||||
Zusätzlich gibt es dieses Jahr auch Tipps, die sich auf die ganze Saison beziehen und verschieden
|
||||
bepunktet werden.
|
||||
|
@ -11,28 +11,32 @@
|
||||
{% block body %}
|
||||
|
||||
<div class="card mb-2">
|
||||
<div class="card-header">
|
||||
Note
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Note</h5>
|
||||
Picks that match the current standings are marked in green, except for the hot-take and overtake picks, as those are not evaluated automatically.<br>
|
||||
Picks that match the current standings are marked in green, except for the hot-take and overtake picks, as
|
||||
those are not evaluated automatically.<br>
|
||||
Points from sprints and fastest laps are not tracked currently.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid" style="grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));">
|
||||
<div class="grid" style="grid-template-columns: repeat(auto-fit, minmax(325px, 1fr)); grid-row-gap: 0; grid-column-gap: 8px;">
|
||||
|
||||
{% for user in model.all_users_or_active_user() %}
|
||||
|
||||
<div class="card mb-2 shadow-sm">
|
||||
<div class="card-body">
|
||||
|
||||
<div class="card-header">
|
||||
{# Link should only be visible if all users are visible #}
|
||||
{% if model.active_user is not none %}
|
||||
<h5 class="card-title">{{ user.name }}</h5>
|
||||
{{ user.name }}
|
||||
{% else %}
|
||||
<a href="/season/{{ user.name }}" class="link-dark">
|
||||
<h5 class="card-title">{{ user.name }}</h5>
|
||||
</a>
|
||||
<a href="/season/{{ user.name }}" class="link-dark">{{ user.name }}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
{% set user_guess = model.season_guesses_by(user_name=user.name) %}
|
||||
|
||||
@ -78,11 +82,11 @@
|
||||
<div class="input-group mt-2" data-bs-toggle="tooltip"
|
||||
title="Which driver will gain/lose the most places in comparison to last season's results?">
|
||||
{{ driver_select_with_preselect(driver_match=user_guess.most_wdc_gained, name="gainedselect",
|
||||
label="Most WDC places gained:", include_none=false, drivers=model.drivers_for_wdc_gained(),
|
||||
label="Most WDC pl. gained:", include_none=false, drivers=model.drivers_for_wdc_gained(),
|
||||
disabled=not season_guess_open,
|
||||
border=("border-success" if points.most_gained_correct(user.name) else "")) }}
|
||||
{{ driver_select_with_preselect(driver_match=user_guess.most_wdc_lost, name="lostselect",
|
||||
label="Most WDC places lost:", include_none=false, disabled=not season_guess_open,
|
||||
label="Most WDC pl. lost:", include_none=false, disabled=not season_guess_open,
|
||||
border=("border-success" if points.most_lost_correct(user.name) else "")) }}
|
||||
</div>
|
||||
|
||||
@ -90,7 +94,7 @@
|
||||
<h6 class="card-subtitle mt-2" data-bs-toggle="tooltip"
|
||||
title="Which driver will finish the season higher than his teammate?">Teammate battle
|
||||
winners:</h6>
|
||||
<div class="grid mt-2" style="width: 450px; row-gap: 0;">
|
||||
<div class="grid mt-2 container" style="row-gap: 0;">
|
||||
{% for team in model.all_teams(include_none=false) %}
|
||||
{% set driver_a = model.drivers_by(team_name=team.name)[0] %}
|
||||
{% set driver_b = model.drivers_by(team_name=team.name)[1] %}
|
||||
@ -126,7 +130,7 @@
|
||||
{# Drivers with Podiums #}
|
||||
<h6 class="card-subtitle mt-2" data-bs-toggle="tooltip"
|
||||
title="Which driver will reach at least a single podium?">Drivers with podium(s):</h6>
|
||||
<div class="grid mt-2" style="width: 450px; row-gap: 0;">
|
||||
<div class="grid mt-2 container" style="row-gap: 0;">
|
||||
{% for team in model.all_teams(include_none=false) %}
|
||||
{% set driver_a = model.drivers_by(team_name=team.name)[0] %}
|
||||
{% set driver_b = model.drivers_by(team_name=team.name)[1] %}
|
||||
|
@ -7,18 +7,24 @@
|
||||
{% block body %}
|
||||
|
||||
<div class="card mb-2">
|
||||
<div class="card-header">
|
||||
Note
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Note</h5>
|
||||
Points from sprints and fastest laps are not tracked currently.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid" style="grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));">
|
||||
<div class="grid" style="grid-template-columns: repeat(auto-fit, minmax(325px, 1fr)); grid-row-gap: 0; grid-column-gap: 8px;">
|
||||
|
||||
<div class="card mb-2">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Drivers</h5>
|
||||
<div class="card-header">
|
||||
Drivers
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="d-inline-block overflow-x-scroll w-100">
|
||||
<table class="table table-bordered table-sm table-responsive">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -43,11 +49,15 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mb-2">
|
||||
<div class="card-header">
|
||||
Constructors
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Constructors</h5>
|
||||
|
||||
<div class="d-inline-block overflow-x-scroll w-100">
|
||||
<table class="table table-bordered table-sm table-responsive">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -70,6 +80,7 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -7,9 +7,11 @@
|
||||
{% block body %}
|
||||
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Add User</h5>
|
||||
<div class="card-header">
|
||||
Add user
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<form action="/user-add" method="post">
|
||||
<div class="input-group">
|
||||
<div class="form-floating">
|
||||
@ -26,9 +28,11 @@
|
||||
|
||||
{% if model.all_users() | length > 0 %}
|
||||
<div class="card mt-2 shadow-sm">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Registered Users</h5>
|
||||
<div class="card-header">
|
||||
Registered users
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<ul class="list-group list-group-flush">
|
||||
{% for user in model.all_users() %}
|
||||
<li class="list-group-item">{{ user.name }}</li>
|
||||
@ -38,9 +42,11 @@
|
||||
</div>
|
||||
|
||||
<div class="card mt-2 shadow-sm">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Delete user</h5>
|
||||
<div class="card-header">
|
||||
Delete user
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<form action="/user-delete" method="post">
|
||||
<div class="input-group">
|
||||
<select class="form-control form-select" aria-label="select-delete-user"
|
||||
|
Reference in New Issue
Block a user