header: place elements as discussed with @Dark-Storm

This commit is contained in:
lephe 2019-02-08 21:14:25 +01:00
parent d33b90aff2
commit 07a685f3c4
4 changed files with 28 additions and 19 deletions

View File

@ -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(

View File

@ -119,7 +119,7 @@ input[type="checkbox"] {
.bg-orange:hover,
.bg-orange:focus,
.bg-orange:active {
background: #d88c1b;
background: #de8d13;
}
.bg-white,

View File

@ -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);
}

View File

@ -4,6 +4,7 @@
Test
{% endblock %}
</div>
<div style="flex: auto 1 0"></div>
<form action={{url_for('search')}} method="get">
<input type="search" name="q" id="q" placeholder="{{search_form.label}}" />
<a role="button" onclick="this.parentNode.submit();" href="#" class="light-hidden">
@ -13,6 +14,14 @@
</a>
</form>
{% if current_user.is_authenticated %}
<a href="{{ url_for('user', username=current_user.name) }}" role=button title='Mon compte'>
<svg viewBox="0 0 24 24">
<path d="M12,19.2C9.5,19.2 7.29,17.92 6,16C6.03,14 10,12.9 12,12.9C14,12.9 17.97,14 18,16C16.71,17.92 14.5,19.2 12,19.2M12,5A3,3 0 0,1 15,8A3,3 0 0,1 12,11A3,3 0 0,1 9,8A3,3 0 0,1 12,5M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z"></path>
</svg>
</a>
{% endif %}
<div id="spotlight">
<a href="#">Concours</a>
<a href="#">Jeu du mois : février 2019</a>