From 0de732bd0f815d25c1c0853bf45790642ddd01e3 Mon Sep 17 00:00:00 2001 From: Emmanuel Cazenave Date: Mon, 9 Jul 2018 17:03:30 +0200 Subject: [PATCH] rouen: customize user-info zone (#25153) --- static/rouen/_custom.scss | 46 +++++++++++++++++++ static/rouen/img/picto_btn_connexion.svg | 14 ++++++ .../variants/rouen/combo/page_template.html | 19 ++++++++ 3 files changed, 79 insertions(+) create mode 100644 static/rouen/img/picto_btn_connexion.svg create mode 100644 templates/variants/rouen/combo/page_template.html diff --git a/static/rouen/_custom.scss b/static/rouen/_custom.scss index 318973a..be208c5 100644 --- a/static/rouen/_custom.scss +++ b/static/rouen/_custom.scss @@ -239,3 +239,49 @@ div#nav #nav-button.toggled + ul li { } } } + +div#toplinks { + border: none; + border-radius: 0; + box-shadow: none; + padding: 0; + a.login,a.logout { + @include flexbox(); + @include vendor-prefix(justify-content, flex-end); + div.logtext { + background: $primary-color; + display: block; + color: $black; + font-size: 122%; + font-weight: 700; + height: 2em; + padding: 0 0.5em; + text-align: center; + line-height: 2em; + } + div.logicon { + background-color: $black; + background-image: url(img/picto_btn_connexion.svg); + background-position: center; + background-repeat: no-repeat; + background-size: 70%; + content: ""; + display: block; + width: 2em; + } + } + a.registration { + @include flexbox(); + @include vendor-prefix(justify-content, flex-end); + color: #C64A59; + font-weight: 500; + margin-top: 0.4em; + span.pre-register { + color: #333333; + margin-right: 0.2em; + } + span.register { + text-decoration: underline; + } + } +} diff --git a/static/rouen/img/picto_btn_connexion.svg b/static/rouen/img/picto_btn_connexion.svg new file mode 100644 index 0000000..f34ed2d --- /dev/null +++ b/static/rouen/img/picto_btn_connexion.svg @@ -0,0 +1,14 @@ + + + + + + + + diff --git a/templates/variants/rouen/combo/page_template.html b/templates/variants/rouen/combo/page_template.html new file mode 100644 index 0000000..1cac0cf --- /dev/null +++ b/templates/variants/rouen/combo/page_template.html @@ -0,0 +1,19 @@ +{% extends "../../combo/page_template.html" %} +{% load combo %} + +{% block user-info %} +{% skeleton_extra_placeholder user-info %} + {% if user.is_authenticated %} +
Déconnexion
+ {% if idp_account_url %}{% endif %} + {{user.first_name}} {{user.last_name}}{% if idp_account_url %}{% endif %} + {% else %} + {% if idp_registration_url %} +
Connexion
+ Pas de compte ?Enregistrez vous ! + {% else %} + Connexion / Inscription + {% endif %} + {% endif %} +{% end_skeleton_extra_placeholder %} +{% endblock %} -- 2.18.0