diff --git a/app/routes.py b/app/routes.py index fe7f6f6..a327b31 100644 --- a/app/routes.py +++ b/app/routes.py @@ -10,6 +10,9 @@ from app.models import User def index(): form = LoginForm() + flash('pseudo ou mot de passe invalide', 'error') + flash('tout ça c\'est ok !', 'ok') + flash('mais ça non', 'error') if form.validate_on_submit(): user = User.query.filter_by(username=form.username.data).first() if user is None or not user.check_password(form.password.data): diff --git a/app/static/css/global.css b/app/static/css/global.css index 6fe5e6f..e03131d 100644 --- a/app/static/css/global.css +++ b/app/static/css/global.css @@ -167,13 +167,20 @@ input[type="button"].raised:active { } /* Input text */ +input[type="text"], +input[type="search"], +input[type="password"] { + background: #FFFFFF; color: #000000; +} + input[type="text"]:focus, input[type="search"]:focus, input[type="password"]:focus { - + box-shadow: :0 0 0 0.2rem rgba(0,123,255,0.25); } + section { margin: 10px 5%; } @@ -186,4 +193,10 @@ section h1 { section * { transition: .15s ease; -} \ No newline at end of file +} + + +/* Bootstrap-style rules */ +.flex { + display: flex; +} diff --git a/app/static/css/navbar.css b/app/static/css/navbar.css index d2dd033..1b36e6f 100644 --- a/app/static/css/navbar.css +++ b/app/static/css/navbar.css @@ -180,7 +180,7 @@ nav a:focus { margin-right: 10px; } -#menu form p { +#menu form div { padding: 0 5%; } #menu form input[type="text"] { diff --git a/app/templates/base/alerts.html b/app/templates/base/alerts.html index 1157c2e..276cab1 100644 --- a/app/templates/base/alerts.html +++ b/app/templates/base/alerts.html @@ -1,15 +1,15 @@ -{% with messages = get_flashed_messages() %} -{% if messages %} -{% for message in messages %} -
- - - - - {{ message }} - - -
-{% endfor %} -{% endif %} -{% endwith %} \ No newline at end of file +{% with messages = get_flashed_messages(with_categories=true) %} + {% if messages %} + {% for category, message in messages %} +
+ + + + + {{ message }} + + +
+ {% endfor %} + {% endif %} +{% endwith %} diff --git a/app/templates/base/navbar.html b/app/templates/base/navbar.html index bd61bac..c526f14 100644 --- a/app/templates/base/navbar.html +++ b/app/templates/base/navbar.html @@ -69,7 +69,6 @@ diff --git a/app/templates/base/navbar/account.html b/app/templates/base/navbar/account.html index 4ca29aa..529a9bc 100644 --- a/app/templates/base/navbar/account.html +++ b/app/templates/base/navbar/account.html @@ -49,14 +49,14 @@

Invité

-
+ {{ form.hidden_tag() }} -

+

{{ form.username(size=32, placeholder="Identifiant") }} {{ form.password(size=32, placeholder="Mot de passe") }} -

-

{{ form.submit() }}

-

{{ form.remember_me.label }} {{ form.remember_me() }}

+
+
{{ form.submit() }}
+
{{ form.remember_me.label }} {{ form.remember_me() }}

Mot de passe oublié ? diff --git a/app/templates/register.html b/app/templates/register.html index 2eb4771..f2b5725 100644 --- a/app/templates/register.html +++ b/app/templates/register.html @@ -1,41 +1,56 @@ {% extends "base/container.html" %} {% block content %} -
+
+
+

Planète Casio

+

Pourquoi s'inscrire sur Planète Casio ? Parce que c'est cool et qu'ici on peut mettre plein de truc sympas. + Vous saviez que Planète Casio c'est : +

    +
  • Presque 10000 membres
  • +
  • (Bon ok, seulement une vingtaine de vraiments actifs)
  • +
  • Plein de programmes
  • +
  • Une multitude de tutos pour mieux comprendre comment fonctionne sa calto
  • +
  • Mais surtout, une communauté au top !
  • +
+ Et oui, ça fait beaucoup, mais bon, je commence à être à court de trucs à écrire ici, donc bon… +

+
+
+

Inscription :

-

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() }}

-
+
+ {{ form2.hidden_tag() }} +
+ {{ form2.username.label }} + {{ form2.username() }} + {% for error in form2.username.errors %} + [{{ error }}] + {% endfor %} +
+
+ {{ form2.email.label }} + {{ form2.email() }} + {% for error in form2.email.errors %} + [{{ error }}] + {% endfor %} +
+
+ {{ form2.password.label }} + {{ form2.password() }} + {% for error in form2.password.errors %} + [{{ error }}] + {% endfor %} +
+
+ {{ form2.password2.label }} + {{ form2.password2() }} + {% for error in form2.password2.errors %} + [{{ error }}] + {% endfor %} +
+
{{ form2.submit() }}
+
+
{% endblock %} diff --git a/app/templates/validation.html b/app/templates/validation.html index cf2108b..0b5ffa0 100644 --- a/app/templates/validation.html +++ b/app/templates/validation.html @@ -2,10 +2,9 @@ {% block content %}
-

ici il y aura la page qui demande de checker les mails pour valider


- Retour à la page d'acceuil + Retour à la page d'accueil
{% endblock content %} diff --git a/assets/diagramme_1.dia b/assets/diagramme_1.dia new file mode 100644 index 0000000..048f9a8 Binary files /dev/null and b/assets/diagramme_1.dia differ