[extensions-web: 46/75] Add highlight for current pages on global navigation.



commit db4f0059853370330674760a894cf56f3bd2a81e
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue Sep 20 16:21:08 2011 -0400

    Add highlight for current pages on global navigation.

 .../extensions/templates/extensions/detail.html    |    2 ++
 .../templates/extensions/error-report.html         |    2 ++
 .../extensions/templates/extensions/list.html      |    2 ++
 .../extensions/templates/extensions/local.html     |    2 ++
 .../templates/extensions/upload-file.html          |    2 ++
 sweettooth/static/css/sweettooth.css               |    4 +++-
 sweettooth/static/css/template.css                 |    8 ++++++++
 sweettooth/templates/base.html                     |    8 ++++----
 8 files changed, 25 insertions(+), 5 deletions(-)
---
diff --git a/sweettooth/extensions/templates/extensions/detail.html b/sweettooth/extensions/templates/extensions/detail.html
index 41edae1..01a007f 100644
--- a/sweettooth/extensions/templates/extensions/detail.html
+++ b/sweettooth/extensions/templates/extensions/detail.html
@@ -68,3 +68,5 @@
         $("form .rating").rating();
     });
 {% endblock %}
+
+{% block navclass %}main{% endblock %}
diff --git a/sweettooth/extensions/templates/extensions/error-report.html b/sweettooth/extensions/templates/extensions/error-report.html
index ecfe448..b68c720 100644
--- a/sweettooth/extensions/templates/extensions/error-report.html
+++ b/sweettooth/extensions/templates/extensions/error-report.html
@@ -21,3 +21,5 @@ require(['jquery', 'extensions'], function($) {
     $("#error_log").fillInErrors("{{ version.extension.uuid }}");
 });
 {% endblock %}
+
+{% block navclass %}main{% endblock %}
diff --git a/sweettooth/extensions/templates/extensions/list.html b/sweettooth/extensions/templates/extensions/list.html
index cb39921..80a78fc 100644
--- a/sweettooth/extensions/templates/extensions/list.html
+++ b/sweettooth/extensions/templates/extensions/list.html
@@ -19,3 +19,5 @@
   {% endfor %}
   </ul>
 {% endblock %}
+
+{% block navclass %}main{% endblock %}
diff --git a/sweettooth/extensions/templates/extensions/local.html b/sweettooth/extensions/templates/extensions/local.html
index dcc6130..e6ccb97 100644
--- a/sweettooth/extensions/templates/extensions/local.html
+++ b/sweettooth/extensions/templates/extensions/local.html
@@ -12,3 +12,5 @@ require(['jquery', 'extensions'], function($) {
     $("#extensions").addLocalExtensions();
 });
 {% endblock %}
+
+{% block navclass %}local{% endblock %}
diff --git a/sweettooth/extensions/templates/extensions/upload-file.html b/sweettooth/extensions/templates/extensions/upload-file.html
index e78a57e..3fe2f09 100644
--- a/sweettooth/extensions/templates/extensions/upload-file.html
+++ b/sweettooth/extensions/templates/extensions/upload-file.html
@@ -8,3 +8,5 @@
   <input type="submit" value="Upload extension">
 </form>
 {% endblock %}
+
+{% block navclass %}upload{% endblock %}
diff --git a/sweettooth/static/css/sweettooth.css b/sweettooth/static/css/sweettooth.css
index 9c2314d..0aee092 100644
--- a/sweettooth/static/css/sweettooth.css
+++ b/sweettooth/static/css/sweettooth.css
@@ -58,9 +58,11 @@
     border: 0;
     background: none;
     font-weight: normal;
-    padding: 3px 16px;
+    padding: 3px 0;
     border-radius: 0;
     width: 100%;
+    text-decoration: none;
+    text-align: center;
 }
 
 #global_domain_bar .login_popup_form input[type=submit]:hover,
diff --git a/sweettooth/static/css/template.css b/sweettooth/static/css/template.css
index cb72483..f24a5ab 100644
--- a/sweettooth/static/css/template.css
+++ b/sweettooth/static/css/template.css
@@ -238,6 +238,10 @@ a:visited {
     position: relative;
     top: 1px;
 }
+
+#globalnav.main li.main a,
+#globalnav.upload li.upload a,
+#globalnav.local li.local a,
 #globalnav li.active a {
     background: #7fa7d4;
     padding: 5px 15px;
@@ -252,6 +256,10 @@ a:visited {
     box-shadow: inset 0 2px 3px -1px #396da9, 0 1px 0 #fff;
     position: relative;
 }
+
+#globalnav.main li.main a:after,
+#globalnav.upload li.upload a:after,
+#globalnav.local li.local a:after,
 #globalnav li.active a:after {
     content: url(../images/globalnav-arrow.png);
     position: absolute;
diff --git a/sweettooth/templates/base.html b/sweettooth/templates/base.html
index b452def..3d8ee97 100644
--- a/sweettooth/templates/base.html
+++ b/sweettooth/templates/base.html
@@ -51,10 +51,10 @@ window._SW = function() {
       <div class="maxwidth">
         <h1><a href="/"><img src="{{ STATIC_URL }}images/foot.png" alt="GNOME" /> Shell Extensions</a></h1>
         
-        <ul id="globalnav">
-          <li><a href="{% url extensions-index %}">Extensions</a></li>
-          <li><a href="{% url extensions-upload-file %}">Add extension</a></li>
-          <li><a href="{% url extensions-local %}">Installed extensions</a></li>
+        <ul id="globalnav" class="{% block navclass %}{% endblock %}">
+          <li class="main"><a href="{% url extensions-index %}">Extensions</a></li>
+          <li class="upload"><a href="{% url extensions-upload-file %}">Add extension</a></li>
+          <li class="local"><a href="{% url extensions-local %}">Installed extensions</a></li>
         </ul>
         
         <div class="right">



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]