From: Stephen Finucane Date: Tue, 29 Mar 2016 16:10:20 +0000 (+0100) Subject: ui: Cleanup the navbar "brand" X-Git-Tag: v2.0.0-rc1~376 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=657dce56798ed58bde08ea2f808989a516964671;p=thirdparty%2Fpatchwork.git ui: Cleanup the navbar "brand" The text shown in the top-left corner of a navbar, known as the "brand" in Bootstrap parlance, normally brings you to the homepage. However, when viewing patches or details about a project this name of this project is included in this link. This gave some users the idea that clicking this button would return them to the project patch list instead. To resolve this confusion, break the project name and any other non-Patchwork title out of this clickable link. A new "navbar-subnav" style is introduced to do this, seeing as Bootstrap does not appear to support something like this natively. Once this is done, this also allows for the removal of the "All Projects" button, which both duplicates this functionality and did nothing when there was only one project available on an instance. Signed-off-by: Stephen Finucane --- diff --git a/htdocs/css/style.css b/htdocs/css/style.css index 0ec11e0e..f7f7b6a8 100644 --- a/htdocs/css/style.css +++ b/htdocs/css/style.css @@ -21,16 +21,27 @@ pre { top: 17em; } -.navbar-brand>a { +/* Bootstrap overrides */ + +.navbar-inverse .navbar-brand > a { color: white; } -.navbar-patchwork { - border-radius: 0px; - margin-bottom: 0px; +.navbar-inverse .navbar-nav > li > a { + color: #999; +} + +/* Bootstrap extensions */ + +.navbar-subbrand { + float: left; + height: 50px; + padding: 15px 15px 15px 0; + font-size: 18px; + line-height: 20px; } -.navbar-patchwork .navbar-nav>li>a { +.navbar-subbrand { color: #999; } diff --git a/patchwork/templates/patchwork/projects.html b/patchwork/templates/patchwork/projects.html index 0db12275..9ce1918c 100644 --- a/patchwork/templates/patchwork/projects.html +++ b/patchwork/templates/patchwork/projects.html @@ -1,19 +1,8 @@ {% extends "base.html" %} {% block title %}Project List{% endblock %} -{% block navbarmenu %} - -{% endblock %} {% block body %} -
- {% if projects %} {% for p in projects %} {% cycle '
' '' '' %} @@ -46,5 +35,4 @@ {% else %}

Patchwork doesn't have any projects to display!

{% endif %} - {% endblock %} diff --git a/templates/base.html b/templates/base.html index 8521edf8..af0c1245 100644 --- a/templates/base.html +++ b/templates/base.html @@ -23,7 +23,7 @@ {% block headers %}{% endblock %} -