Explorar el Código

seleziono la pagina corrente nel navbar

lesion hace 7 años
padre
commit
9d52b22d39

+ 6 - 0
themes/hackit0x14/static/css/hackit.css

@@ -48,6 +48,11 @@ h1, h2, h3, h4, strong, tt {
 	color: black;
 }
 
+.navbar .navbar-nav > li > a  {
+	transition: background-color .3s;
+	background-color: #e12b2b;
+}
+
 .navbar .navbar-nav > .active > a, 
 .navbar .navbar-nav > .active > a:hover, 
 .navbar .navbar-nav > .active > a:focus {
@@ -60,6 +65,7 @@ h1, h2, h3, h4, strong, tt {
 .navbar .navbar-brand:hover,
 .navbar .navbar-brand:focus {
 	color: black;
+	background-color: #ff7456;
 }
 
 .navbar-brand {

+ 1 - 1
themes/hackit0x14/templates/base.html

@@ -121,7 +121,7 @@
                     {% set menu = MENUITEMS %}
                 {% endif %}
                 {% for title, link in menu %}
-                    <li><a href="{{ link }}">{{ title }}</a></li>
+                    <li class="{% if page.url == link %}active{% endif %}"><a href="{{ link }}" >{{ title }}</a></li>
                 {% endfor %}
 
                 {% if DISPLAY_CATEGORIES_ON_MENU %}