Krolyxon
Commit ec28036

ferreniumtemplatessummary.html

79 lines · 3.4 KB · HTML

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 let Some(bar) = languages %}
35 <section class="rail-block">
36 <h2 class="label">Languages</h2>
37 <div class="lang-bar" role="img" aria-label="{% for l in bar.legend %}{{ l.name }} {{ l.percent }}{% if !loop.last %}, {% endif %}{% endfor %}">
38 {%- for b in bar.blocks %}<i class="{{ b }}"></i>{% endfor -%}
39 </div>
40 <ul class="lang-legend">
41 {%- for l in bar.legend %}
42 <li><i class="{{ l.class }}" aria-hidden="true"></i><span class="label">{{ l.name }}</span><span class="lang-pct">{{ l.percent }}</span></li>
43 {%- endfor %}
44 </ul>
45 </section>
46 {%- endif %}
47 {%- if !clone_urls.is_empty() %}
48 <section class="rail-block" data-clone>
49 <div class="rail-head">
50 <h2 class="label">Clone</h2>
51 {%- if clone_urls.len() > 1 %}
52 <div class="segmented segmented-sm clone-switch" role="group" aria-label="Clone protocol">
53 {%- for url in clone_urls %}
54 <button type="button" data-clone-choice="{{ loop.index0 }}" aria-pressed="{% if loop.first %}true{% else %}false{% endif %}">{{ url.label }}</button>
55 {%- endfor %}
56 </div>
57 {%- endif %}
58 </div>
59 {%- for url in clone_urls %}
60 <div class="clone-row" data-clone-url="{{ loop.index0 }}">
61 <input class="clone-input" type="text" readonly value="{{ url.url }}" aria-label="{{ url.label }} clone URL" spellcheck="false">
62 <button type="button" class="icon-btn" data-copy aria-label="Copy {{ url.label }} clone URL" title="Copy">
63 <svg class="icon" aria-hidden="true"><use href="{{ layout.static_base }}icons/sprite.svg#copy"></use></svg>
64 </button>
65 </div>
66 {%- endfor %}
67 <p class="status copy-status" data-copy-status aria-live="polite"></p>
68 </section>
69 {%- endif %}
70 {%- if let Some(latest) = latest %}
71 <section class="rail-block">
72 <h2 class="label">Latest</h2>
73 <p class="latest-subject">{{ latest.subject }}</p>
74 <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>
75 </section>
76 {%- endif %}
77 </aside>
78</div>
79{% endblock %}