diff --git a/flask_base/app.py b/flask_base/app.py index 79ab7f0..1437fec 100644 --- a/flask_base/app.py +++ b/flask_base/app.py @@ -42,6 +42,22 @@ def show_questions(): questions = json.load(file) return render_template('quiz.html', questions=questions) +@app.route('/') +def main(): + return render_template('index.html') + +@app.route('/pokemon') +def poke(): + return render_template('pokemon.html') + +@app.route('/PAI') +def pai(): + return render_template('PAI.html') + +@app.route('/outils') +def outils(): + return render_template('outils.html') + if __name__ == '__main__': app.run(debug=True, port=8080) diff --git a/flask_base/static/style.css b/flask_base/static/style.css new file mode 100644 index 0000000..a4b1b5a --- /dev/null +++ b/flask_base/static/style.css @@ -0,0 +1,387 @@ +/* Style simple et épuré pour le site d'introduction aux logiciels libres */ + +body { + background: #000; + color: #00ff88; + font-family: "Courier New", monospace; + margin: 2rem; + line-height: 1.5; +} + +header { + display: grid; + grid-template-columns: auto 1fr auto; + align-items: center; + gap: 1rem; + background: #001a0f; + border-bottom: 2px solid #00ff88; + padding: 1rem; +} + +header h1 { + margin: 0; + line-height: 40px; + font-size: 1.8rem; + color: #00ffcc; + text-align: center; +} + + +.header-gif { + width: 3rem; + height: 3rem; + image-rendering: pixelated; + margin-left : 3rem; +} + +section { + border: 1px solid #00ff88; + box-shadow: 0 0 10px #00ff88; + background: rgba(0, 0, 0, 0.3); + padding : 2rem; +} + +main { + max-width: 800px; + margin: 2rem auto; + padding: 1rem; +} + +h1, h2 { + margin-top: 0; + /* augmenter la taille et améliorer contraste */ + color: #00ffcc; /* couleur plus claire que #2c7a7b */ +} + +h1 { + text-align: center; + margin-top: 1rem; + margin-bottom: 2rem; + font-size: 2.2rem; +} + +h2 { + font-size: 1.6rem; +} + +nav { + background: #256f70; + padding: 0.6rem 0; + margin-top: 1rem; + border-radius: 6px; +} + +.menu { + list-style: none; + padding: 0; + margin: 0; + margin-left: 1rem; + margin-right: 1rem; + display: flex; + gap: 1.5rem; + justify-content: center; +} + +.menu a { + color: white; + text-decoration: none; + font-weight: bold; + transition: opacity 0.2s; + font-size: 1.1rem; + outline-offset: 2px; /* pour focus */ +} + +/* Focus visible pour clavier */ +.menu a:focus { + outline: 3px solid #00ff88; + outline-offset: 2px; +} + +.menu a:hover { + opacity: 0.8; /* plus visible au hover */ +} + +.menu li { + border: 2px smooth #00ff88; /* bordure verte */ + padding: 0.5rem 1rem; /* espace intérieur */ + border-radius: 6px; /* coins arrondis */ + background-color: rgba(0, 255, 136, 0.1); /* fond semi-transparent */ +} + +.menu li:hover { + background-color: #00ff88; /* fond vert clair au hover */ +} + +.menu li a { + color: #000; /* texte noir pour contraste sur fond clair */ + text-decoration: none; + font-weight: bold; + display: block; /* pour que le lien prenne toute la "case" */ +} + +/* Styles pour la page "Outils Open Source vs Propriétaires" */ + +.tool-container { + display: flex; + flex-wrap: wrap; + gap: 1.5rem; + justify-content: center; +} + +.tool-card { + background: rgba(0, 255, 136, 0.1); + border: 1px solid #00ff88; + border-radius: 8px; + width: 320px; + padding: 1rem; + display: flex; + flex-direction: column; + gap: 1rem; + box-shadow: 0 0 8px #00ff88; + transition: transform 0.3s ease, box-shadow 0.3s ease; +} + +/* Respecter la préférence "réduire le mouvement" */ +@media (prefers-reduced-motion: reduce) { + .tool-card { + transition: none; + } +} + +.tool-card:hover { + transform: scale(1.05); + box-shadow: 0 0 20px #00ff88; +} + +.tool-row { + display: flex; + align-items: center; + gap: 1rem; +} + +.tool-row img { + width: 48px; + height: 48px; + object-fit: contain; + border-radius: 8px; + background: #000; + box-shadow: 0 0 8px #00ff88; +} + +.tool-name { + font-weight: bold; + font-size: 1.3rem; /* un peu plus grand */ + color: #00ffcc; /* couleur plus claire */ +} + +.description { + font-size: 1rem; /* plus lisible */ + color: #00ff88; + min-height: 60px; + line-height: 1.4; /* interligne */ +} + +.vs { + text-align: center; + font-weight: bold; + color: #00ff88; + margin: 0.5rem 0; + user-select: none; +} + + + +/* --- POKÉMON (adapté au style rétro du site) --- */ + +.battle { + background: rgba(0, 0, 0, 0.3); + border: 2px solid #00ff88; + box-shadow: 0 0 15px #00ff88; + padding: 20px; + border-radius: 12px; + margin: 1rem; + color: #00ff88; + font-family: "Courier New", monospace; +} + +.row { + display: flex; + gap: 20px; + margin-bottom: 20px; +} + +.monster { + flex: 1; + background: rgba(0, 255, 136, 0.1); + border: 1px solid #00ff88; + box-shadow: 0 0 10px #00ff88; + border-radius: 10px; + padding: 20px; + text-align: center; + font-size: 18px; + color: #00ffcc; +} + +button { + font-size: 16px; + border-radius: 8px; + border: 2px solid #00ff88; + background: rgba(0, 255, 136, 0.15); + color: #00ffcc; + cursor: pointer; + font-family: "Courier New", monospace; + text-shadow: 0 0 5px #00ff88; + transition: 0.2s ease; + margin : 0.5rem; + align-items: center; + height: 3rem; +} + +button:hover { + background: #00ff88; + color: #000; + box-shadow: 0 0 12px #00ff88; +} + +#log { + white-space: pre-line; + margin-top: 10px; + background: rgba(0, 255, 136, 0.1); + padding: 12px; + border-radius: 8px; + border: 1px solid #00ff88; + box-shadow: 0 0 8px #00ff88; + min-height: 60px; + color: #00ffcc; +} + +/* --- Tooltip version rétro --- */ + +.tooltip { + display: inline-block; + margin-left: 6px; + width: 18px; + height: 18px; + line-height: 16px; + text-align: center; + background: rgba(0, 255, 136, 0.2); + border-radius: 50%; + border: 1px solid #000; + cursor: help; + font-weight: bold; + font-size: 12px; + color: #000; + position: relative; +} + +.tooltip::after { + content: attr(data-tooltip); + position: absolute; + top: 22px; + left: 50%; + transform: translateX(-50%); + background: #001a0f; + border: 2px solid #00ff88; + padding: 6px 10px; + border-radius: 8px; + width: 220px; + color: #00ffcc; + font-size: 13px; + z-index: 999; + white-space: normal; + box-shadow: 0 0 15px #00ff88; + display: none; +} + +.tooltip:hover::after { + display: block; +} + +/* --- Images ennemis et icônes --- */ + +.enemy-img-container { + width: 100%; + height: 120px; + display: flex; + justify-content: center; + align-items: center; + overflow: hidden; + margin-bottom: 10px; +} + +.enemy-img-container img { + max-width: 100%; + max-height: 100%; + object-fit: contain; + image-rendering: pixelated; +} + +.attack-icon-container { + width: 32px; + height: 32px; + display: inline-flex; + justify-content: center; + align-items: center; + margin-right: 6px; + overflow: hidden; +} + +.attack-icon-container img { + max-width: 100%; + max-height: 100%; + object-fit: contain; + image-rendering: pixelated; +} + +.pai-container { + margin: 3rem auto; + max-width: 600px; + text-align: center; +} + +.pai-box { + border: 2px solid #00ff88; + padding: 2rem; + background: rgba(0, 255, 136, 0.05); + box-shadow: 0 0 12px #00ff88; + border-radius: 10px; +} + +.loading-bar { + width: 100%; + height: 22px; + background: #003322; + border: 2px solid #00ff88; + border-radius: 6px; + overflow: hidden; + margin-top: 1.5rem; +} + +.loading-fill { + height: 100%; + width: 0%; + background: #00ff88; + box-shadow: 0 0 10px #00ff88; + animation: fill 7s infinite; +} + +@keyframes fill { + 0% { width: 0%; } + 50% { width: 100%; } + 100% { width: 0%; } +} + +.pai-text { + margin-top: 1.5rem; + font-size: 1.2rem; + color: #00ffcc; + text-shadow: 0 0 6px #00ff88; + min-height: 60px; +} + +.pai-small { + margin-top: 2rem; + font-size: 0.9rem; + color: #00ff88; + opacity: 0.7; +} \ No newline at end of file diff --git a/flask_base/templates/PAI.html b/flask_base/templates/PAI.html new file mode 100644 index 0000000..5326875 --- /dev/null +++ b/flask_base/templates/PAI.html @@ -0,0 +1,53 @@ + + + + + + PAI - Analyse en cours + + + + + + +{% include 'header.html' %} + + +
+
+
+

Protocole d’Analyse Intellectuelle

+

Initialisation du système…

+ +
+
+
+ +

Veuillez patienter… l’analyse peut prendre plusieurs siècles.

+
+
+
+ + + + + diff --git a/flask_base/templates/header.html b/flask_base/templates/header.html new file mode 100644 index 0000000..201cfd8 --- /dev/null +++ b/flask_base/templates/header.html @@ -0,0 +1,13 @@ +
+ Mascotte animée +

Logiciels Libres

+ +
\ No newline at end of file diff --git a/flask_base/templates/index.html b/flask_base/templates/index.html new file mode 100644 index 0000000..50bc74f --- /dev/null +++ b/flask_base/templates/index.html @@ -0,0 +1,54 @@ + + + + + + + Introduction aux Logiciels Libres + + + + + {% include 'header.html' %} +
+
+

Qu’est-ce qu’un logiciel libre ?

+

+ Un logiciel libre est un logiciel dont l'utilisateur dispose de + libertés essentielles : la liberté d'utiliser le programme, de l'étudier, + de le modifier, et de le redistribuer. Ces libertés garantissent un + contrôle total de l’utilisateur sur la technologie qu’il utilise. +

+
+ +
+

Et un logiciel propriétaire ?

+

+ Un logiciel propriétaire impose des restrictions : le code source + n'est pas accessible, la modification est interdite, et la distribution est + strictement contrôlée. L’utilisateur dépend entièrement de l’éditeur. +

+
+ +
+

Pourquoi les logiciels libres sont importants

+

+ Les logiciels libres favorisent la transparence, l'indépendance + technologique, la durabilité et la collaboration. Ils permettent à chacun de + comprendre ce qu’un logiciel fait réellement et d’éviter les pratiques + intrusives ou injustes. +

+
+ + +
+

Pourquoi s'y intéresser ?

+

+ S'intéresser au logiciel libre, c’est soutenir un modèle ouvert, respectueux + des utilisateurs et bénéfique pour la collectivité. Cela encourage un + environnement numérique plus sain et plus éthique. +

+
+
+ + \ No newline at end of file diff --git a/flask_base/templates/outils.html b/flask_base/templates/outils.html new file mode 100644 index 0000000..cc172b6 --- /dev/null +++ b/flask_base/templates/outils.html @@ -0,0 +1,273 @@ + + + + + + + Outils Open Source vs Propriétaires + + + {% include 'header.html' %} +

Outils Open Source vs Propriétaires

+ +
+ + + + diff --git a/flask_base/templates/pokemon.html b/flask_base/templates/pokemon.html new file mode 100644 index 0000000..7976838 --- /dev/null +++ b/flask_base/templates/pokemon.html @@ -0,0 +1,402 @@ + + + + + + Jeu Pokémon + + + + + {% include 'header.html' %} + +
+

Combat Pokémon-like (simple)

+ +
+
Score: 0
+ +
+
+ Ennemi +
+ Ennemi
+ HP: 30 + ? +
+ +
Joueur
HP: 30
+
+ +
+ + +
Un ennemi sauvage apparaît !
+
+ + + + diff --git a/flask_base/templates/qcm.html b/flask_base/templates/qcm.html new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/flask_base/templates/qcm.html @@ -0,0 +1 @@ + diff --git a/flask_base/templates/quiz.html b/flask_base/templates/quiz.html index 1ba8d69..ef39b4c 100644 --- a/flask_base/templates/quiz.html +++ b/flask_base/templates/quiz.html @@ -2,11 +2,12 @@ Nuit de l'info quiz - + + {% include 'header.html' %}

page du quiz