d23464c0 Andy McCall 1 month ago ↶
1
{% extends "base.html" %}
2
{% block title %}{% if let Some(o) = owner %}{{ o }}{% else %}Repositories{% endif %}{% endblock %}
3
{% block content %}
4
< div class = " head " >
5
{% if let Some(o) = owner %}< h1 > {{ o }} < small > {{ repos.len()|plural("repository", "repositories") }}</ small > </ h1 >
6
{% else %}< h1 > Repositories < small > {{ description }}</ small > </ h1 > {% endif %}
7
</ div >
1553bfc9 Andy McCall 1 month ago ↶
8
{% if owner.is_none() %}
9
< form class = " bar explore-bar " method = " get" action = " /explore" >
10
< input type = " search" name = " q" value = " {{ q }}" placeholder = " Filter by name, description or topic" aria-label = " Filter repositories" >
11
< select name = " sort" aria-label = " Sort" >
12
< option value = " activity" {% if sort = = "activity" %} selected {% endif %}> recently active</ option >
13
< option value = " stars" {% if sort = = "stars" %} selected {% endif %}> most stars</ option >
14
< option value = " name" {% if sort = = "name" %} selected {% endif %}> name</ option >
15
</ select >
16
{% 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 %}
17
< button type = " submit" class = " small " > FILTER</ button >
18
</ form >
19
{% endif %}
d23464c0 Andy McCall 1 month ago ↶
20
{% if repos.is_empty() %}
21
< 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 >
22
{% else %}
23
< ul class = " rows repos " >
24
{% for r in repos %}
25
< li >
26
< div >
27
< a class = " name " href = " /{{ r.owner }}/{{ r.name }}" > < span class = " mute " > {{ r.owner }} /</ span > < strong > {{ r.name }}</ strong > </ a >
28
{% if r.visibility != "public" %}< span class = " tag " > {{ r.visibility }}</ span > {% endif %}
29
{% if !r.description.is_empty() %}< p class = " small " > {{ r.description }}</ p > {% endif %}
1553bfc9 Andy McCall 1 month ago ↶
30
{% 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 %}
d23464c0 Andy McCall 1 month ago ↶
31
</ div >
1553bfc9 Andy McCall 1 month ago ↶
32
< 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 >
d23464c0 Andy McCall 1 month ago ↶
33
</ li >
34
{% endfor %}
35
</ ul >
36
{% endif %}
37
{% endblock %}