فهرست منبع

add active menu items in default theme

jfoucher 12 سال پیش
والد
کامیت
293a083ced
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      themes/default/index.html
  2. 1 1
      themes/default/style.css

+ 1 - 1
themes/default/index.html

@@ -22,7 +22,7 @@
 			<h1><a href="{{ base_url }}">{{ site_title }}</a></h1>
 			<ul class="nav">
 				{% for page in pages %}
-				<li><a href="{{ page.url }}">{{ page.title }}</a></li>
+				<li{% if current_page.url == page.url %} class="active"{% endif %}><a href="{{ page.url }}">{{ page.title }}</a></li>
 				{% endfor %}
 			</ul>
 		</div>

+ 1 - 1
themes/default/style.css

@@ -213,7 +213,7 @@ blockquote {
 }
 #header a { color: #afe1da; }
 #header h1 a,
-#header a:hover { color: #fff; }
+#header a:hover, #header li.active a { color: #fff; }
 #header h1 { 
 	font-weight: bold;
 	margin: 0;