Default theme: Highlight active page + hide untitled pages

Related to #302
pico-3.0-alpha
Daniel Rudolf 10 years ago
parent fdf81672a8
commit 67e1e8a8ea
  1. 2
      CHANGELOG.md
  2. 6
      themes/default/index.twig
  3. 9
      themes/default/style.css

@ -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

@ -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>

@ -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;

Loading…
Cancel
Save