By using this site, you agree to have cookies stored on your device, strictly for functional purposes, such as storing your session and preferences.

Dismiss

 repo-forum.html

View raw Download
text/html • 2.55 kiB
HTML document, ASCII text
        
            
1
{% extends "repo.html" %}
2
{% set active_page = "forum" %}
3
4
{% block title %}
5
{% trans username=username, repository=repository %}Forum of {{ username }}/{{ repository }}{% endtrans %}
6
{% endblock %}
7
{% block content %}
8
<x-vbox>
9
<x-frame style="--width: 896px;" class="flexible-space">
10
<x-vbox>
11
<details class="reply-area">
12
<summary>{% trans %}Post topic{% endtrans %}</summary>
13
14
<form method="POST" action="new">
15
<x-vbox>
16
<x-vbox class="nopad">
17
<label for="subject">{% trans %}Subject{% endtrans %}</label>
18
<input id="subject" name="subject" required>
19
</x-vbox>
20
<textarea name="message" style="box-sizing: border-box;" rows="8" required></textarea>
21
<x-buttonbox>
22
<button type="submit">{% trans %}Submit{% endtrans %}</button>
23
</x-buttonbox>
24
</x-vbox>
25
</form>
26
</details>
27
<form class="hbox" action="./search">
28
<input type="text" name="q" placeholder="{% trans %}Search...{% endtrans %}" value="{{ query }}" aria-label="{% trans %}Search query{% endtrans %}">
29
<button type="submit">{% trans %}Search{% endtrans %}</button>
30
</form>
31
{% for post in Post.query.filter_by(repo=repo_data, parent=none).order_by(Post.last_updated.desc()) %}
32
<article class="card card-horizontal">
33
{% if post.state == 0 %}
34
<div class="card-top state-label" style="background: var(--color-done); color: var(--color-done-text);">
35
{% trans %}done{% endtrans %}
36
</div>
37
{% elif post.state == 1 %}
38
<div class="card-top state-label" style="background: var(--color-pending); color: var(--color-pending-text);">
39
{% trans %}active{% endtrans %}
40
</div>
41
{% endif %}
42
<section class="card-main">
43
<h3><a href="{{ post.number }}">{{ post.subject }}</a> <span class="post-number">#{{ post.number }}</span> ({{ post.children | length }})</h3>
44
<p><a href="/{{ post.owner.username }}">{{ post.owner.username }}</a></p>
45
</section>
46
</article>
47
{% endfor %}
48
</x-vbox>
49
</x-frame>
50
</x-vbox>
51
{% endblock %}
52