Skip to content

Commit

Permalink
normalize navbar template
Browse files Browse the repository at this point in the history
1) move Reference to Extras dropdown
2) add 'improve this page' button
  • Loading branch information
brandoncurtis authored Aug 18, 2017
1 parent 84cf300 commit e94153f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion _includes/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
{% comment %} Show setup instructions, reference guide, and lesson episodes for lessons. {% endcomment %}
{% if site.kind == "lesson" %}
<li><a href="{{ page.root }}/setup/{{ site.index }}">Setup</a></li>
<li><a href="{{ page.root }}/reference/{{ site.index }}">Reference</a></li>
<li class="dropdown">
<a href="{{ page.root }}/{{ site.index }}" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Episodes <span class="caret"></span></a>
<ul class="dropdown-menu">
Expand All @@ -67,6 +66,7 @@
<li class="dropdown">
<a href="{{ page.root }}/{{ site.index }}" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Extras <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="{{ page.root }}/reference/{{ site.index }}">Reference</a></li>
{% for extra in site.extras %}
<li><a href="{{ page.root }}{{ extra.url }}{{ site.index }}">{{ extra.title }}</a></li>
{% endfor %}
Expand All @@ -76,6 +76,13 @@

{% comment %} Always show license. {% endcomment %}
<li><a href="{{ page.root }}/license/{{ site.index }}">License</a></li>
{% if page.source %}
{% if page.source == "Rmd" %}
<li><a href="{{site.github.repository_url}}/edit/gh-pages/{{page.path|replace: "_episodes", "_episodes_rmd" | replace: ".md", ".Rmd"}}">Improve this page <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a></li>
{% endif %}
{% else %}
<li><a href="{{site.github.repository_url}}/edit/gh-pages/{{page.path}}">Improve this page <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a></li>
{% endif %}
</ul>
<form class="navbar-form navbar-right" role="search" id="search" onsubmit="google_search(); return false;">
<div class="form-group">
Expand Down

0 comments on commit e94153f

Please sign in to comment.