Skip to content

Commit

Permalink
WIP: Revamp nav bar
Browse files Browse the repository at this point in the history
  • Loading branch information
rgaiacs committed Jun 22, 2018
1 parent e1d7d54 commit dcbfe2e
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 12 deletions.
1 change: 1 addition & 0 deletions _extras/about.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: About
order: 100
---

{% include carpentries.html %}
1 change: 1 addition & 0 deletions aio.md → _extras/aio.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
order: 100
---
<script>
window.onload = function() {
Expand Down
1 change: 1 addition & 0 deletions _extras/discuss.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Discussion
order: 2
---

Readers may be interested in:
Expand Down
1 change: 1 addition & 0 deletions _extras/figures.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Figures
order: 3
---
<script>
window.onload = function() {
Expand Down
1 change: 1 addition & 0 deletions _extras/guide.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: "Instructor Notes"
order: 4
---

The instructor notes should provide additional discussion useful to instructors,
Expand Down
1 change: 1 addition & 0 deletions reference.md → _extras/reference.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: reference
order: 1
---

## Glossary
Expand Down
26 changes: 14 additions & 12 deletions _includes/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,42 +36,44 @@
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">

{% comment %} Always show code of conduct. {% endcomment %}
<li><a href="{{ page.root }}{% link CODE_OF_CONDUCT.md %}">Code of Conduct</a></li>

{% if site.kind == "lesson" %}
{% comment %} Show setup instructions. {% endcomment %}
<li><a href="{{ page.root }}{% link setup.md %}">Setup</a></li>

{% comment %} Show lesson episodes for lessons. {% endcomment %}
<li class="dropdown">
<a href="{{ page.root }}/" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Episodes <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="{{ page.root }}{% link setup.md %}">Setup</a></li>
<li role="separator" class="divider"></li>
{% for episode in site.episodes %}
<li><a href="{{ page.root }}{{ episode.url }}">{{ episode.title }}</a></li>
{% endfor %}
<li role="separator" class="divider"></li>
<li><a href="{{ page.root }}{% link aio.md %}">All in one page (Beta)</a></li>
<li><a href="{{ page.root }}{% link _extras/aio.md %}">All in one page (Beta)</a></li>
</ul>
</li>
{% endif %}

{% comment %} Show extras for lessons or if this is the main workshop-template repo (where they contain documentation). {% endcomment %}
{% if site.kind == "lesson" %}
<li class="dropdown">
<a href="{{ page.root }}/" 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 }}{% link reference.md %}">Reference</a></li>
{% for extra in site.extras %}
{% assign extras = site.extras | sort: 'order' %}
{% for extra in extras %}
{% if extra.path != "_extras/aio.md" and extra.path != "_extras/about.md" %}
<li><a href="{{ page.root }}{{ extra.url }}">{{ extra.title }}</a></li>
{% endif %}
{% endfor %}
<li role="separator" class="divider"></li>
<li><a href="{{ page.root }}{% link _extras/about.md %}">About The Carpentries</a></li>
</ul>
</li>
{% endif %}

{% comment %} Always show license. {% endcomment %}
<li><a href="{{ page.root }}{% link LICENSE.md %}">License</a></li>

{% comment %} Always show code of conduct. {% endcomment %}
<li><a href="{{ page.root }}{% link CODE_OF_CONDUCT.md %}">Code of Conduct</a></li>

{% comment %} Always show link to edit page on GitHub. {% endcomment %}
{% 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>
Expand Down
1 change: 1 addition & 0 deletions _layouts/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<link rel="stylesheet" type="text/css" href="{{ page.root }}/assets/css/bootstrap-theme.css" />
<link rel="stylesheet" type="text/css" href="{{ page.root }}/assets/css/lesson.css" />
<link rel="stylesheet" type="text/css" href="{{ page.root }}/assets/css/syntax.css" />
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> </script>

{% include favicons.html %}

Expand Down

0 comments on commit dcbfe2e

Please sign in to comment.