File indexing completed on 2024-11-15 10:02:47
0001 {% comment %}
0002 Lesson navigation bar.
0003 {% endcomment %}
0004
0005 {% include gh_variables.html %}
0006 {% include manual_episode_order.html %}
0007
0008 <nav class="navbar navbar-default">
0009 <div class="container-fluid">
0010 <div class="navbar-header">
0011 <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
0012 <span class="sr-only">Toggle navigation</span>
0013 <span class="icon-bar"></span>
0014 <span class="icon-bar"></span>
0015 <span class="icon-bar"></span>
0016 </button>
0017
0018 {% comment %} Select what logo to display. {% endcomment %}
0019 {% if site.carpentry == "swc" %}
0020 <a href="{{ site.swc_site }}" class="pull-left">
0021 <img class="navbar-logo" src="{{ relative_root_path }}{% link /assets/img/swc-icon-blue.svg %}" alt="Software Carpentry logo" />
0022 </a>
0023 {% elsif site.carpentry == "dc" %}
0024 <a href="{{ site.dc_site }}" class="pull-left">
0025 <img class="navbar-logo" src="{{ relative_root_path }}{% link /assets/img/dc-icon-black.svg %}" alt="Data Carpentry logo" />
0026 </a>
0027 {% elsif site.carpentry == "lc" %}
0028 <a href="{{ site.lc_site }}" class="pull-left">
0029 <img class="navbar-logo" src="{{ relative_root_path }}{% link /assets/img/lc-icon-black.svg %}" alt="Library Carpentry logo" />
0030 </a>
0031 {% elsif site.carpentry == "cp" %}
0032 <a href="{{ site.carpentries_site }}" class="pull-left">
0033 <img class="navbar-logo" src="{{ relative_root_path }}{% link /assets/img/cp-logo-blue.svg %}" alt="The Carpentries logo" />
0034 </a>
0035 {% elsif site.carpentry == "lab" %}
0036 <a href="{{ relative_root_path }}{% link index.md %}" class="pull-left">
0037 <img class="navbar-logo" src="{{ relative_root_path }}{% link /assets/img/carpentrieslab.svg %}" alt="The Carpentries Lab" />
0038 </a>
0039 {% endif %}
0040
0041 {% comment %} Always show link to home page. {% endcomment %}
0042 <a class="navbar-brand" href="{{ relative_root_path }}{% link index.md %}">Home</a>
0043
0044 </div>
0045 <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
0046 <ul class="nav navbar-nav">
0047
0048 {% comment %} Always show code of conduct. {% endcomment %}
0049 <li><a href="{{ relative_root_path }}{% link CODE_OF_CONDUCT.md %}">Code of Conduct</a></li>
0050
0051 {% if site.kind == "lesson" %}
0052 {% comment %} Show setup instructions. {% endcomment %}
0053 <li><a href="{{ relative_root_path }}{% link setup.md %}">Setup</a></li>
0054
0055 {% comment %} Show lesson episodes for lessons. {% endcomment %}
0056 {% if lesson_episodes.size > 0 %}
0057 <li class="dropdown">
0058 <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>
0059 <ul class="dropdown-menu">
0060 {% for lesson_episode in lesson_episodes %}
0061 {% if site.episode_order %}
0062 {% assign episode = site.episodes | where: "slug", lesson_episode | first %}
0063 {% else %}
0064 {% assign episode = lesson_episode %}
0065 {% endif %}
0066 <li><a href="{{ relative_root_path }}{{ episode.url }}">{{ episode.title }}</a></li>
0067 {% endfor %}
0068 <li role="separator" class="divider"></li>
0069 <li><a href="{{ relative_root_path }}{% link aio.md %}">All in one page (Beta)</a></li>
0070 </ul>
0071 </li>
0072 {% endif %}
0073 {% endif %}
0074
0075 {% comment %} Show extras for lessons or if this is the main workshop-template repo (where they contain documentation). {% endcomment %}
0076 {% if site.kind == "lesson" %}
0077 <li class="dropdown">
0078 <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>
0079 <ul class="dropdown-menu">
0080 <li><a href="{{ relative_root_path }}{% link reference.md %}">Reference</a></li>
0081 {% for lesson_extra in lesson_extras %}
0082 {% if site.extras_order %}
0083 {% assign extra = site.extras | where: "slug", lesson_extra | first %}
0084 {% else %}
0085 {% assign extra = lesson_extra %}
0086 {% endif %}
0087 {% unless extra.exclude %}
0088 <li><a href="{{ relative_root_path }}{{ extra.url }}">{{ extra.title }}</a></li>
0089 {% endunless %}
0090 {% endfor %}
0091 </ul>
0092 </li>
0093 {% endif %}
0094
0095 {% comment %} Always show license. {% endcomment %}
0096 <li><a href="{{ relative_root_path }}{% link LICENSE.md %}">License</a></li>
0097 {% if page.source %}
0098 {% if page.source == "Rmd" %}
0099 <li><a href="{{repo_url}}/edit/{{ default_branch }}/{{page.path|replace: "_episodes", "_episodes_rmd" | replace: ".md", ".Rmd"}}" data-checker-ignore>Improve this page <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a></li>
0100 {% endif %}
0101 {% else %}
0102 <li><a href="{{repo_url}}/edit/{{ default_branch}}/{{page.path}}" data-checker-ignore>Improve this page <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a></li>
0103 {% endif %}
0104 </ul>
0105 <form class="navbar-form navbar-right" role="search" id="search" onsubmit="google_search(); return false;">
0106 <div class="form-group">
0107 <input type="text" id="google-search" placeholder="Search..." aria-label="Google site search">
0108 </div>
0109 </form>
0110 </div>
0111 </div>
0112 </nav>