Default theme: Highlight active page + hide untitled pages
Related to #302
This commit is contained in:
parent
fdf81672a8
commit
67e1e8a8ea
3 changed files with 13 additions and 4 deletions
|
@ -11,6 +11,8 @@ Released: -
|
|||
* [Changed] Moving `LICENSE` to `LICENSE.md`
|
||||
* [Changed] Throw `LogicException` instead of `RuntimeException` when calling
|
||||
`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
|
||||
|
|
|
@ -23,8 +23,10 @@
|
|||
<nav>
|
||||
<a href="#" class="menu-icon"></a>
|
||||
<ul>
|
||||
{% for page in pages %}
|
||||
<li><a href="{{ page.url }}">{{ page.title }}</a></li>
|
||||
{% for page in pages if page.title %}
|
||||
<li{% if page.id == current_page.id %} class="active"{% endif %}>
|
||||
<a href="{{ page.url }}">{{ page.title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
|
|
|
@ -222,9 +222,14 @@ blockquote {
|
|||
margin-bottom: 80px;
|
||||
color: #afe1da;
|
||||
}
|
||||
#header a { color: #afe1da; }
|
||||
#header a {
|
||||
color: #afe1da;
|
||||
}
|
||||
#header h1 a,
|
||||
#header a:hover { color: #fff; }
|
||||
#header a:hover,
|
||||
#header .active a {
|
||||
color: #fff;
|
||||
}
|
||||
#header h1 {
|
||||
font-weight: bold;
|
||||
margin: 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue