diff options
author | Aurélien Bompard <aurelien@bompard.org> | 2013-07-15 17:28:00 +0200 |
---|---|---|
committer | Aurélien Bompard <aurelien@bompard.org> | 2013-07-15 17:28:00 +0200 |
commit | fd5bdaf0bd47260e4a797ff2156036a80d3ac3ee (patch) | |
tree | 6e4faf42ceac45e1d134c08a8e251a4389afc43a /hyperkitty | |
parent | 1c0db6b8e3b262b9cdba6a32e71c9bbac8b5f7cc (diff) | |
download | hyperkitty-fd5bdaf0bd47260e4a797ff2156036a80d3ac3ee.tar.gz hyperkitty-fd5bdaf0bd47260e4a797ff2156036a80d3ac3ee.tar.xz hyperkitty-fd5bdaf0bd47260e4a797ff2156036a80d3ac3ee.zip |
Make real breadcrumbs in the top bar
Diffstat (limited to 'hyperkitty')
-rw-r--r-- | hyperkitty/static/hyperkitty/css/hyperkitty-base.css | 21 | ||||
-rw-r--r-- | hyperkitty/templates/base.html | 53 | ||||
-rw-r--r-- | hyperkitty/views/list.py | 1 | ||||
-rw-r--r-- | hyperkitty/views/pages.py | 1 |
4 files changed, 67 insertions, 9 deletions
diff --git a/hyperkitty/static/hyperkitty/css/hyperkitty-base.css b/hyperkitty/static/hyperkitty/css/hyperkitty-base.css index 4455312..85f6cc9 100644 --- a/hyperkitty/static/hyperkitty/css/hyperkitty-base.css +++ b/hyperkitty/static/hyperkitty/css/hyperkitty-base.css @@ -17,3 +17,24 @@ ul.nav.auth { #search-form form { margin-bottom: 0; } + +.navbar .breadcrumb { + padding: 10px 30px; + margin: 0; + float: left; + background-color: transparent; +} +.navbar .breadcrumb > li > a { + color: #777777; + text-decoration: none; + text-shadow: 0 1px 0 #FFFFFF; +} +.navbar .breadcrumb > li > a:focus, +.navbar .breadcrumb > li > a:hover { + color: #333333; + text-decoration: none; + background-color: transparent; +} +.navbar .breadcrumb > li > .divider { + color: #999999; +} diff --git a/hyperkitty/templates/base.html b/hyperkitty/templates/base.html index 48ab126..393bb80 100644 --- a/hyperkitty/templates/base.html +++ b/hyperkitty/templates/base.html @@ -52,20 +52,55 @@ <a class="brand" href="{% url 'root' %}">{{ app_name|title }}</a> - <ul class="nav"> + <ul class="breadcrumb"> + <li + {% if view_name == 'all_lists' %} + class="active"> + {% else %} + ><a href="{% url 'root' %}"> + {% endif %} + All lists + {% if view_name != 'all_lists' %} + </a> + {% endif %} - <li {% if all_lists %} class="active"{% endif %}> - <a href="{% url 'root' %}">All lists</a> - </li> + {% if mlist %} + <span class="divider">></span></li> + <li + {% if view_name == 'overview' %} + class="active"> + {% else %} + ><a href="{% url 'list_overview' mlist_fqdn=mlist.name %}"> + {% endif %} + {{mlist.name}} + {% if view_name != 'overview' %} + </a> + {% endif %} + {% endif %} - {% if mlist %} - <li id="list_name" class="active"> - <a href="{% url 'list_overview' mlist_fqdn=mlist.name %}">{{mlist.name}}</a> - </li> - {% endif %} + {% if month %} + <span class="divider">></span></li> + <li + {% if not subject %} + class="active"> + {% else %} + ><a href="{% url 'archives_with_month' mlist_fqdn=mlist.name year=month.year month=month.month %}"> + {% endif %} + {{ month|date:"F Y" }} + {% if subject %} + </a> + {% endif %} + {% endif %} + {% if subject %} + <span class="divider">></span></li> + <li class="active"> + {{ subject|truncatechars:"15" }} + {% endif %} + </li> </ul> + </div> </div> </div> diff --git a/hyperkitty/views/list.py b/hyperkitty/views/list.py index 89c113c..a655758 100644 --- a/hyperkitty/views/list.py +++ b/hyperkitty/views/list.py @@ -233,6 +233,7 @@ def overview(request, mlist_fqdn=None): archives_baseurl = archives_baseurl.rpartition("/")[0] context = { + 'view_name': 'overview', 'mlist' : mlist, 'top_threads': top_threads[:5], 'most_active_threads': active_threads[:5], diff --git a/hyperkitty/views/pages.py b/hyperkitty/views/pages.py index c6f3582..af9abd8 100644 --- a/hyperkitty/views/pages.py +++ b/hyperkitty/views/pages.py @@ -38,6 +38,7 @@ def index(request): lists = store.get_lists() context = { + 'view_name': 'all_lists', 'all_lists': lists, } return render(request, "index.html", context) |