OXYGENHUB
# 80642fde09cc oxygenhub / templates / home.html
2.3 KiB · HTML · last changed feat(web): the mark, ripples, the swarm and adrift (closes #167) 22 days ago source blame history raw
1
{% extends "base.html" %}
2
{% block title %}{% if let Some(o) = owner %}{{ o }}{% else %}Repositories{% endif %}{% endblock %}
3
{% block content %}
4
{% if !backdrop.is_empty() %}<script type="application/json" id="backdrop-data">{{ backdrop|safe }}</script>
5
{% include "backdrop.html" %}{% endif %}
6
<div class="head">
7
  {% if let Some(o) = owner %}<h1>{{ o }} <small>{{ repos.len()|plural("repository", "repositories") }}</small></h1>
8
  {% else %}<h1>Repositories <small>{{ description }}</small></h1>{% endif %}
9
</div>
10
{% if owner.is_none() %}
11
<form class="bar explore-bar" method="get" action="/explore">
12
  <input type="search" name="q" value="{{ q }}" placeholder="Filter by name, description or topic" aria-label="Filter repositories">
13
  <select name="sort" aria-label="Sort">
14
    <option value="activity"{% if sort == "activity" %} selected{% endif %}>recently active</option>
15
    <option value="stars"{% if sort == "stars" %} selected{% endif %}>most stars</option>
16
    <option value="name"{% if sort == "name" %} selected{% endif %}>name</option>
17
  </select>
18
  {% if !topic.is_empty() %}<input type="hidden" name="topic" value="{{ topic }}"><span class="topic">{{ topic }} <a href="/explore?sort={{ sort }}&amp;q={{ q }}" aria-label="Clear the topic">×</a></span>{% endif %}
19
  <button type="submit" class="small">FILTER</button>
20
</form>
21
{% endif %}
22
{% if repos.is_empty() %}
23
<p class="empty">No repositories yet. Create one with <code>oxygenhub admin repo create OWNER/NAME</code>, then <code>oxy push</code> into it.</p>
24
{% else %}
25
<ul class="rows repos" data-backdrop-avoid>
26
{% for r in repos %}
27
  <li>
28
    <div>
29
      <a class="name" href="/{{ r.owner }}/{{ r.name }}"><span class="mute">{{ r.owner }} /</span> <strong>{{ r.name }}</strong></a>
30
      {% if r.visibility != "public" %}<span class="tag">{{ r.visibility }}</span>{% endif %}
31
      {% if !r.description.is_empty() %}<p class="small">{{ r.description }}</p>{% endif %}
32
      {% if !r.topics.is_empty() %}<p class="topics">{% for t in r.topic_list() %}<a class="topic" href="/explore?topic={{ t }}">{{ t }}</a>{% endfor %}</p>{% endif %}
33
    </div>
34
    <div class="right small">{% if star_count(r.id) > 0 %}<span class="mute" title="stars">★ {{ star_count(r.id) }}</span> · {% endif %}updated <time title="{{ r.updated_ms|when_i }}">{{ r.updated_ms|ago_i }}</time></div>
35
  </li>
36
{% endfor %}
37
</ul>
38
{% endif %}
39
{% endblock %}