Author
|
zPlus <zplus@peers.community>
2018-07-23 05:45:22
|
Committer
|
zPlus <zplus@peers.community>
2018-07-23 05:45:22
|
Commit
|
cc0ee4e
(patch)
|
Tree
|
55863ba
|
Parent(s)
|
|
Reorganize header links.
modified: freepost/templates/layout.html
commits diff:
c321d99..cc0ee4e
1 file changed,
31 insertions,
27 deletions
—
download
Diffstat
Diff options
+31/-27
M freepost/templates/layout.html
44
|
44
|
|
</a>
|
45
|
45
|
|
{% endif %}
|
46
|
46
|
|
</div>
|
|
47
|
+ |
|
|
48
|
+ |
<div class="menu">
|
|
49
|
+ |
<a href="{{ url ('topic', name=topic) if topic else url ('homepage') }}" class="flex-item {{ 'active_page' if active_page == 'hot' }}">
|
|
50
|
+ |
Hot
|
|
51
|
+ |
</a>
|
|
52
|
+ |
<a href="{{ url ('topic', name=topic) if topic else url ('homepage') }}?sort=new" class="flex-item {{ 'active_page' if active_page == 'new' }}">
|
|
53
|
+ |
New
|
|
54
|
+ |
</a>
|
|
55
|
+ |
|
|
56
|
+ |
{% if user %}
|
|
57
|
+ |
<a href="{{ url ('submit') }}{{ '?topic=' ~ topic if topic }}" class="flex-item {{ 'active_page' if active_page == 'submit' }}">
|
|
58
|
+ |
Submit
|
|
59
|
+ |
</a>
|
|
60
|
+ |
{% endif %}
|
|
61
|
+ |
|
|
62
|
+ |
<a href="{{ url ('search') }}" class="flex-item {{ 'active_page' if active_page == 'search' }}">Search</a>
|
|
63
|
+ |
|
|
64
|
+ |
<a href="{{ url ('about') }}" class="flex-item {{ 'active_page' if active_page == 'about' }}">About</a>
|
|
65
|
+ |
|
|
66
|
+ |
{% if user %}
|
|
67
|
+ |
{% set unread_messages = new_messages (user.id) %}
|
47
|
68
|
|
|
48
|
|
- |
{% if user %}
|
49
|
|
- |
<a href="{{ url ('submit') }}{{ '?topic=' ~ topic if topic }}" class="flex-item {{ 'active_page' if active_page == 'submit' }}">
|
50
|
|
- |
Submit
|
|
69
|
+ |
{% if unread_messages %}
|
|
70
|
+ |
<a href="{{ url ('user_replies') }}" class="new_messages flex-item">
|
|
71
|
+ |
{{ user.username }} ({{ unread_messages }})
|
51
|
72
|
|
</a>
|
52
|
|
- |
{% endif %}
|
53
|
|
- |
|
54
|
|
- |
<a href="{{ url ('search') }}" class="flex-item {{ 'active_page' if active_page == 'search' }}">Search</a>
|
55
|
|
- |
|
56
|
|
- |
<a href="{{ url ('about') }}" class="flex-item {{ 'active_page' if active_page == 'about' }}">About</a>
|
57
|
|
- |
|
58
|
|
- |
{% if user %}
|
59
|
|
- |
{% set unread_messages = new_messages (user.id) %}
|
60
|
|
- |
|
61
|
|
- |
{% if unread_messages %}
|
62
|
|
- |
<a href="{{ url ('user_replies') }}" class="new_messages flex-item">
|
63
|
|
- |
{{ user.username }} ({{ unread_messages }})
|
64
|
|
- |
</a>
|
65
|
|
- |
{% else %}
|
66
|
|
- |
<a href="{{ url ('user_settings') }}" class="flex-item {{ 'active_page' if active_page == 'user' }}">
|
67
|
|
- |
{{ user.username }}
|
68
|
|
- |
</a>
|
69
|
|
- |
{% endif %}
|
70
|
|
- |
|
71
|
|
- |
<a href="{{ url ('logout') }}" class="flex-item">Log out</a>
|
72
|
73
|
|
{% else %}
|
73
|
|
- |
<a href="{{ url ('login') }}" class="flex-item {{ 'active_page' if active_page == 'login' }}">Log in</a>
|
|
74
|
+ |
<a href="{{ url ('user_settings') }}" class="flex-item {{ 'active_page' if active_page == 'user' }}">
|
|
75
|
+ |
{{ user.username }}
|
|
76
|
+ |
</a>
|
74
|
77
|
|
{% endif %}
|
75
|
|
- |
</div>
|
76
|
78
|
|
|
77
|
|
- |
<div class="submenu">
|
78
|
|
- |
</div>
|
|
79
|
+ |
<a href="{{ url ('logout') }}" class="flex-item">Log out</a>
|
|
80
|
+ |
{% else %}
|
|
81
|
+ |
<a href="{{ url ('login') }}" class="flex-item {{ 'active_page' if active_page == 'login' }}">Log in</a>
|
|
82
|
+ |
{% endif %}
|
79
|
83
|
|
</div>
|
80
|
84
|
|
</div>
|
81
|
85
|
|
|