From 1f003d4e649ccecf1e1e3b0ee7ba8e833a87e420 Mon Sep 17 00:00:00 2001 From: Dark-Storm Date: Mon, 26 Feb 2018 10:24:16 +0100 Subject: [PATCH] Refonte du menu, ajout des alertes --- app/static/css/navbar.css | 46 +++-- app/templates/base/alerts.html | 9 + app/templates/base/base.html | 2 + app/templates/base/navbar.html | 241 +---------------------- app/templates/base/navbar/account.html | 65 ++++++ app/templates/base/navbar/forum.html | 25 +++ app/templates/base/navbar/news.html | 23 +++ app/templates/base/navbar/programs.html | 60 ++++++ app/templates/base/navbar/sprites.html | 13 ++ app/templates/base/navbar/tools.html | 27 +++ app/templates/base/navbar/tutorials.html | 13 ++ app/templates/register.html | 70 +++---- 12 files changed, 305 insertions(+), 289 deletions(-) create mode 100644 app/templates/base/alerts.html create mode 100644 app/templates/base/navbar/account.html create mode 100644 app/templates/base/navbar/forum.html create mode 100644 app/templates/base/navbar/news.html create mode 100644 app/templates/base/navbar/programs.html create mode 100644 app/templates/base/navbar/sprites.html create mode 100644 app/templates/base/navbar/tools.html create mode 100644 app/templates/base/navbar/tutorials.html diff --git a/app/static/css/navbar.css b/app/static/css/navbar.css index 4e8009e..d2dd033 100644 --- a/app/static/css/navbar.css +++ b/app/static/css/navbar.css @@ -180,31 +180,37 @@ nav a:focus { margin-right: 10px; } -#menu form input { - display: block; width: 80%; - margin: 0 5%; padding: 5px 2%; +#menu form p { + padding: 0 5%; +} +#menu form input[type="text"] { + display: block; width: 96%; + margin: 0; padding: 5px 2%; font-size: 14px; color: inherit; background: #e8e8e8; transition: background .15s ease; border: none; + border-top-left-radius: 5px; + border-top-right-radius: 5px; } -#menu form input:focus { +#menu form input[type="password"]{ + display: block; width: 96%; + margin: 0; padding: 5px 2%; + font-size: 14px; color: inherit; + background: #e8e8e8; transition: background .15s ease; + border: none; border-top: 1px solid #dddddd; + border-bottom-left-radius: 5px; + border-bottom-right-radius: 5px; +} +#menu form input[type="text"]:focus, +#menu form input[type="password"]:focus { background: #ffffff; } -#menu form.login input:first-child { - margin-bottom: 0; border-bottom: none; - border-top-left-radius: 5px; - -webkit-border-top-left-radius: 5px; - -moz-border-top-left-radius: 5px; - border-top-right-radius: 5px; - -webkit-border-top-right-radius: 5px; - -moz-border-top-right-radius: 5px; +#menu form label { + font-size: 13px; color: #FFFFFF; opacity: .7; } -#menu form.login input:nth-child(2) { - margin-top: 0; border-top: 1px solid #dddddd; - border-bottom-left-radius: 5px; - -webkit-border-bottom-left-radius: 5px; - -moz-border-bottom-left-radius: 5px; - border-bottom-right-radius: 5px; - -webkit-border-bottom-right-radius: 5px; - -moz-border-bottom-right-radius: 5px; +#menu form input[type="checkbox"] { + vertical-align: middle; +} +#menu form input[type="submit"] { + width: 100%; padding: 5px; } diff --git a/app/templates/base/alerts.html b/app/templates/base/alerts.html new file mode 100644 index 0000000..aa24464 --- /dev/null +++ b/app/templates/base/alerts.html @@ -0,0 +1,9 @@ +
+ + + + + Identifiant ou mot de passe incorrect. + + +
diff --git a/app/templates/base/base.html b/app/templates/base/base.html index a5eb781..fb755d1 100644 --- a/app/templates/base/base.html +++ b/app/templates/base/base.html @@ -9,6 +9,8 @@ {% include "base/footer.html" %} + {% include "base/alerts.html" %} + {% include "base/scripts.html" %} diff --git a/app/templates/base/navbar.html b/app/templates/base/navbar.html index c5716e8..c526f14 100644 --- a/app/templates/base/navbar.html +++ b/app/templates/base/navbar.html @@ -69,245 +69,18 @@ diff --git a/app/templates/base/navbar/account.html b/app/templates/base/navbar/account.html new file mode 100644 index 0000000..4ca29aa --- /dev/null +++ b/app/templates/base/navbar/account.html @@ -0,0 +1,65 @@ +{% if current_user.is_authenticated %} +
+

+ + {{ current_user.username }} +

+ + + + + Notifications + + + + + + Trophées + + + + + + Topics favoris + + + + + + Panel d'administration + + +
+ + + + + + Paramètres + + + + + + Déconnexion + +
+{% else %} +
+

+ Invité +

+ +
+ Mot de passe oublié ? + Inscription +
+{% endif %} diff --git a/app/templates/base/navbar/forum.html b/app/templates/base/navbar/forum.html new file mode 100644 index 0000000..491a272 --- /dev/null +++ b/app/templates/base/navbar/forum.html @@ -0,0 +1,25 @@ +
+

+ + + + Forum +

+ Vie communautaire + Projets de programmation + Questions et problèmes + Discussions + Administration + CreativeCalc + +
+ +

Derniers commentaires

+ +
diff --git a/app/templates/base/navbar/news.html b/app/templates/base/navbar/news.html new file mode 100644 index 0000000..b81a7cc --- /dev/null +++ b/app/templates/base/navbar/news.html @@ -0,0 +1,23 @@ +
+

+ + + + Actualités +

+ Casio + Arduino + Projets communautaires + Divers + +
+ +

Derniers articles

+ +
diff --git a/app/templates/base/navbar/programs.html b/app/templates/base/navbar/programs.html new file mode 100644 index 0000000..8919553 --- /dev/null +++ b/app/templates/base/navbar/programs.html @@ -0,0 +1,60 @@ +
+

+ + + + Programmes +

+ + + + + Jeux + + + + + + Utilitaires + + + + + + Logiciels + + + + + + Top 20 + + +
+ + + + + + Recherche avancée + + +
+ +

Sélection de la semaine

+ + +
+

Coup de cœur

+ +
diff --git a/app/templates/base/navbar/sprites.html b/app/templates/base/navbar/sprites.html new file mode 100644 index 0000000..5194573 --- /dev/null +++ b/app/templates/base/navbar/sprites.html @@ -0,0 +1,13 @@ +
+

+ + + + Sprites +

+ Personnages + Environnement + Objets + Interfaces + Générateur +
diff --git a/app/templates/base/navbar/tools.html b/app/templates/base/navbar/tools.html new file mode 100644 index 0000000..1f08e77 --- /dev/null +++ b/app/templates/base/navbar/tools.html @@ -0,0 +1,27 @@ +
+

+ + + + Outils +

+ + + + + + Forge GitLab + + + + + + Casio Universal Wiki + + + + + + SH4 Compatibility Tool + +
diff --git a/app/templates/base/navbar/tutorials.html b/app/templates/base/navbar/tutorials.html new file mode 100644 index 0000000..0fe2d66 --- /dev/null +++ b/app/templates/base/navbar/tutorials.html @@ -0,0 +1,13 @@ +
+

+ + + + Tutoriels +

+ Basic Casio + C/C++ Casio + Arduino +
+ Foire aux questions (FAQ) +
diff --git a/app/templates/register.html b/app/templates/register.html index d816266..2eb4771 100644 --- a/app/templates/register.html +++ b/app/templates/register.html @@ -1,41 +1,41 @@ -{% extends "footer.html" %} +{% extends "base/container.html" %} {% block content %}
-

Inscription :

- -
- {{ form2.hidden_tag() }} -

- {{ form2.username.label }}
- {{ form2.username(size=32) }}
- {% for error in form2.username.errors %} - [{{ error }}] - {% endfor %} -

-

- {{ form2.email.label }}
- {{ form2.email(size=64) }}
- {% for error in form2.email.errors %} - [{{ error }}] - {% endfor %} -

-

- {{ form2.password.label }}
- {{ form2.password(size=32) }}
- {% for error in form2.password.errors %} - [{{ error }}] - {% endfor %} -

-

- {{ form2.password2.label }}
- {{ form2.password2(size=32) }}
- {% for error in form2.password2.errors %} - [{{ error }}] - {% endfor %} -

-

{{ form2.submit() }}

-
+

Inscription :

+ +
+ {{ form2.hidden_tag() }} +

+ {{ form2.username.label }}
+ {{ form2.username(size=32) }}
+ {% for error in form2.username.errors %} + [{{ error }}] + {% endfor %} +

+

+ {{ form2.email.label }}
+ {{ form2.email(size=64) }}
+ {% for error in form2.email.errors %} + [{{ error }}] + {% endfor %} +

+

+ {{ form2.password.label }}
+ {{ form2.password(size=32) }}
+ {% for error in form2.password.errors %} + [{{ error }}] + {% endfor %} +

+

+ {{ form2.password2.label }}
+ {{ form2.password2(size=32) }}
+ {% for error in form2.password2.errors %} + [{{ error }}] + {% endfor %} +

+

{{ form2.submit() }}

+
{% endblock %}