Remove software carpentries logo
[rnaseq-cwl-training.git] / _includes / navbar.html
index ff15ed1f0117f1d1cfb0f76279bba4f02252dde4..41d0f37a71057eb32b8af1b3761abef42d03a349 100644 (file)
@@ -1,12 +1,10 @@
 {% comment %}
-  If previewing locally, site.root is set in _config_dev.yml.
-  If site.root is not set, assume we're viewing on the web.
+  Lesson navigation bar.
 {% endcomment %}
-{% if site.root %}
-  {% assign root = site.root %}
-{% else %}
-  {% assign root = site.github.url %}
-{% endif %}
+
+{% include gh_variables.html %}
+{% include manual_episode_order.html %}
+
 <nav class="navbar navbar-default">
   <div class="container-fluid">
     <div class="navbar-header">
       </button>
 
       {% comment %} Select what logo to display. {% endcomment %}
-      {% if page.carpentry == "swc" %}
-      <a href="{{ site.swc_site }}" class="pull-left">
-        <img class="navbar-logo" src="{{ root }}/assets/img/swc-icon-blue.svg" alt="Software Carpentry logo" />
-      </a>
-      {% elsif page.carpentry == "dc" %}
-      <a href="{{ site.dc_site }}" class="pull-left">
-        <img class="navbar-logo" src="{{ root }}/assets/img/dc-icon-black.svg" alt="Data Carpentry logo" />
+      <a href="https://doc.arvados.org" class="pull-left">
+        <img class="navbar-logo" src="https://doc.arvados.org/images/dax-reading-book.png" />
       </a>
-      {% elsif site.carpentry == "swc" %}
-      <a href="{{ site.swc_site }}" class="pull-left">
-        <img class="navbar-logo" src="{{ root }}/assets/img/swc-icon-blue.svg" alt="Software Carpentry logo" />
-      </a>
-      {% elsif site.carpentry == "dc" %}
-      <a href="{{ site.dc_site }}" class="pull-left">
-        <img class="navbar-logo" src="{{ root }}/assets/img/dc-icon-black.svg" alt="Data Carpentry logo" />
-      </a>
-      {% endif %}
 
       {% comment %} Always show link to home page. {% endcomment %}
-      <a class="navbar-brand" href="{{ root }}/">Home</a>
+      <a class="navbar-brand" href="{{ relative_root_path }}{% link index.md %}">Home</a>
 
     </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="{{ root }}/conduct/">Code of Conduct</a></li>
+        <li><a href="{{ relative_root_path }}{% link CODE_OF_CONDUCT.md %}">Code of Conduct</a></li>
 
-       {% comment %} Show setup instructions, reference guide, and lesson episodes for lessons. {% endcomment %}
         {% if site.kind == "lesson" %}
-        <li><a href="{{ root }}/setup/">Setup</a></li>
-        <li><a href="{{ root }}/reference/">Reference</a></li>
+       {% comment %} Show setup instructions. {% endcomment %}
+        <li><a href="{{ relative_root_path }}{% link setup.md %}">Setup</a></li>
+
+        {% comment %} Show lesson episodes for lessons. {% endcomment %}
+        {% if lesson_episodes.size > 0 %}
         <li class="dropdown">
-          <a href="{{ root }}/" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Episodes <span class="caret"></span></a>
+          <a href="{{ relative_root_path }}/" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Episodes <span class="caret"></span></a>
           <ul class="dropdown-menu">
-            {% for episode in site.episodes %}
-            <li><a href="{{ root }}{{ episode.url }}">{{ episode.title }}</a></li>
+            {% for lesson_episode in lesson_episodes %}
+            {% if site.episode_order %}
+              {% assign episode = site.episodes | where: "slug", lesson_episode | first %}
+            {% else %}
+              {% assign episode = lesson_episode %}
+            {% endif %}
+            <li><a href="{{ relative_root_path }}{{ episode.url }}">{{ episode.title }}</a></li>
             {% endfor %}
+           <li role="separator" class="divider"></li>
+            <li><a href="{{ relative_root_path }}{% link aio.md %}">All in one page (Beta)</a></li>
           </ul>
         </li>
+        {% endif %}
        {% endif %}
 
        {% comment %} Show extras for lessons or if this is the main workshop-template repo (where they contain documentation). {% endcomment %}
-       {% if site.kind == "lesson" or site.repository_name == "workshop-template" %}
+       {% if site.kind == "lesson" %}
         <li class="dropdown">
-          <a href="{{ root }}/" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Extras <span class="caret"></span></a>
+          <a href="{{ relative_root_path }}/" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Extras <span class="caret"></span></a>
           <ul class="dropdown-menu">
-            {% for extra in site.extras %}
-            <li><a href="{{ root }}{{ extra.url }}">{{ extra.title }}</a></li>
+            <li><a href="{{ relative_root_path }}{% link reference.md %}">Reference</a></li>
+            {% for lesson_extra in lesson_extras %}
+            {% if site.extras_order %}
+              {% assign extra = site.extras | where: "slug", lesson_extra | first %}
+            {% else %}
+              {% assign extra = lesson_extra %}
+            {% endif %}
+            <li><a href="{{ relative_root_path }}{{ extra.url }}">{{ extra.title }}</a></li>
             {% endfor %}
           </ul>
         </li>
        {% endif %}
 
        {% comment %} Always show license. {% endcomment %}
-        <li><a href="{{ root }}/license/">License</a></li>
+        <li><a href="{{ relative_root_path }}{% link LICENSE.md %}">License</a></li>
+       <li><a href="{{ relative_root_path }}{% link CONTRIBUTING.md %}">Improve this page <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a></li>
       </ul>
       <form class="navbar-form navbar-right" role="search" id="search" onsubmit="google_search(); return false;">
         <div class="form-group">
-          <input type="text" id="google-search" placeholder="Search...">
+          <input type="text" id="google-search" placeholder="Search..." aria-label="Google site search">
         </div>
       </form>
     </div>