Default theme: Highlight active page + hide untitled pages

Related to #302
This commit is contained in:
Daniel Rudolf 2015-12-21 03:31:34 +01:00
parent fdf81672a8
commit 67e1e8a8ea
3 changed files with 13 additions and 4 deletions

View file

@ -11,6 +11,8 @@ Released: -
* [Changed] Moving `LICENSE` to `LICENSE.md` * [Changed] Moving `LICENSE` to `LICENSE.md`
* [Changed] Throw `LogicException` instead of `RuntimeException` when calling * [Changed] Throw `LogicException` instead of `RuntimeException` when calling
`Pico::setConfig()` after processing has started `Pico::setConfig()` after processing has started
* [Changed] Default theme now highlights the current page and only lists pages
with a title in the navigation
``` ```
### Version 1.0.0-beta.2 ### Version 1.0.0-beta.2

View file

@ -23,8 +23,10 @@
<nav> <nav>
<a href="#" class="menu-icon"></a> <a href="#" class="menu-icon"></a>
<ul> <ul>
{% for page in pages %} {% for page in pages if page.title %}
<li><a href="{{ page.url }}">{{ page.title }}</a></li> <li{% if page.id == current_page.id %} class="active"{% endif %}>
<a href="{{ page.url }}">{{ page.title }}</a>
</li>
{% endfor %} {% endfor %}
</ul> </ul>
</nav> </nav>

View file

@ -222,9 +222,14 @@ blockquote {
margin-bottom: 80px; margin-bottom: 80px;
color: #afe1da; color: #afe1da;
} }
#header a { color: #afe1da; } #header a {
color: #afe1da;
}
#header h1 a, #header h1 a,
#header a:hover { color: #fff; } #header a:hover,
#header .active a {
color: #fff;
}
#header h1 { #header h1 {
font-weight: bold; font-weight: bold;
margin: 0; margin: 0;