| 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 == "refs" %} active{% endif %}" href="{{ nav.refs_url }}"{% if nav.active == "refs" %} aria-current="page"{% endif %}>Refs</a> |
| 6 | </nav> |
| 7 | {%- if let Some(picker) = nav.picker %} |
| 8 | <details class="ref-picker"> |
| 9 | <summary> |
| 10 | <svg class="icon" aria-hidden="true"><use href="{{ layout.static_base }}icons/sprite.svg#git-branch"></use></svg> |
| 11 | <span class="label dim">{{ picker.kind }}</span> |
| 12 | <span class="ref-current">{{ picker.current }}</span> |
| 13 | <svg class="icon chevron" aria-hidden="true"><use href="{{ layout.static_base }}icons/sprite.svg#chevron-down"></use></svg> |
| 14 | </summary> |
| 15 | <div class="ref-menu"> |
| 16 | {%- if !picker.branches.is_empty() %} |
| 17 | <p class="label ref-group">Branches</p> |
| 18 | <ul> |
| 19 | {%- for item in picker.branches %} |
| 20 | <li><a href="{{ item.url }}"{% if item.active %} class="active" aria-current="true"{% endif %}>{{ item.name }}</a></li> |
| 21 | {%- endfor %} |
| 22 | </ul> |
| 23 | {%- endif %} |
| 24 | {%- if !picker.tags.is_empty() %} |
| 25 | <p class="label ref-group">Tags</p> |
| 26 | <ul> |
| 27 | {%- for item in picker.tags %} |
| 28 | <li><a href="{{ item.url }}"{% if item.active %} class="active" aria-current="true"{% endif %}>{{ item.name }}</a></li> |
| 29 | {%- endfor %} |
| 30 | </ul> |
| 31 | {%- endif %} |
| 32 | <a class="label ref-all" href="{{ nav.refs_url }}">{% if picker.more_tags %}All refs{% else %}Refs{% endif %} →</a> |
| 33 | </div> |
| 34 | </details> |
| 35 | {%- endif %} |
| 36 | </div> |