| 1 | {% extends "base.html" %} |
| 2 | {% import "macros.html" as m %} |
| 3 | {% block content %} |
| 4 | {% include "repo_nav.html" %} |
| 5 | <section class="repo-hero"> |
| 6 | <h1 class="display-md repo-title">{{ name }}</h1> |
| 7 | {%- if let Some(description) = description %} |
| 8 | <p class="repo-about">{{ description }}</p> |
| 9 | {%- endif %} |
| 10 | </section> |
| 11 | <div class="repo-grid"> |
| 12 | <div class="repo-main"> |
| 13 | {%- if let Some(rows) = rows %} |
| 14 | {% call m::tree_list(rows, layout.static_base) %}{% endcall %} |
| 15 | {%- else %} |
| 16 | <section class="empty"> |
| 17 | <p class="empty-title">Empty repository</p> |
| 18 | <p class="empty-desc">Push a branch and it will show up here.</p> |
| 19 | </section> |
| 20 | {%- endif %} |
| 21 | {%- if let Some(readme) = readme %} |
| 22 | {% call m::readme(readme) %}{% endcall %} |
| 23 | {%- endif %} |
| 24 | </div> |
| 25 | <aside class="rail"> |
| 26 | <dl class="stats"> |
| 27 | {%- for stat in stats %} |
| 28 | <div class="stat"> |
| 29 | <dt class="label">{{ stat.label }}</dt> |
| 30 | <dd>{% if let Some(url) = stat.url %}<a href="{{ url }}">{{ stat.value }}</a>{% else if let Some(title) = stat.title %}<time datetime="{{ title }}" title="{{ title }}">{{ stat.value }}</time>{% else %}{{ stat.value }}{% endif %}</dd> |
| 31 | </div> |
| 32 | {%- endfor %} |
| 33 | </dl> |
| 34 | {%- if !clone_urls.is_empty() %} |
| 35 | <section class="rail-block" data-clone> |
| 36 | <div class="rail-head"> |
| 37 | <h2 class="label">Clone</h2> |
| 38 | {%- if clone_urls.len() > 1 %} |
| 39 | <div class="segmented segmented-sm clone-switch" role="group" aria-label="Clone protocol"> |
| 40 | {%- for url in clone_urls %} |
| 41 | <button type="button" data-clone-choice="{{ loop.index0 }}" aria-pressed="{% if loop.first %}true{% else %}false{% endif %}">{{ url.label }}</button> |
| 42 | {%- endfor %} |
| 43 | </div> |
| 44 | {%- endif %} |
| 45 | </div> |
| 46 | {%- for url in clone_urls %} |
| 47 | <div class="clone-row" data-clone-url="{{ loop.index0 }}"> |
| 48 | <input class="clone-input" type="text" readonly value="{{ url.url }}" aria-label="{{ url.label }} clone URL" spellcheck="false"> |
| 49 | <button type="button" class="icon-btn" data-copy aria-label="Copy {{ url.label }} clone URL" title="Copy"> |
| 50 | <svg class="icon" aria-hidden="true"><use href="{{ layout.static_base }}icons/sprite.svg#copy"></use></svg> |
| 51 | </button> |
| 52 | </div> |
| 53 | {%- endfor %} |
| 54 | <p class="status copy-status" data-copy-status aria-live="polite"></p> |
| 55 | </section> |
| 56 | {%- endif %} |
| 57 | {%- if let Some(latest) = latest %} |
| 58 | <section class="rail-block"> |
| 59 | <h2 class="label">Latest</h2> |
| 60 | <p class="latest-subject">{{ latest.subject }}</p> |
| 61 | <p class="latest-meta">{{ latest.author }} · <time datetime="{{ latest.iso }}" title="{{ latest.iso }}">{{ latest.age }}</time> · <a class="sha" href="{{ latest.url }}">{{ latest.id }}</a></p> |
| 62 | </section> |
| 63 | {%- endif %} |
| 64 | </aside> |
| 65 | </div> |
| 66 | {% endblock %} |