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 %}
6246d1e5 Andy McCall 22 days ago ↶
4
{% if !backdrop.is_empty() %}< script type = " application/json" id = " backdrop-data " > { { backdrop | safe } } </ script >
5
{% include "backdrop.html" %}{% endif %}
d23464c0 Andy McCall 1 month ago ↶
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 >
1553bfc9 Andy McCall 1 month ago ↶
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 %}
d23464c0 Andy McCall 1 month ago ↶
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 %}
0a3b244b Andy McCall 22 days ago ↶
25
< ul class = " rows repos " data-backdrop-avoid >
d23464c0 Andy McCall 1 month ago ↶
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 %}
1553bfc9 Andy McCall 1 month ago ↶
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 %}
d23464c0 Andy McCall 1 month ago ↶
33
</ div >
1553bfc9 Andy McCall 1 month ago ↶
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 >
d23464c0 Andy McCall 1 month ago ↶
35
</ li >
36
{% endfor %}
37
</ ul >
38
{% endif %}
39
{% endblock %}