Mercurial > wikked
annotate wikked/templates/nav.html @ 487:1ec071454790
web: UX improvements for the sidebar menu.
- Open/close the menu on click instead of mouse hover, so it's more friendly
to mobile/touch devices.
- Rework how the menu lock works.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 01 Nov 2018 21:25:23 -0700 |
parents | 8ee6e7649aba |
children |
rev | line source |
---|---|
341
37f426e067c4
Big refactor to get rid of this whole single page app crap.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
1 <a id="wiki-menu-shortcut" class="wiki-logo"> |
37f426e067c4
Big refactor to get rid of this whole single page app crap.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
2 <span>W</span> |
37f426e067c4
Big refactor to get rid of this whole single page app crap.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
3 </a> |
487
1ec071454790
web: UX improvements for the sidebar menu.
Ludovic Chabant <ludovic@chabant.com>
parents:
466
diff
changeset
|
4 <nav id="wiki-menu" role="navigation" class="pure-menu pure-menu-open"> |
1ec071454790
web: UX improvements for the sidebar menu.
Ludovic Chabant <ludovic@chabant.com>
parents:
466
diff
changeset
|
5 <div id="wiki-menu-header" title="Pin/unpin the wiki menu."> |
1ec071454790
web: UX improvements for the sidebar menu.
Ludovic Chabant <ludovic@chabant.com>
parents:
466
diff
changeset
|
6 <i id="wiki-menu-lock" class="fas fa-{{nav.lock_icon}}"></i> |
341
37f426e067c4
Big refactor to get rid of this whole single page app crap.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
7 </div> |
445
b8db406cc5e4
web: Fix UI bugs and do a few improvements.
Ludovic Chabant <ludovic@chabant.com>
parents:
411
diff
changeset
|
8 <ul class="pure-menu-list"> |
466
8ee6e7649aba
web: Update to Font Awesome 5.
Ludovic Chabant <ludovic@chabant.com>
parents:
461
diff
changeset
|
9 {%if nav.url_home%}<li class="pure-menu-item"><a href="{{nav.url_home}}"><i class="fas fa-home"></i> Home</a></li>{%endif%} |
8ee6e7649aba
web: Update to Font Awesome 5.
Ludovic Chabant <ludovic@chabant.com>
parents:
461
diff
changeset
|
10 {%if nav.url_new%}<li class="pure-menu-item"><a href="{{nav.url_new}}"><i class="fas fa-file"></i> New Page</a></li>{%endif%} |
8ee6e7649aba
web: Update to Font Awesome 5.
Ludovic Chabant <ludovic@chabant.com>
parents:
461
diff
changeset
|
11 {%if nav.url_read%}<li class="pure-menu-item"><a href="{{nav.url_read}}"><i class="fas fa-book"></i> Read</a></li>{%endif%} |
8ee6e7649aba
web: Update to Font Awesome 5.
Ludovic Chabant <ludovic@chabant.com>
parents:
461
diff
changeset
|
12 {%if nav.url_edit%}<li class="pure-menu-item"><a href="{{nav.url_edit}}"><i class="fas fa-edit"></i> Edit</a></li>{%endif%} |
8ee6e7649aba
web: Update to Font Awesome 5.
Ludovic Chabant <ludovic@chabant.com>
parents:
461
diff
changeset
|
13 {%if nav.url_hist%}<li class="pure-menu-item"><a href="{{nav.url_hist}}"><i class="fas fa-road"></i> History</a></li>{%endif%} |
341
37f426e067c4
Big refactor to get rid of this whole single page app crap.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
14 </ul> |
37f426e067c4
Big refactor to get rid of this whole single page app crap.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
15 <form role="search" id="search" class="pure-form pure-menu-form pure-menu-divider" action="/search"> |
37f426e067c4
Big refactor to get rid of this whole single page app crap.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
16 <fieldset> |
37f426e067c4
Big refactor to get rid of this whole single page app crap.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
17 <input type="text" name="q" id="search-query" class="pure-input-1" placeholder="Search..." autocomplete="off"></input> |
37f426e067c4
Big refactor to get rid of this whole single page app crap.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
18 <ul id="search-preview"></ul> |
37f426e067c4
Big refactor to get rid of this whole single page app crap.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
19 </fieldset> |
37f426e067c4
Big refactor to get rid of this whole single page app crap.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
20 </form> |
37f426e067c4
Big refactor to get rid of this whole single page app crap.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
21 {%if nav.extras%} |
445
b8db406cc5e4
web: Fix UI bugs and do a few improvements.
Ludovic Chabant <ludovic@chabant.com>
parents:
411
diff
changeset
|
22 <ul class="pure-menu-list"> |
341
37f426e067c4
Big refactor to get rid of this whole single page app crap.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
23 {%for e in nav.extras%} |
466
8ee6e7649aba
web: Update to Font Awesome 5.
Ludovic Chabant <ludovic@chabant.com>
parents:
461
diff
changeset
|
24 <li class="pure-menu-item"><a href="{{e.url}}">{%if e.icon%}<i class="fas fa-{{e.icon}}"></i> {%endif%}{{e.title}}</a></li> |
341
37f426e067c4
Big refactor to get rid of this whole single page app crap.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
25 {%endfor%} |
37f426e067c4
Big refactor to get rid of this whole single page app crap.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
26 </ul> |
37f426e067c4
Big refactor to get rid of this whole single page app crap.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
27 {%endif%} |
445
b8db406cc5e4
web: Fix UI bugs and do a few improvements.
Ludovic Chabant <ludovic@chabant.com>
parents:
411
diff
changeset
|
28 <ul class="pure-menu-list"> |
341
37f426e067c4
Big refactor to get rid of this whole single page app crap.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
29 {%if auth.is_logged_in%} |
466
8ee6e7649aba
web: Update to Font Awesome 5.
Ludovic Chabant <ludovic@chabant.com>
parents:
461
diff
changeset
|
30 <li class="pure-menu-item"><a href="{{auth.url_profile}}"><i class="fas fa-cog"></i> {{auth.username}}</a></li> |
8ee6e7649aba
web: Update to Font Awesome 5.
Ludovic Chabant <ludovic@chabant.com>
parents:
461
diff
changeset
|
31 <li class="pure-menu-item"><a href="{{auth.url_logout}}"><i class="fas fa-sign-out-alt"></i> Logout</a></li> |
341
37f426e067c4
Big refactor to get rid of this whole single page app crap.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
32 {%else%} |
466
8ee6e7649aba
web: Update to Font Awesome 5.
Ludovic Chabant <ludovic@chabant.com>
parents:
461
diff
changeset
|
33 <li class="pure-menu-item"><a href="{{auth.url_login}}"><i class="fas fa-sign-in-alt"></i> Login</a></li> |
341
37f426e067c4
Big refactor to get rid of this whole single page app crap.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
34 {%endif%} |
37f426e067c4
Big refactor to get rid of this whole single page app crap.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
35 </ul> |
37f426e067c4
Big refactor to get rid of this whole single page app crap.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
36 </nav> |