From 07a685f3c4a62839457c1ba23ec53e27aa84f02d Mon Sep 17 00:00:00 2001 From: lephe <> Date: Fri, 8 Feb 2019 21:14:25 +0100 Subject: [PATCH] header: place elements as discussed with @Dark-Storm --- app/models/users.py | 2 +- app/static/css/global.css | 2 +- app/static/css/header.css | 34 +++++++++++++++++----------------- app/templates/base/header.html | 9 +++++++++ 4 files changed, 28 insertions(+), 19 deletions(-) diff --git a/app/models/users.py b/app/models/users.py index a7db12f..084bd58 100644 --- a/app/models/users.py +++ b/app/models/users.py @@ -127,7 +127,7 @@ class Member(User, db.Model): def priv(self, priv): """Check whether the member has the specified privilege.""" - if SpecialPrivilege.query.filter_by(uid=self.id, priv=priv): + if SpecialPrivilege.query.filter_by(mid=self.id, priv=priv): return True return False # return db.session.query(User, Group, GroupPrivilege).filter( diff --git a/app/static/css/global.css b/app/static/css/global.css index 0eb9c7e..5174e57 100644 --- a/app/static/css/global.css +++ b/app/static/css/global.css @@ -119,7 +119,7 @@ input[type="checkbox"] { .bg-orange:hover, .bg-orange:focus, .bg-orange:active { - background: #d88c1b; + background: #de8d13; } .bg-white, diff --git a/app/static/css/header.css b/app/static/css/header.css index 68b93da..6b671ea 100644 --- a/app/static/css/header.css +++ b/app/static/css/header.css @@ -19,9 +19,18 @@ header svg { transition: .15s ease; } header a:hover > svg, header a:focus > svg { - filter: brightness(.5); + fill: black; +} +header a { + fill: #484848; + cursor: pointer; } +header form { + /* -24px for the search icon, -2px for the spacing between the search icon + and the field, +16px for spacing with the links */ + margin-right: -10px; +} header input[type="search"] { display: inline-block; width: 250px; padding: 5px 35px 5px 10px; @@ -42,25 +51,16 @@ header input[type="search"]:focus ~ a > svg > path { fill: #333333; } -#spotlight a { - padding: 8px 18px 6px 18px; - color: #727272; font-size: 15px; - border-bottom: 2px solid rgba(93, 123, 141, 0); - transition: border .15s ease; +#spotlight { + margin-left: 16px; } -#spotlight a:hover, header #spotlight a:focus { - border-bottom: 2px solid rgba(93, 123, 141, 1); -} - - #spotlight a { - background: #d15151; - color: white; font-size: 11px; + background: #d23a2f; padding: 8px 18px 6px 18px; + color: white; height: 24px; line-height: 24px; padding: 6px 12px; - border-radius: 2px; border: 1px solid rgba(0, 0, 255, .05); + border-radius: 2px; border: 1px solid rgba(0, 0, 255, .1); } #spotlight a:hover { - background: #bd3535; - border-bottom: 1px solid rgba(128, 128, 255, .05); - border-color: rgba(128, 128, 255, .03); + background: #b32a20; + border-color: rgba(128, 128, 255, .05); } diff --git a/app/templates/base/header.html b/app/templates/base/header.html index c2ffd65..b49d71f 100644 --- a/app/templates/base/header.html +++ b/app/templates/base/header.html @@ -4,6 +4,7 @@ Test {% endblock %} +
@@ -13,6 +14,14 @@
+{% if current_user.is_authenticated %} + + + + + +{% endif %} +
Concours Jeu du mois : février 2019