Initial commit
This commit is contained in:
15
templates/components/bottom_controls.html
Normal file
15
templates/components/bottom_controls.html
Normal file
@@ -0,0 +1,15 @@
|
||||
{{ define "bottom_controls" }}
|
||||
|
||||
<div class="row justify-content-between border-top pt-4">
|
||||
<div class="col-md-auto">
|
||||
<button class="btn btn-lg btn-outline-secondary text-secondary-emphasis w-100"><i class="bi bi-gear-fill me-2"></i>Einstellungen</button>
|
||||
</div>
|
||||
<div class="col-md-auto">
|
||||
<button class="btn btn-lg btn-outline-primary w-100"><i class="bi bi-calculator-fill me-2"></i>Berechnen</button>
|
||||
</div>
|
||||
<div class="col-md-auto">
|
||||
<button class="btn btn-lg btn-outline-secondary text-secondary-emphasis w-100"><i class="bi bi-person me-2"></i>Einzel-Abfrage</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ end }}
|
||||
12
templates/components/header.html
Normal file
12
templates/components/header.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{{ define "header" }}
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Infantry Skill Calculator</title>
|
||||
<script src="https://unpkg.com/htmx.org@1.9.6"></script>
|
||||
<!-- Bootstrap 5 CSS -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
|
||||
<link rel="stylesheet" href="../static/index.css">
|
||||
|
||||
{{ end }}
|
||||
41
templates/components/home_clan_bar.html
Normal file
41
templates/components/home_clan_bar.html
Normal file
@@ -0,0 +1,41 @@
|
||||
{{ define "home_clan_bar" }}
|
||||
|
||||
<div class="row g-2">
|
||||
<div class="col-auto">
|
||||
<label for="home-clan" class="col-form-label col-form-label-lg">Clans:</label>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="input-group input-group-lg mb-3">
|
||||
<select class="form-select form-control border-secondary" id="home-clan" hx-get="/players" hx-target="#home-player-list">
|
||||
<option disabled selected value>Auswählen...</option>
|
||||
{{ range .clans }}
|
||||
<option value="{{ .ID }}">[{{ .Tag }}] {{ .Name }}</option>
|
||||
{{ end }}
|
||||
</select>
|
||||
<button class="btn btn-lg btn-outline-secondary text-danger" type="button" id="home-delete" data-bs-toggle="modal" data-bs-list="#home-clan" data-bs-target="#deleteClanModal" disabled>
|
||||
<i class="bi bi-trash3"></i>
|
||||
</button>
|
||||
<button class="btn btn-lg btn-outline-secondary text-primary" type="button" data-bs-toggle="modal" data-bs-list="#home-clan" data-bs-target="#editClanModal" id="home-edit" disabled>
|
||||
<i class="bi bi-pencil-fill"></i>
|
||||
</button>
|
||||
<button class="btn btn-lg btn-outline-secondary text-success" type="button" data-bs-toggle="modal" data-bs-list="#home-clan" data-bs-target="#addClanModal" id="home-add">
|
||||
<i class="bi bi-plus-lg"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script lang="javascript">
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const dropdownHome = document.getElementById('home-clan');
|
||||
const deleteButtonHome = document.getElementById('home-delete');
|
||||
const editButtonHome = document.getElementById('home-edit');
|
||||
|
||||
dropdownHome.addEventListener('change', function () {
|
||||
deleteButtonHome.disabled = !this.value;
|
||||
editButtonHome.disabled = !this.value;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
{{ end }}
|
||||
22
templates/components/home_player_bar.html
Normal file
22
templates/components/home_player_bar.html
Normal file
@@ -0,0 +1,22 @@
|
||||
{{ define "home_player_bar" }}
|
||||
|
||||
<div class="row mt-3 justify-content-between align-items-center">
|
||||
<div class="col-auto">
|
||||
<div class="btn-group btn-group-lg" role="group">
|
||||
<button type="button" class="btn btn-outline-secondary text-secondary-emphasis py-1 px-3"><i class="bi bi-check-square fs-4"></i></button>
|
||||
<button type="button" class="btn btn-outline-secondary text-secondary-emphasis py-1 px-3"><i class="bi bi-square fs-4"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col px-0">
|
||||
<span class="badge fs-5 w-100 text-secondary-emphasis">0 von 0 ausgewählt</span>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<div class="btn-group btn-group-lg" role="group">
|
||||
<button type="button" class="btn btn-outline-secondary text-danger py-1 px-3"><i class="bi bi-person-dash fs-4"></i></button>
|
||||
<button type="button" class="btn btn-outline-secondary text-primary py-1 px-3"><i class="bi bi-person-gear fs-4"></i></button>
|
||||
<button type="button" class="btn btn-outline-secondary text-success py-1 px-3"><i class="bi bi-person-add fs-4"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ end }}
|
||||
8
templates/components/home_player_list.html
Normal file
8
templates/components/home_player_list.html
Normal file
@@ -0,0 +1,8 @@
|
||||
{{ define "home_player_list" }}
|
||||
|
||||
<label for="home-player-list" class="col-form-label col-form-label-lg pt-0">Spieler:</label>
|
||||
<select multiple class="form-control form-control-lg overflow-auto border-secondary" id="home-player-list" size="10">
|
||||
<!-- Player list items go here -->
|
||||
</select>
|
||||
|
||||
{{ end }}
|
||||
41
templates/components/opp_clan_bar.html
Normal file
41
templates/components/opp_clan_bar.html
Normal file
@@ -0,0 +1,41 @@
|
||||
{{ define "opp_clan_bar" }}
|
||||
|
||||
<div class="row g-2">
|
||||
<div class="col-auto">
|
||||
<label for="opponent-clan" class="col-form-label col-form-label-lg">Clans:</label>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="input-group input-group-lg mb-3">
|
||||
<select class="form-select form-control border-secondary" id="opponent-clan" hx-get="/players" hx-target="#opponent-player-list">
|
||||
<option disabled selected value>Auswählen...</option>
|
||||
{{ range .clans }}
|
||||
<option value="{{ .ID }}">[{{ .Tag }}] {{ .Name }}</option>
|
||||
{{ end }}
|
||||
</select>
|
||||
<button class="btn btn-lg btn-outline-secondary text-danger" type="button" id="opponent-delete" data-bs-toggle="modal" data-bs-list="#opponent-clan" data-bs-target="#deleteClanModal" disabled>
|
||||
<i class="bi bi-trash3"></i>
|
||||
</button>
|
||||
<button class="btn btn-lg btn-outline-secondary text-primary" type="button" data-bs-toggle="modal" data-bs-list="#opponent-clan" data-bs-target="#editClanModal" id="opponent-edit" disabled>
|
||||
<i class="bi bi-pencil-fill"></i>
|
||||
</button>
|
||||
<button class="btn btn-lg btn-outline-secondary text-success" type="button" data-bs-toggle="modal" data-bs-list="#opponent-clan" data-bs-target="#addClanModal" id="opponent-add">
|
||||
<i class="bi bi-plus-lg"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script lang="javascript">
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const dropdownOpponent = document.getElementById('opponent-clan');
|
||||
const deleteButtonOpponent = document.getElementById('opponent-delete');
|
||||
const editButtonOpponent = document.getElementById('opponent-edit');
|
||||
|
||||
dropdownOpponent.addEventListener('change', function () {
|
||||
deleteButtonOpponent.disabled = !this.value;
|
||||
editButtonOpponent.disabled = !this.value;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
{{ end }}
|
||||
22
templates/components/opp_player_bar.html
Normal file
22
templates/components/opp_player_bar.html
Normal file
@@ -0,0 +1,22 @@
|
||||
{{ define "opp_player_bar" }}
|
||||
|
||||
<div class="row mt-3 justify-content-between align-items-center">
|
||||
<div class="col-auto">
|
||||
<div class="btn-group btn-group-lg" role="group">
|
||||
<button type="button" class="btn btn-outline-secondary text-secondary-emphasis py-1 px-3"><i class="bi bi-check-square fs-4"></i></button>
|
||||
<button type="button" class="btn btn-outline-secondary text-secondary-emphasis py-1 px-3"><i class="bi bi-square fs-4"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col px-0">
|
||||
<span class="badge fs-5 w-100 text-secondary-emphasis">0 von 0 ausgewählt</span>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<div class="btn-group btn-group-lg" role="group">
|
||||
<button type="button" class="btn btn-outline-secondary text-danger py-1 px-3"><i class="bi bi-person-dash fs-4"></i></button>
|
||||
<button type="button" class="btn btn-outline-secondary text-primary py-1 px-3"><i class="bi bi-person-gear fs-4"></i></button>
|
||||
<button type="button" class="btn btn-outline-secondary text-success py-1 px-3"><i class="bi bi-person-add fs-4"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ end }}
|
||||
8
templates/components/opp_player_list.html
Normal file
8
templates/components/opp_player_list.html
Normal file
@@ -0,0 +1,8 @@
|
||||
{{ define "opp_player_list" }}
|
||||
|
||||
<label for="opponent-player-list" class="col-form-label col-form-label-lg pt-0">Spieler:</label>
|
||||
<select multiple class="form-control form-control-lg overflow-auto border-secondary" id="opponent-player-list" size="10">
|
||||
<!-- Player list items go here -->
|
||||
</select>
|
||||
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user