]> git.ipfire.org Git - ipfire.org.git/blob - src/templates/blog/write.html
wiki: Only match usernames when a word starts with @
[ipfire.org.git] / src / templates / blog / write.html
1 {% extends "../base.html" %}
2
3 {% block title %}
4 {% if post %}
5 {{ _("Edit %s") % post.title }}
6 {% else %}
7 {{ _("Write A New Post") }}
8 {% end %}
9 {% end block %}
10
11 {% block container %}
12 <section class="hero is-primary">
13 <div class="hero-body">
14 <div class="container">
15 <nav class="breadcrumb" aria-label="breadcrumbs">
16 <ul>
17 <li>
18 <a href="/">{{ _("Home") }}</a>
19 </li>
20 <li>
21 <a href="/blog">{{ _("Blog") }}</a>
22 </li>
23 <li class="is-active">
24 <a href="#" aria-current="page">{{ _("Write") }}</a>
25 </li>
26 </ul>
27 </nav>
28
29 <h1 class="title">{{ _("Write a New Post") }}</h1>
30 </div>
31 </div>
32 </section>
33
34 <section class="section">
35 <div class="container">
36 <div class="columns">
37 <div class="column is-three-fifth">
38 <form action="" method="POST">
39 {% raw xsrf_form_html() %}
40
41 <div class="field">
42 <div class="control">
43 <input class="input" type="text" name="title" placeholder="{{ _("Title") }}"
44 {% if post %}value="{{ post.title }}"{% end %} required>
45 </div>
46 </div>
47
48 <div class="field">
49 <div class="control">
50 <textarea class="textarea" name="text" rows="16"
51 required>{% if post %}{{ post.text }}{% end %}</textarea>
52 </div>
53 </div>
54
55 <div class="field">
56 <label class="label">{{ _("Tags") }}</label>
57 <div class="control">
58 <input class="input" type="text" name="tags"
59 {% if post %}value="{{ " ".join(post.tags) }}"{% end %}>
60 </div>
61 </div>
62
63 <div class="field is-grouped">
64 <div class="control">
65 <button type="submit" class="button is-primary">
66 {{ _("Save") }}
67 </button>
68 </div>
69
70 {% if post %}
71 <div class="control">
72 <a class="button is-danger is-outline" href="/blog/{{ post.slug }}/delete">
73 {{ _("Delete") }}
74 </a>
75 </div>
76 {% end %}
77 </div>
78 </form>
79 </div>
80 </div>
81 </div>
82 </section>
83 {% end block %}