-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
navbar.html
104 lines (94 loc) · 5.01 KB
/
navbar.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
{% comment %}
Lesson navigation bar.
{% endcomment %}
{% include gh_variables.html %}
{% include manual_episode_order.html %}
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<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>
{% comment %} Select what logo to display. {% endcomment %}
{% if site.carpentry == "swc" %}
<a href="{{ site.swc_site }}" class="pull-left">
<img class="navbar-logo" src="{{ relative_root_path }}{% link /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="{{ relative_root_path }}{% link /assets/img/dc-icon-black.svg %}" alt="Data Carpentry logo" />
</a>
{% elsif site.carpentry == "lc" %}
<a href="{{ site.lc_site }}" class="pull-left">
<img class="navbar-logo" src="{{ relative_root_path }}{% link /assets/img/lc-icon-black.svg %}" alt="Library Carpentry logo" />
</a>
{% elsif site.carpentry == "cp" %}
<a href="{{ site.carpentries_site }}" class="pull-left">
<img class="navbar-logo" src="{{ relative_root_path }}{% link /assets/img/cp-logo-blue.svg %}" alt="The Carpentries logo" />
</a>
{% endif %}
{% comment %} Always show link to home page. {% endcomment %}
<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="{{ relative_root_path }}{% link CODE_OF_CONDUCT.md %}">Code of Conduct</a></li>
{% if site.kind == "lesson" %}
{% comment %} Show setup instructions. {% endcomment %}
<li><a href="{{ relative_root_path }}{% link setup.md %}">Setup</a></li>
{% comment %} Show lesson episodes for lessons. {% endcomment %}
<li class="dropdown">
<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 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 %}
{% 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="{{ 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">
<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="{{ relative_root_path }}{% link LICENSE.md %}">License</a></li>
{% if page.source %}
{% if page.source == "Rmd" %}
<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>
{% endif %}
{% else %}
<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>
{% endif %}
</ul>
<form class="navbar-form navbar-right" role="search" id="search" onsubmit="google_search(); return false;">
<div class="form-group">
<input type="text" title="Google search" id="google-search" placeholder="Search..." aria-label="Google site search">
</div>
</form>
</div>
</div>
</nav>