navbar.html 3.98 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

      {% comment %} Select what logo to display. {% endcomment %}
Greg Wilson's avatar
Greg Wilson committed
12
13
      {% if page.carpentry == "swc" %}
      <a href="{{ site.swc_site }}" class="pull-left">
14
        <img class="navbar-logo" src="{{ page.root }}/assets/img/swc-icon-blue.svg" alt="Software Carpentry logo" />
Greg Wilson's avatar
Greg Wilson committed
15
16
17
      </a>
      {% elsif page.carpentry == "dc" %}
      <a href="{{ site.dc_site }}" class="pull-left">
18
        <img class="navbar-logo" src="{{ page.root }}/assets/img/dc-icon-black.svg" alt="Data Carpentry logo" />
Greg Wilson's avatar
Greg Wilson committed
19
      </a>
20
      {% elsif page.carpentry == "lc" %}
Greg Wilson's avatar
Greg Wilson committed
21
      <a href="{{ site.lc_site }}" class="pull-left">
22
23
        <img class="navbar-logo" src="{{ page.root }}/assets/img/lc-icon-black.svg" alt="Library Carpentry logo" />
      </a>
Greg Wilson's avatar
Greg Wilson committed
24
25
      {% elsif site.carpentry == "swc" %}
      <a href="{{ site.swc_site }}" class="pull-left">
26
        <img class="navbar-logo" src="{{ page.root }}/assets/img/swc-icon-blue.svg" alt="Software Carpentry logo" />
Greg Wilson's avatar
Greg Wilson committed
27
28
29
      </a>
      {% elsif site.carpentry == "dc" %}
      <a href="{{ site.dc_site }}" class="pull-left">
30
        <img class="navbar-logo" src="{{ page.root }}/assets/img/dc-icon-black.svg" alt="Data Carpentry logo" />
Greg Wilson's avatar
Greg Wilson committed
31
      </a>
32
      {% elsif site.carpentry == "lc" %}
Greg Wilson's avatar
Greg Wilson committed
33
      <a href="{{ site.lc_site }}" class="pull-left">
34
35
        <img class="navbar-logo" src="{{ page.root }}/assets/img/lc-icon-black.svg" alt="Library Carpentry logo" />
      </a>
Greg Wilson's avatar
Greg Wilson committed
36
      {% endif %}
Greg Wilson's avatar
Greg Wilson committed
37
38

      {% comment %} Always show link to home page. {% endcomment %}
39
      <a class="navbar-brand" href="{{ page.root }}/">Home</a>
Greg Wilson's avatar
Greg Wilson committed
40

Greg Wilson's avatar
Greg Wilson committed
41
42
43
    </div>
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
Greg Wilson's avatar
Greg Wilson committed
44
45

	{% comment %} Always show code of conduct. {% endcomment %}
46
        <li><a href="{{ page.root }}/conduct/">Code of Conduct</a></li>
Greg Wilson's avatar
Greg Wilson committed
47
48

	{% comment %} Show setup instructions, reference guide, and lesson episodes for lessons. {% endcomment %}
Greg Wilson's avatar
Greg Wilson committed
49
        {% if site.kind == "lesson" %}
50
51
        <li><a href="{{ page.root }}/setup/">Setup</a></li>
        <li><a href="{{ page.root }}/reference/">Reference</a></li>
Greg Wilson's avatar
Greg Wilson committed
52
        <li class="dropdown">
53
          <a href="{{ page.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
54
55
          <ul class="dropdown-menu">
            {% for episode in site.episodes %}
56
            <li><a href="{{ page.root }}{{ episode.url }}">{{ episode.title }}</a></li>
Greg Wilson's avatar
Greg Wilson committed
57
58
59
            {% endfor %}
          </ul>
        </li>
Greg Wilson's avatar
Greg Wilson committed
60
61
62
	{% endif %}

	{% comment %} Show extras for lessons or if this is the main workshop-template repo (where they contain documentation). {% endcomment %}
63
	{% if site.kind == "lesson" or site.github.repository_name == "workshop-template" %}
Greg Wilson's avatar
Greg Wilson committed
64
        <li class="dropdown">
65
          <a href="{{ page.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
66
67
          <ul class="dropdown-menu">
            {% for extra in site.extras %}
68
            <li><a href="{{ page.root }}{{ extra.url }}">{{ extra.title }}</a></li>
Greg Wilson's avatar
Greg Wilson committed
69
70
71
            {% endfor %}
          </ul>
        </li>
Greg Wilson's avatar
Greg Wilson committed
72
73
74
	{% endif %}

	{% comment %} Always show license. {% endcomment %}
75
        <li><a href="{{ page.root }}/license/">License</a></li>
Greg Wilson's avatar
Greg Wilson committed
76
77
78
      </ul>
      <form class="navbar-form navbar-right" role="search" id="search" onsubmit="google_search(); return false;">
        <div class="form-group">
evanwill's avatar
evanwill committed
79
          <input type="text" id="google-search" placeholder="Search..." aria-label="Google site search">
Greg Wilson's avatar
Greg Wilson committed
80
81
82
83
84
        </div>
      </form>
    </div>
  </div>
</nav>