소스 검색

header: place elements as discussed with @Dark-Storm

master
lephe 9 달 전
부모
커밋
07a685f3c4
4개의 변경된 파일28개의 추가작업 그리고 19개의 파일을 삭제
  1. 1
    1
      app/models/users.py
  2. 1
    1
      app/static/css/global.css
  3. 17
    17
      app/static/css/header.css
  4. 9
    0
      app/templates/base/header.html

+ 1
- 1
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(

+ 1
- 1
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,

+ 17
- 17
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);
}

+ 9
- 0
app/templates/base/header.html 파일 보기

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

Loading…
취소
저장