-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathedit-post.html
26 lines (26 loc) · 1.18 KB
/
edit-post.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{{ template "head" . }}
<main>
<h1> {{ if .IsOP }} Thread preview {{ else }} {{ "PostEdit" | translate }} {{ end }}</h1>
<article style="margin: 0;">
{{ if .IsOP }}
<h2> {{.Data.ThreadTitle }} </h2>
{{ end }}
{{.Data.Content | markup }}
</article>
<form method="POST">
<div class="post-container" >
{{ if .IsOP }}
<label for="title">{{ "Title" | translate }}:</label>
<input required name="title" type="text" id="title" value="{{ .Data.ThreadTitle }}">
<label for="content">{{ "Content" | translate }}:</label>
{{ end }}
<label class="visually-hidden" for="content">{{ "Content" | translate }}:</label>
<textarea autofocus required name="content" id="content" placeholder='{{ "TextareaPlaceholder" | translate }}'>{{.Data.Content}}</textarea>
<button type="submit">{{ "Save" | translate }}</button>
</div>
<div style="margin-top: 1rem;">
<a style="font-style: italic;" href="/thread/{{.Data.ThreadID}}/#{{.Data.ID}}">{{ "GoBackToTheThread" | translate }}</a>
</div>
</form>
</main>
{{ template "footer" . }}