Skip to content

Commit

Permalink
port in sidebar nav from lanyon
Browse files Browse the repository at this point in the history
  • Loading branch information
mdo committed Jun 23, 2014
1 parent d613ecf commit 34a6683
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
18 changes: 7 additions & 11 deletions _includes/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ <h1>
<p class="lead">{{ site.description }}</p>
</div>

<ul class="sidebar-nav">
<li class="sidebar-nav-item{% if page.title == "Home" %} active{% endif %}">
<a href="{{ site.baseurl }}">Home</a>
</li>
<nav class="sidebar-nav">
<a class="sidebar-nav-item{% if page.url == site.baseurl %} active{% endif %}" href="{{ site.baseurl }}">Home</a>

{% comment %}
The code below dynamically generates a sidebar nav of pages with
Expand All @@ -23,17 +21,15 @@ <h1>
{% for node in pages_list %}
{% if node.title != null %}
{% if node.layout == "page" %}
<li class="sidebar-nav-item{% if page.url == node.url %} active{% endif %}">
<a href="{{ node.url }}">{{ node.title }}</a>
</li>
<a class="sidebar-nav-item{% if page.url == node.url %} active{% endif %}" href="{{ node.url }}">{{ node.title }}</a>
{% endif %}
{% endif %}
{% endfor %}

<li class="sidebar-nav-item"><a href="{{ site.github.repo }}/archive/v{{ site.version }}.zip">Download</a></li>
<li class="sidebar-nav-item"><a href="{{ site.github.repo }}">GitHub project</a></li>
<li class="sidebar-nav-item">Currently v{{ site.version }}</li>
</ul>
<a class="sidebar-nav-item" href="{{ site.github.repo }}/archive/v{{ site.version }}.zip">Download</a>
<a class="sidebar-nav-item" href="{{ site.github.repo }}">GitHub project</a>
<span class="sidebar-nav-item">Currently v{{ site.version }}</span>
</nav>

<p>&copy; {{ site.time | date: '%Y' }}. All rights reserved.</p>
</div>
Expand Down
3 changes: 1 addition & 2 deletions public/css/hyde.css
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ html {

/* Sidebar nav */
.sidebar-nav {
padding-left: 0;
list-style: none;
margin-bottom: 1rem;
}
.sidebar-nav-item {
display: block;
Expand Down

0 comments on commit 34a6683

Please sign in to comment.