Add flexible top nav.

This commit is contained in:
Vincent Driessen 2011-11-20 21:56:06 +01:00
parent c5593148d9
commit 724c7b60b3
3 changed files with 27 additions and 0 deletions

View File

@ -1,3 +1,11 @@
exclude: design
markdown: redcarpet
pygments: true
navigation:
- text: About
url: ./about.html
- text: Docs
url: ./docs.html
- text: Source
url: http://git.io/rq

View File

@ -14,6 +14,17 @@
<body>
<header>
<a href="http://github.com/nvie/rq"><img class="nomargin" style="position: absolute; top: 0; right: 0; border: 0;" src="https://a248.e.akamai.net/assets.github.com/img/30f550e0d38ceb6ef5b81500c64d970b7fb0f028/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6f72616e67655f6666373630302e706e67" alt="Fork me on GitHub"></a>
<ul>
{% for link in site.navigation %}
{% assign current = nil %}
{% if page.url == link.url or page.layout == link.layout %}
{% assign current = 'current' %}
{% endif %}
<li><a class="{{ current }}" href="{{ link.url }}">{{ link.text }}</a></li>
{% endfor %}
</ul>
</header>
<section class="container">

View File

@ -54,6 +54,14 @@ header a
-moz-transition: color linear 0.1s;
}
header a.current
{
color: #d31f21;
/*background: url(../img/arrow.png) 50% 80px no-repeat;*/
padding-bottom: 40px;
background: url(http://www.lobguides.org.uk/themes/lobguides/images/arrow-down.png) no-repeat 50% 24px;
}
header a:hover
{
border-bottom-color: rgba(0, 0, 0, 0.1);