OXYGENHUB
# 56b8dbe66974 oxygenhub / templates / search.html
1.7 KiB · HTML · last changed feat(web): the card layout on every page (closes #159, closes #160, closes #161, closes #162, closes #163, closes #164) 22 days 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() %}<section class="card-box"><div class="card-head"><h2>Repositories</h2><span class="count-chip">{{ repos.len() }}</span></div><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></section>{% endif %}
7
{% if !accounts.is_empty() %}<section class="card-box"><div class="card-head"><h2>Accounts</h2><span class="count-chip">{{ accounts.len() }}</span></div><ul class="plain card-list">{% for a in accounts %}<li><a href="/{{ a }}">{{ a }}</a></li>{% endfor %}</ul></section>{% endif %}
8
{% if !hits.is_empty() %}<section class="card-box"><div class="card-head"><h2>Issues and proposals</h2><span class="count-chip">{{ hits.len() }}</span></div><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></section>{% endif %}
9
{% endblock %}