OXYGENHUB
# 356183b71fab oxygenhub / templates / wiki_pages.html
1.4 KiB · HTML · last changed Wikis: Markdown pages as an Oxygen repository of their own 1 month ago source blame history raw
1
{% extends "base.html" %}
2
{% import "repo_tabs.html" as m %}
3
{% block title %}Pages · wiki · {{ repo.owner }}/{{ repo.name }}{% endblock %}
4
{% block tabs %}{% call m::tabs(repo, "wiki") %}{% endblock %}
5
{% block content %}
6
<div class="head"><h1>Wiki pages <small>{{ pages.len() }}</small></h1>
7
  <p class="small">{% if can_edit %}<a class="go" href="{{ repo.url }}/wiki/_new">New page</a> {% endif %}<a class="go" href="{{ repo.url }}/wiki">Home</a></p>
8
</div>
9
<form class="search-row" method="get" action="{{ repo.url }}/wiki/_pages"><input type="search" name="q" value="{{ q }}" placeholder="Search the wiki" aria-label="Search the wiki"><button type="submit">SEARCH</button></form>
10
{% if !q.is_empty() %}
11
<section class="panel"><h2>{{ hits.len() }} {% if hits.len() == 1 %}page mentions{% else %}pages mention{% endif %} “{{ q }}”</h2>
12
  {% if hits.is_empty() %}<p class="mute small">Nothing.</p>{% else %}<ul class="plain">{% for (slug, line) in hits %}<li><a href="{{ repo.url }}/wiki/{{ slug }}">{{ crate::wiki::title_of(slug) }}</a>{% if !line.is_empty() %} <span class="small mute">{{ line }}</span>{% endif %}</li>{% endfor %}</ul>{% endif %}
13
</section>
14
{% endif %}
15
{% if pages.is_empty() %}<p class="empty">No pages yet.</p>{% else %}
16
<ul class="plain">{% for p in pages %}<li><a href="{{ repo.url }}/wiki/{{ p }}">{{ crate::wiki::title_of(p) }}</a></li>{% endfor %}</ul>
17
{% endif %}
18
{% endblock %}