OXYGENHUB
◆ v0.3.0 oxygenhub / templates / search.html
1.3 KiB · HTML · last changed Milestone 0.4: issues and notifications 1 month ago source blame history raw
1
{% extends "base.html" %}
2
{% block title %}Search{% endblock %}
3
{% block content %}
4
<div class="head"><h1>Search <small>{% if q.is_empty() %}repositories, issues, proposals, accounts{% else %}{{ hits.len() + repos.len() + accounts.len() }} results for “{{ q }}”{% endif %}</small></h1></div>
5
<form class="card wide" method="get" action="/search"><div class="row"><div><input type="search" name="q" value="{{ q }}" autofocus placeholder="words, or label:bug in a repository's issue list"></div><div><button type="submit">SEARCH</button></div></div></form>
6
{% if !repos.is_empty() %}<h2>Repositories</h2><ul class="rows">{% for r in repos %}<li><div><a class="name" href="/{{ r.owner }}/{{ r.name }}"><span class="mute">{{ r.owner }} /</span> <strong>{{ r.name }}</strong></a><p class="small">{{ r.description }}</p></div></li>{% endfor %}</ul>{% endif %}
7
{% if !accounts.is_empty() %}<h2>Accounts</h2><ul class="plain">{% for a in accounts %}<li><a href="/{{ a }}">{{ a }}</a></li>{% endfor %}</ul>{% endif %}
8
{% if !hits.is_empty() %}<h2>Issues and proposals</h2><ul class="rows">{% for h in hits %}<li><div><a class="name" href="{{ h.url }}"><span class="mute">{{ h.kind }} {{ h.slug }}#{{ h.number }}</span> <strong>{{ h.title }}</strong></a><p class="small">{{ h.snippet|safe }}</p></div></li>{% endfor %}</ul>{% endif %}
9
{% endblock %}