diff options
| author | Karan Jayachandra <karan.jayachandra@nxp.com> | 2024-10-17 10:55:33 +0200 |
|---|---|---|
| committer | Karan Jayachandra <karan.jayachandra@nxp.com> | 2024-10-17 10:55:33 +0200 |
| commit | e627108b44bb069b556a11b1b2581b5a87209066 (patch) | |
| tree | 34d67b5a3ea1e19095eded7ea489cb886f490265 | |
| parent | 8f1438964e1a336c44609cd4cc4c6aef61137011 (diff) | |
Moved the player activation to a separate page
| -rw-r--r-- | templates/controls.j2 | 1 | ||||
| -rw-r--r-- | templates/index.j2 | 21 | ||||
| -rw-r--r-- | templates/players.j2 | 59 |
3 files changed, 62 insertions, 19 deletions
diff --git a/templates/controls.j2 b/templates/controls.j2 index 8e190c5..7a03f9a 100644 --- a/templates/controls.j2 +++ b/templates/controls.j2 @@ -1,5 +1,4 @@ {% from "macros.j2" import court %} -<p class="title">Controls</p> <div class="columns"> <div class="column"> <div class="field has-addons"> diff --git a/templates/index.j2 b/templates/index.j2 index 22c72a0..8ff9eb1 100644 --- a/templates/index.j2 +++ b/templates/index.j2 @@ -19,20 +19,21 @@ </figure> </div> </div> - <div class="level-item"> - <p class="title">Match Up!</p> + <p class="level-item has-text-centered"> + <a class="title link is-info" href="/">Games</a> + </p> + <div class="level-item has-text-centered"> + <p class="title is-1">Match Up!</p> </div> + <p class="level-item has-text-centered"> + <a class="title link is-info" href="/players">Players</a> + </p> <div class="level-right"> - <div hx-get="/time" hx-swap="outerHTML" hx-trigger="revealed"></div> + <div hx-get="/time" hx-swap="outerHTML" hx-trigger="load"></div> </div> </nav> - <div hx-get="/control" hx-swap="outerHTML" hx-trigger="revealed"></div> - <p class="title">Games</p> - <div hx-post="/clear" hx-swap="outerHTML" hx-trigger="revealed"></div> - </section> - <section class="section"> - <h2 class="title">Players</h2> - <div hx-get="/players" hx-swap="outerHTML" hx-trigger="revealed"></div> + <div hx-post="/clear" hx-swap="outerHTML" hx-trigger="load"></div> + <div hx-get="/control" hx-swap="outerHTML" hx-trigger="load"></div> </section> <footer class="footer"> <div class="content has-text-centered"> diff --git a/templates/players.j2 b/templates/players.j2 index 4eedc54..f81e823 100644 --- a/templates/players.j2 +++ b/templates/players.j2 @@ -1,9 +1,52 @@ {% from "macros.j2" import player %} -<div class="fixed-grid has-5-cols"> -<div class="grid"> -{% for id, value in players.items() %} - <div class="cell"> - {{ player(id, value.status, value.name) }} - </div> -{% endfor %} -</div>
\ No newline at end of file +<!doctype html> +<html lang="en"> + <head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>Match Up!</title> + <link rel="icon" type="image/x-icon" href="{{ url_for('static', filename='favicon.ico') }}"> + <link rel="stylesheet" href="{{ url_for('static', filename='bulma.min.css') }}"> + <link rel="stylesheet" href="{{ url_for('static', filename='custom.css') }}"> + <script src="{{ url_for('static', filename='htmx.min.js') }}"></script> + </head> + <body> + <section class="section"> + <nav class="level"> + <div class="level-left"> + <div class="level-item"> + <figure class="image container is-128x128"> + <img src="{{ url_for('static', filename='logo.png') }}"/> + </figure> + </div> + </div> + <p class="level-item has-text-centered"> + <a class="title link is-info" href="/">Games</a> + </p> + <div class="level-item has-text-centered"> + <p class="title is-1">Match Up!</p> + </div> + <p class="level-item has-text-centered"> + <a class="title link is-info" href="/players">Players</a> + </p> + <div class="level-right"> + <div hx-get="/time" hx-swap="outerHTML" hx-trigger="load"></div> + </div> + </nav> + <h2 class="title">Players</h2> + <div class="fixed-grid has-5-cols"> + <div class="grid"> + {% for id, value in players.items() %} + <div class="cell"> + {{ player(id, value.status, value.name) }} + </div> + {% endfor %} + </div> + </section> + <footer class="footer"> + <div class="content has-text-centered"> + Made by <a href="https://karanjayachandra.com/">Karan</a> using <a href="https://flask.palletsprojects.com">Flask</a>, <a href="https://htmx.org/">HTMX</a> and <a href="https://bulma.io">Bulma</a> + </div> + </footer> + </body> +</html>
\ No newline at end of file |
