initial commit

This commit is contained in:
2021-05-08 05:29:32 +02:00
commit 2707fad57f
1630 changed files with 125667 additions and 0 deletions

View File

@@ -0,0 +1,73 @@
<!doctype html>
<html lang="de">
<head>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<title>Matchplan</title>
<link rel="icon" sizes="192x192" href="img/favicon.png">
<!-- Bootstrap core CSS -->
<link href="/static/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="/static/css/home.css" rel="stylesheet">
<link href="/static/fontawesome/css/all.min.css" rel="stylesheet">
{% block additionalcss %}
{% endblock %}
</head>
<body>
<script src="/static/js/jquery.min.js"></script>
<script src="/static/js/bootstrap.bundle.min.js"></script>
<header>
<!-- Fixed navbar -->
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
<div class="container">
<a class="navbar-brand" href="{{ url_for('index.index') }}">Matchplan</a>
<a href="https://www.toornament.com"><img src="/static/img/PoweredbyToor_White.png" height="50" alt="Toornament"></a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse"
aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav me-auto mb-2 mb-md-0">
</ul>
<div class="d-flex">
{% if session['is_logged_in'] %}
<div class="d-flex align-items-center row">
<div class="col text-white">
Angemeldet als {{ session['username'] }}
</div>
<div class="col">
<a class="btn btn-light float-end" href="{{ url_for('login.logout') }}">Logout</a>
</div>
</div>
{% else %}
<a class="btn btn-primary" href="{{ url_for('login.login') }}">Einloggen</a>
{% endif %}
</div>
</div>
</div>
</nav>
</header>
<main role="main" class="container main">
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{% for category, message in messages %}
<div class="alert alert-dismissible alert-{{ category }}">
{{ message }}
</div>
{% endfor %}
{% endif %}
{% endwith %}
{% block main %}
{% endblock %}
</main>
</body>
</html>

View File

@@ -0,0 +1,27 @@
{% extends "base.html" %}
{% block main %}
<div class="h2">Meine Turniere</div>
<hr style="height: 3px" />
{% if not tournaments %}
Bitte oben rechts einloggen.
{% else %}
<table class="table table-hover align-middle">
{% for tournament in tournaments %}
<tr style="height: 80px; cursor: pointer;" onclick="window.location='{{ url_for('tournament.list_matches', tournament_id=tournament.id, participant_id=tournament.participant_id) }}'">
<td class="col-2 text-center">
<img src="{{ tournament.logo.logo_small }}">
</td>
<td class="col-8">
<b>{{ tournament.name }}</b><br />
{% if tournament.scheduled_date_start and tournament.scheduled_date_end %}
<span class="text-secondary">Von {{ tournament.scheduled_date_start }} bis {{ tournament.scheduled_date_end }}</span>
{% endif %}
</td>
<td class="col-2">
{{ tournament.size }} Teams
</td>
</tr>
{% endfor %}
</table>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,74 @@
{% extends "base.html" %}
{% block main %}
<div class="h2">Match: {{ match.opponents[0].participant.name }} VS {{ match.opponents[1].participant.name }}</div>
<div class="h5">
Geplant am:
{% if match.scheduled_datetime %}
{{ match.scheduled_datetime.strftime('%Y-%m-%d') }}
{% else %}
N/V
{% endif %}
</div>
<div class="h5">Turnier: {{ tournament.name }}</div>
<hr style="height: 3px" />
<div class="row">
<div class="col-6">
<div class="h3">
{{ participants[0].name }}
<a class="float-end" target="_blank" rel="noopener noreferrer" href="https://euw.op.gg/multi/{{ participants[0].opgg_multilink }}">op.gg</a>
</div>
<hr style="height: 2px" />
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Summoner-Name</th>
<th class="text-end">Infos</th>
</tr>
</thead>
<tbody>
{% for player in participants[0].lineup %}
<tr>
<td>{{ player.name }}</td>
<td>{{ player.custom_fields.summoner_name }}</td>
<td class="text-end">
<a target="_blank" rel="noopener noreferrer" href="https://www.leagueofgraphs.com/de/summoner/euw/{{ player.custom_fields.summoner_name }}">LoG</a>
|
<a target="_blank" rel="noopener noreferrer" href="https://euw.op.gg/summoner/userName={{ player.custom_fields.summoner_name }}">op.gg</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="col-6">
<div class="h3">
{{ participants[1].name }}
<a class="float-end" target="_blank" rel="noopener noreferrer" href="https://euw.op.gg/multi/{{ participants[1].opgg_multilink }}">op.gg</a>
</div>
<hr style="height: 2px" />
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Summoner-Name</th>
<th class="text-end">Infos</th>
</tr>
</thead>
<tbody>
{% for player in participants[1].lineup %}
<tr>
<td>{{ player.name }}</td>
<td>{{ player.custom_fields.summoner_name }}</td>
<td class="text-end">
<a target="_blank" rel="noopener noreferrer" href="https://www.leagueofgraphs.com/de/summoner/euw/{{ player.custom_fields.summoner_name }}">LoG</a>
|
<a target="_blank" rel="noopener noreferrer" href="https://euw.op.gg/summoner/userName={{ player.custom_fields.summoner_name }}">op.gg</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,44 @@
{% extends "base.html" %}
{% block main %}
<div class="h2">Matches vom Turnier {{ tournament.name }}</div>
<hr style="height: 3px" />
<table class="table table-hover align-middle">
<thead style="height: 30px">
<tr>
<th class="col-1 text-center">
Status
</th>
<th class="col-2 text-center">
Geplant am
</th>
<th class="col-9">
Teilnehmer
</th>
</tr>
</thead>
<tbody>
{% for match in matches %}
<tr style="height: 50px; cursor: pointer;" onclick="window.location='{{ url_for('tournament.show_match', tournament_id=tournament.id, match_id=match.id) }}'">
<td class="col-1 text-center">
{% if match.status == 'completed' %}
Abgeschlossen
{% else %}
Anstehend
{% endif %}
</td>
<td class="col-2 text-center">
{% if match.scheduled_datetime %}
{{ match.scheduled_datetime.strftime('%Y-%m-%d') }}
{% else %}
N/V
{% endif %}
</td>
<td class="col-9">
{{ match.opponents[0].participant.name }} <br />
{{ match.opponents[1].participant.name }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}