Krolyxon
Commit ec28036

ferreniumtemplatesrepo_nav.html

38 lines · 2.2 KB · HTML

1<div class="repo-bar">
2 <nav class="bracket-nav" aria-label="Repository">
3 <a class="label{% if nav.active == "summary" %} active{% endif %}" href="{{ nav.url }}"{% if nav.active == "summary" %} aria-current="page"{% endif %}>Summary</a>
4 <a class="label{% if nav.active == "tree" %} active{% endif %}" href="{{ nav.tree_url }}"{% if nav.active == "tree" %} aria-current="page"{% endif %}>Tree</a>
5 <a class="label{% if nav.active == "log" %} active{% endif %}" href="{{ nav.log_url }}"{% if nav.active == "log" %} aria-current="page"{% endif %}>Log</a>
6 <a class="label{% if nav.active == "refs" %} active{% endif %}" href="{{ nav.refs_url }}"{% if nav.active == "refs" %} aria-current="page"{% endif %}>Refs</a>
7 <a class="label{% if nav.active == "find" %} active{% endif %}" href="{{ nav.find_url }}"{% if nav.active == "find" %} aria-current="page"{% endif %}>Find</a>
8 </nav>
9 {%- if let Some(picker) = nav.picker %}
10 <details class="ref-picker">
11 <summary>
12 <svg class="icon" aria-hidden="true"><use href="{{ layout.static_base }}icons/sprite.svg#git-branch"></use></svg>
13 <span class="label dim">{{ picker.kind }}</span>
14 <span class="ref-current">{{ picker.current }}</span>
15 <svg class="icon chevron" aria-hidden="true"><use href="{{ layout.static_base }}icons/sprite.svg#chevron-down"></use></svg>
16 </summary>
17 <div class="ref-menu">
18 {%- if !picker.branches.is_empty() %}
19 <p class="label ref-group">Branches</p>
20 <ul>
21 {%- for item in picker.branches %}
22 <li><a href="{{ item.url }}"{% if item.active %} class="active" aria-current="true"{% endif %}>{{ item.name }}</a></li>
23 {%- endfor %}
24 </ul>
25 {%- endif %}
26 {%- if !picker.tags.is_empty() %}
27 <p class="label ref-group">Tags</p>
28 <ul>
29 {%- for item in picker.tags %}
30 <li><a href="{{ item.url }}"{% if item.active %} class="active" aria-current="true"{% endif %}>{{ item.name }}</a></li>
31 {%- endfor %}
32 </ul>
33 {%- endif %}
34 <a class="label ref-all" href="{{ nav.refs_url }}">{% if picker.more_tags %}All refs{% else %}Refs{% endif %} &rarr;</a>
35 </div>
36 </details>
37 {%- endif %}
38</div>