navbar.html 2.93 KB
Newer Older
Greg Wilson's avatar
Greg Wilson committed
1
2
3
<nav class="navbar navbar-default">
  <div class="container-fluid">
    <div class="navbar-header">
Greg Wilson's avatar
Greg Wilson committed
4
5
6
7
8
9
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
Greg Wilson's avatar
Greg Wilson committed
10
11
      {% if page.carpentry == "swc" %}
      <a href="{{ site.swc_site }}" class="pull-left">
12
        <img class="navbar-logo" src="{{ site.root }}/assets/img/swc-icon-blue.svg" alt="Software Carpentry logo" />
Greg Wilson's avatar
Greg Wilson committed
13
14
15
      </a>
      {% elsif page.carpentry == "dc" %}
      <a href="{{ site.dc_site }}" class="pull-left">
16
        <img class="navbar-logo" src="{{ site.root }}/assets/img/dc-icon-black.svg" alt="Data Carpentry logo" />
Greg Wilson's avatar
Greg Wilson committed
17
18
19
      </a>
      {% elsif site.carpentry == "swc" %}
      <a href="{{ site.swc_site }}" class="pull-left">
20
        <img class="navbar-logo" src="{{ site.root }}/assets/img/swc-icon-blue.svg" alt="Software Carpentry logo" />
Greg Wilson's avatar
Greg Wilson committed
21
22
23
      </a>
      {% elsif site.carpentry == "dc" %}
      <a href="{{ site.dc_site }}" class="pull-left">
24
        <img class="navbar-logo" src="{{ site.root }}/assets/img/dc-icon-black.svg" alt="Data Carpentry logo" />
Greg Wilson's avatar
Greg Wilson committed
25
26
      </a>
      {% endif %}
27
      <a class="navbar-brand" href="{{ site.root }}/">Home</a>
Greg Wilson's avatar
Greg Wilson committed
28
29
30
    </div>
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
31
        <li><a href="{{ site.root }}/conduct/">Code of Conduct</a></li>
Greg Wilson's avatar
Greg Wilson committed
32
        {% if site.kind == "lesson" %}
33
        <li><a href="{{ site.root }}/setup/">Setup</a></li>
Greg Wilson's avatar
Greg Wilson committed
34
        <li class="dropdown">
35
          <a href="{{ site.root }}/" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Episodes <span class="caret"></span></a>
Greg Wilson's avatar
Greg Wilson committed
36
37
          <ul class="dropdown-menu">
            {% for episode in site.episodes %}
38
            <li><a href="{{ site.root }}{{ episode.url }}">{{ episode.title }}</a></li>
Greg Wilson's avatar
Greg Wilson committed
39
40
41
42
            {% endfor %}
          </ul>
        </li>
        <li class="dropdown">
43
          <a href="{{ site.root }}/" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Extras <span class="caret"></span></a>
Greg Wilson's avatar
Greg Wilson committed
44
45
          <ul class="dropdown-menu">
            {% for extra in site.extras %}
46
            <li><a href="{{ site.root }}{{ extra.url }}">{{ extra.title }}</a></li>
Greg Wilson's avatar
Greg Wilson committed
47
48
49
            {% endfor %}
          </ul>
        </li>
50
        <li><a href="{{ site.root }}/reference/">Reference</a></li>
Greg Wilson's avatar
Greg Wilson committed
51
        {% endif %}
52
        <li><a href="{{ site.root }}/license/">License</a></li>
Greg Wilson's avatar
Greg Wilson committed
53
54
55
56
57
58
59
60
61
      </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...">
        </div>
      </form>
    </div>
  </div>
</nav>