Skip to content

Commit

Permalink
piggy bank page
Browse files Browse the repository at this point in the history
  • Loading branch information
atomikaya committed Oct 24, 2024
1 parent e8f8ee2 commit 530274f
Show file tree
Hide file tree
Showing 3 changed files with 178 additions and 6 deletions.
10 changes: 8 additions & 2 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ def clean_dir(path):
agenda_link = active_link,
)


agenda_event_free = dict(
base_url = '../..',
page_title = 'Bœuf des Lampions',
Expand Down Expand Up @@ -83,6 +82,13 @@ def clean_dir(path):
network_link = active_link,
)

tirelire = dict(
base_url = '..',
page_title = 'Tirelire',
page_content = read('templates/compte/index.html'),
piggybank_link = active_link,
)

# build

clean_dir('public')
Expand All @@ -92,6 +98,6 @@ def clean_dir(path):
write('public/agenda/boeuf-lampions/index.html', render('templates/base.html', agenda_event_free))
write('public/agenda/see-you-in-the-pit-13/index.html', render('templates/base.html', agenda_event))
write('public/reseau/index.html', render('templates/base.html', network))

write('public/compte/index.html', render('templates/base.html', tirelire))

shutil.copytree('assets', 'public/assets')
11 changes: 7 additions & 4 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@
</a>
<ul class="dropdown-menu dropdown-menu-lg-end">
<li>
<a class="dropdown-item d-flex justify-content-between align-items-center" href="#">
<a class="dropdown-item d-flex justify-content-between align-items-center $piggybank_link" href="$base_url/compte/">
Tirelire
<div class="">
<div>
<div class="ms-2">
<span class="badge bg-secondary-subtle text-secondary-emphasis">40,25</span> /
<span class="badge bg-body-tertiary text-body-tertiary">80</span>
<span class="badge bg-body-tertiary text-body-tertiary">80,25</span>
</div>
<div class="ms-2">
<span class="badge bg-secondary-subtle text-secondary-emphasis">3:30</span> /
Expand Down Expand Up @@ -154,6 +154,9 @@ <h4>Le Tiers-Lustre</h4>
<li class="nav-item">
<a class="nav-link" href="#">Tirelire</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Transactions</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Adhésions</a>
</li>
Expand All @@ -164,7 +167,7 @@ <h4>Le Tiers-Lustre</h4>
<a class="nav-link" href="#">Badgeuse</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Profil</a>
<a class="nav-link" href="#">Informations</a>
</li>
</ul>
<hr>
Expand Down
163 changes: 163 additions & 0 deletions templates/compte/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
<main class="container-lg py-5">
<ul class="nav nav-tabs mb-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">
<i class="bi bi-piggy-bank-fill"></i>
<span class="d-none d-md-inline">Tirelire</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<i class="bi bi-cash-coin"></i>
<span class="d-none d-md-inline">Transactions</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<i class="bi bi-person-badge-fill"></i>
<span class="d-none d-md-inline">Adhésions</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<i class="bi bi-ticket-perforated-fill"></i>
<span class="d-none d-md-inline">Réservations</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<i class="bi bi-stopwatch-fill"></i>
<span class="d-none d-md-inline">Badgeuse</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<i class="bi bi-gear-fill"></i>
<span class="d-none d-md-inline">Préférences</span>
</a>
</li>
</ul>
<section class="card border-top-0 rounded-top-0">
<div class="card-body">
<h1 class="card-title d-md-none">Tirelire</h1>
<p class="lead">
Adresse de récupération : <code>&lt;jdulac@exemple.fr&gt;</code>
</p>
</div>
<div class="row g-0">
<div class="col-md bg-body-tertiary p-3 d-flex flex-column">
<h3>Monnaies</h3>
<p class="lead flex-fill">
<strong>40,25</strong> crédits utilisables avec
<em>Le Tiers Lustre</em> <br />
<span class="opacity-75"><strong>80,25</strong> en tout</span>
</p>

<a href="#" class="btn btn-primary mb-3">
Recharger ma tirelire
</a>
<a href="#" class="btn btn-secondary d-md-none mb-3">
Détail des monnaies
</a>
</div>
<div class="col-md bg-body-tertiary p-3 d-flex flex-column">
<h3>Pointages</h3>
<p class="lead flex-fill">
<strong>03:30</strong> heures échangeables avec
<em>Le Tiers Lustre</em> <br />
<span class="opacity-75"><strong>07:00</strong> en tout</span>
</p>
<a href="#" class="btn btn-primary mb-3">
Déclarer des heures
</a>
<a href="#" class="btn btn-secondary d-md-none mb-3">
Détail des heures
</a>
</div>
</div>
</section>

<div class="row">
<div class="col-md">
<h2 class="pt-3 d-md-none">Détail des monnaies</h2>
<table class="table">
<thead>
<th>Monnaie</th>
<th>Réseau concerné</th>
<th>Dernière transaction</th>
</thead>
<tbody>
<tr>
<td>
<strong>30</strong>
Étincelles
</td>
<td>
<a href="../reseau/">Un Pour Touche</a>
</td>
<td>12/03/24</td>
</tr>
<tr>
<td>
<strong>10,25</strong>
Étincelles cadeau
</td>
<td>
<a href="../reseau/">Un Pour Touche</a>
</td>
<td>16/03/24</td>
</tr>
<tr class="opacity-25">
<td>
<strong>12</strong>
Phonies
</td>
<td>
<a href="../reseau/">Un Pour Touche</a>
</td>
<td>16/03/23</td>
</tr>
<tr class="opacity-25">
<td>
<strong>8</strong>
Noisettes
</td>
<td>Les Assos du Bois</td>
<td>16/03/23</td>
</tr>
</tbody>
</table>
</div>
<div class="col-md">
<h2 class="pt-3 d-md-none">Détail des heures</h2>
<table class="table">
<thead>
<th>Heures</th>
<th>Réseau concerné</th>
<th>Dernière transaction</th>
</thead>
<tbody>
<tr>
<td>
<strong>03:30</strong>
Heures Lumière
</td>
<td>
<a href="../reseau/">Un Pour Touche</a>
</td>
<td>07/04/24</td>
</tr>
<tr class="opacity-25">
<td>
<strong>03:30</strong>
Bûchages
</td>
<td>Les Assos du Bois</td>
<td>12/03/23</td>
</tr>
</tbody>
</table>
</div>
</div>

</main>

0 comments on commit 530274f

Please sign in to comment.