diff options
author | Denise sur Lya <sekhmet@lya> | 2021-07-27 14:37:33 +0200 |
---|---|---|
committer | Denise sur Lya <sekhmet@lya> | 2021-07-27 14:37:33 +0200 |
commit | ea3e2d07911b2f4d3ff044c4a7bfd4e8c77be937 (patch) | |
tree | 74f82bb71cd18b387892717c5055cc2c56d2c135 /templates | |
download | bingo-ea3e2d07911b2f4d3ff044c4a7bfd4e8c77be937.tar.gz bingo-ea3e2d07911b2f4d3ff044c4a7bfd4e8c77be937.tar.zst bingo-ea3e2d07911b2f4d3ff044c4a7bfd4e8c77be937.zip |
Diffstat (limited to 'templates')
-rw-r--r-- | templates/base.html | 31 | ||||
-rw-r--r-- | templates/custom.html | 35 | ||||
-rw-r--r-- | templates/faq.html | 30 | ||||
-rw-r--r-- | templates/index.html | 42 |
4 files changed, 138 insertions, 0 deletions
diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..028aaa9 --- /dev/null +++ b/templates/base.html | |||
@@ -0,0 +1,31 @@ | |||
1 | <!DOCTYPE html> | ||
2 | |||
3 | <html lang="fr"> | ||
4 | <head> | ||
5 | <meta charset="UTF-8" > | ||
6 | <title>Le bingo de l'allaitement</title> | ||
7 | <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}" type="text/css"> | ||
8 | <!--<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">--> | ||
9 | |||
10 | <script src="static/outilspage.js"></script> | ||
11 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
12 | |||
13 | </head> | ||
14 | |||
15 | <body> | ||
16 | |||
17 | {% block contenu %}{% endblock %} | ||
18 | |||
19 | <hr> | ||
20 | <div id="basdepage"> | ||
21 | <nav> | ||
22 | <a href="/">Grille aléatoire</a> | | ||
23 | <a href="/custom">Créer une grille personnalisée</a> | | ||
24 | <!-- <a href="/apropos">À propos</a> |--> | ||
25 | |||
26 | </nav> | ||
27 | </div> | ||
28 | |||
29 | |||
30 | </body> | ||
31 | </html> | ||
diff --git a/templates/custom.html b/templates/custom.html new file mode 100644 index 0000000..cc5521c --- /dev/null +++ b/templates/custom.html | |||
@@ -0,0 +1,35 @@ | |||
1 | {% extends "base.html" %} | ||
2 | {% block contenu %} | ||
3 | <h1>Créer une grille personnalisée</h1> | ||
4 | |||
5 | {% if e | length >0 %} | ||
6 | <div id="erreurs"> | ||
7 | <h2>Log d'erreurs</h2> | ||
8 | <ul> | ||
9 | {% for err in e %} | ||
10 | <li>{{ err }}</li> | ||
11 | {% endfor %} | ||
12 | </ul> | ||
13 | </div> | ||
14 | {% endif %} | ||
15 | |||
16 | <div id="contenu"> | ||
17 | |||
18 | <form action="/" method="POST"> | ||
19 | |||
20 | <ul> | ||
21 | <li>Titre de la page : <input class="texte" type="text" name="titre" value="{{ DEFAUT.titre }}"></li> | ||
22 | <li>Nombre de lignes : <input class="data" type="number" min="{{ CONFIG.minlignes }}" max="{{ CONFIG.maxlignes}}" name="nblignes" value="{{ DEFAUT.nblignes }}"></li> | ||
23 | <li>Nombre de colonnes : <input class="data" type="number" min="{{ CONFIG.mincolonnes }}" max="{{ CONFIG.maxcolonnes }}" name="nbcolonnes" value="{{ DEFAUT.nbcolonnes }}"></li> | ||
24 | <li>Nombre de cases vides : <input class="data" type="number" min="0" name="nbcasesvides" value="{{ DEFAUT.nbcasesvides }}"> <span class="petit">Remarque : s'il n'y a pas assez de données, la grille sera automatiquement complétée par des cass vides.</span></li> | ||
25 | |||
26 | |||
27 | </ul> | ||
28 | <input type="submit" name="zou" value="Je veux une grille !"> | ||
29 | |||
30 | </form> | ||
31 | |||
32 | </div> | ||
33 | |||
34 | |||
35 | {% endblock %} | ||
diff --git a/templates/faq.html b/templates/faq.html new file mode 100644 index 0000000..162f68d --- /dev/null +++ b/templates/faq.html | |||
@@ -0,0 +1,30 @@ | |||
1 | {% extends "base.html" %} | ||
2 | {% block contenu %} | ||
3 | <h2>Foire Aux Questions (FAQ)</h2> | ||
4 | |||
5 | <div id="sommaire"> | ||
6 | <ul>{% for cat in lcateg %} | ||
7 | <li><a href="#{{ cat }}">{{ cat }}</a></li> | ||
8 | {% endfor %} | ||
9 | </ul> | ||
10 | </div> | ||
11 | |||
12 | <div id="questionsreponses"> | ||
13 | {% for i in range(lcateg|length) %} | ||
14 | {% set qr = tableqr[i] %} | ||
15 | |||
16 | <h3 id="{{ lcateg[i] }}">{{ lcateg[i] }}</h3> | ||
17 | <ul> | ||
18 | {% for (q,r) in qr %} | ||
19 | <li><p><strong>Q : </strong>{{ q|safe }}</p> | ||
20 | <p><strong>R : </strong>{{ r|safe }}</p> | ||
21 | </li> | ||
22 | {% endfor %} | ||
23 | </ul> | ||
24 | |||
25 | |||
26 | {% endfor %} | ||
27 | </div> | ||
28 | |||
29 | |||
30 | {% endblock %} | ||
diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..852fdd7 --- /dev/null +++ b/templates/index.html | |||
@@ -0,0 +1,42 @@ | |||
1 | {% extends "base.html" %} | ||
2 | {% block contenu %} | ||
3 | <h1>{{ conf.titre }}</h1> | ||
4 | |||
5 | {% if e | length >0 %} | ||
6 | <div id="erreurs"> | ||
7 | <h2>Log d'erreurs</h2> | ||
8 | <ul> | ||
9 | {% for err in e %} | ||
10 | <li>{{ err }}</li> | ||
11 | {% endfor %} | ||
12 | </ul> | ||
13 | </div> | ||
14 | {% endif %} | ||
15 | |||
16 | <div id="contenu"> | ||
17 | |||
18 | <p>Cochez la case dès que vous entendez une réplique idiote !</p> | ||
19 | <table id="grille"> | ||
20 | {% for ligne in bingo %} | ||
21 | <tr>{% for elt in ligne %} | ||
22 | {% if elt == "0" %} | ||
23 | <td class="vide"></td> | ||
24 | {% else %} | ||
25 | <td onclick='validecase(this)'>{{ elt }}</td> | ||
26 | {% endif %} | ||
27 | {% endfor %} | ||
28 | </tr> | ||
29 | {% endfor %} | ||
30 | </table> | ||
31 | |||
32 | <p>Score : <span id="score">0</span></p> | ||
33 | |||
34 | <p onclick="effacegrille()" class="cliquable">Effacer la grille</p> | ||
35 | |||
36 | <hr> | ||
37 | <a href="/?grille={{ chainecode }}">Lien permanent vers cette grille</a> | ||
38 | |||
39 | </div> | ||
40 | |||
41 | |||
42 | {% endblock %} | ||