diff options
author | Viktor Lin <asfgjk123123@gmail.com> | 2015-04-07 01:56:22 +0800 |
---|---|---|
committer | Viktor Lin <asfgjk123123@gmail.com> | 2015-04-07 01:56:22 +0800 |
commit | a77aafea946687c6fe76fe769f928155cdaf5a05 (patch) | |
tree | 79f18381401ded23a48bd7c6038d64b690cc7520 /brownstone | |
parent | ea1634c83e83234469c43abff88187b0af5806f0 (diff) | |
download | pelican-themes-a77aafea946687c6fe76fe769f928155cdaf5a05.tar.gz |
make class "current_page_item" shows up at the right time
make class "current_page_item" shows up only if it's the current page.
Diffstat (limited to 'brownstone')
-rw-r--r-- | brownstone/templates/base.html | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/brownstone/templates/base.html b/brownstone/templates/base.html index 1387f1b..adf3c6d 100644 --- a/brownstone/templates/base.html +++ b/brownstone/templates/base.html @@ -36,11 +36,11 @@ Released : 20100928 </div> <div id="menu"> <ul> - <li class="current_page_item"><a href="{{ SITEURL }}">Home</a></li> - <li><a href="{{ SITEURL }}/archives.html">Archives</a></li> + <li {% if page_name == "index" %}class="current_page_item"{% endif %}><a href="{{ SITEURL }}">Home</a></li> + <li {% if page_name == "archives" %}class="current_page_item"{% endif %}><a href="{{ SITEURL }}/archives.html">Archives</a></li> {% if DISPLAY_PAGES_ON_MENU %} {% for page in PAGES %} - <li><a href="{{ SITEURL }}/{{ page.url }}">{{ page.title }}</a></li> + <li {% if page_name == page_title %}class="current_page_item"{% endif %}><a href="{{ SITEURL }}/{{ page.url }}">{{ page.title }}</a></li> {% endfor %} {% endif %} </ul> |