Krolyxon
Commit 3cb9866

ferreniumtemplatesindex.html

57 lines · 2.5 KB · HTML

1{% extends "base.html" %}
2{% block content %}
3<section class="hero">
4 <div class="hero-main">
5 <h1 class="doto display-lg">{{ layout.site_title }}</h1>
6 {%- if !description.is_empty() %}
7 <p class="hero-desc">{{ description }}</p>
8 {%- endif %}
9 </div>
10 <p class="hero-meta label">{{ total }} {% if total == 1 %}Repository{% else %}Repositories{% endif %}</p>
11</section>
12{%- if total == 0 %}
13<section class="empty">
14 <p class="empty-title">No repositories</p>
15 <p class="empty-desc">Push a bare repository under the scan path and it will appear here.</p>
16</section>
17{%- else %}
18<form class="index-tools" method="get" action="{{ layout.base }}" role="search">
19 <label class="field">
20 <span class="label">Filter</span>
21 <input type="search" name="q" value="{{ q }}" autocomplete="off" spellcheck="false" placeholder="/" aria-keyshortcuts="/" data-filter>
22 </label>
23 {%- if let Some(sort) = sort_param %}
24 <input type="hidden" name="sort" value="{{ sort }}">
25 {%- endif %}
26 <nav class="sort" aria-label="Sort by">
27 <a class="label{% if !by_activity %} active{% endif %}" href="{{ sort_name_url }}"{% if !by_activity %} aria-current="true"{% endif %}>Name</a>
28 <a class="label{% if by_activity %} active{% endif %}" href="{{ sort_activity_url }}"{% if by_activity %} aria-current="true"{% endif %}>Activity</a>
29 </nav>
30</form>
31{%- for section in sections %}
32<section class="repo-section" data-section>
33 {%- if let Some(name) = section.name %}
34 <h2 class="label section-label">[ {{ name }} ]</h2>
35 {%- endif %}
36 <ul class="repo-list">
37 {%- for repo in section.rows %}
38 <li class="repo-row" data-search="{{ repo.search }}">
39 <a class="repo-link" href="{{ repo.url }}">
40 <span class="repo-name">{{ repo.name }}</span>
41 {%- if let Some(desc) = repo.description %}
42 <span class="repo-desc">{{ desc }}</span>
43 {%- endif %}
44 </a>
45 <span class="repo-meta label">
46 {%- if repo.fresh %}<span class="dot" title="Updated in the last 24 hours"></span>{% endif -%}
47 {%- if let Some(language) = repo.language %}<span class="repo-lang">{{ language }}</span>{% endif -%}
48 {%- if let Some(age) = repo.age %}<time datetime="{{ repo.iso.as_deref().unwrap_or_default() }}" title="{{ repo.iso.as_deref().unwrap_or_default() }}">{{ age }}</time>{% else %}Empty{% endif -%}
49 </span>
50 </li>
51 {%- endfor %}
52 </ul>
53</section>
54{%- endfor %}
55<p class="status no-matches" data-filter-empty{% if shown > 0 %} hidden{% endif %}>[No matches]</p>
56{%- endif %}
57{% endblock %}