2021-11-22 09:06:23 +00:00
|
|
|
// Code generated by go generate; DO NOT EDIT.
|
|
|
|
|
|
|
|
|
|
package handler
|
|
|
|
|
|
|
|
|
|
var TplMap = map[string]string{
|
2021-11-22 13:30:20 +00:00
|
|
|
"confirm_remove_status": `{{ define "content" }}
|
|
|
|
|
Are you sure you you want to delete the following status?
|
|
|
|
|
<p>{{ .status.Content }}</p>
|
2021-11-22 20:23:30 +00:00
|
|
|
<form action="/remove-status" method="post">
|
|
|
|
|
<input type="hidden" name="id"/>
|
2021-11-22 13:30:20 +00:00
|
|
|
<input type="submit" value="Submit">
|
|
|
|
|
</form>
|
|
|
|
|
{{ end }}`,
|
2021-11-22 13:00:19 +00:00
|
|
|
"create_status": `{{ define "content" }}
|
|
|
|
|
<h1>New status</h1>
|
|
|
|
|
{{ if .form.Error }}
|
|
|
|
|
<p>{{ .form.Error }}</p>
|
|
|
|
|
{{ end }}
|
|
|
|
|
{{ if .flash }}
|
|
|
|
|
<p>{{ .flash }}</p>
|
|
|
|
|
{{ end }}
|
|
|
|
|
<form action="/statuses/save" method="post">
|
|
|
|
|
<div class="field">
|
|
|
|
|
<input type="text" name="content" placeholder="What's new?" required autofocus />
|
|
|
|
|
</div>
|
|
|
|
|
<input type="submit" value="Submit">
|
|
|
|
|
</form>
|
2021-11-22 13:23:30 +00:00
|
|
|
{{ end }}`,
|
|
|
|
|
"edit_status": `{{ define "content" }}
|
|
|
|
|
<h1>Edit status</h1>
|
|
|
|
|
{{ if .form.Error }}
|
|
|
|
|
<p>{{ .form.Error }}</p>
|
|
|
|
|
{{ end }}
|
|
|
|
|
{{ if .flash }}
|
|
|
|
|
<p>{{ .flash }}</p>
|
|
|
|
|
{{ end }}
|
|
|
|
|
<form action="/statuses/{{ .status.Id }}/update" method="post">
|
|
|
|
|
<div class="field">
|
2021-11-22 20:23:30 +00:00
|
|
|
<div class="field">
|
|
|
|
|
<textarea name="content" placeholder="What's new?" required style="width: 100%; box-sizing: border-box;" autofocus>{{ .status.Content }}</textarea>
|
|
|
|
|
</div>
|
2021-11-22 13:23:30 +00:00
|
|
|
</div>
|
|
|
|
|
<input type="submit" value="Submit">
|
|
|
|
|
</form>
|
2021-11-22 13:00:19 +00:00
|
|
|
{{ end }}`,
|
2021-11-22 09:06:23 +00:00
|
|
|
"index": `{{ define "content" }}
|
2021-11-22 20:23:30 +00:00
|
|
|
<div class="cols">
|
|
|
|
|
<section>
|
|
|
|
|
<h2>Set your status</h2>
|
|
|
|
|
{{ if .form.Error }}
|
|
|
|
|
<p>{{ .form.Error }}</p>
|
|
|
|
|
{{ end }}
|
|
|
|
|
{{ if .flash }}
|
|
|
|
|
<p>{{ .flash }}</p>
|
|
|
|
|
{{ end }}
|
|
|
|
|
<form action="/status-save" method="post">
|
|
|
|
|
<div class="field">
|
|
|
|
|
<textarea name="content" placeholder="What's new?" required style="width: 100%; box-sizing: border-box;" autofocus></textarea>
|
|
|
|
|
</div>
|
|
|
|
|
<br>
|
|
|
|
|
<input type="submit" value="Submit">
|
|
|
|
|
</form>
|
|
|
|
|
</section>
|
|
|
|
|
<section>
|
|
|
|
|
<h2>Status stream</h2>
|
|
|
|
|
{{ range .statuses }}
|
|
|
|
|
<article class="status">
|
|
|
|
|
<div class="username"><a href="/{{ .User }}">{{ .User }}</a>, {{ .TimeAgo }}</div>
|
|
|
|
|
<p>{{ .Content }}</p>
|
|
|
|
|
</article>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</section>
|
|
|
|
|
</div>
|
2021-11-22 09:26:30 +00:00
|
|
|
{{ end }}`,
|
|
|
|
|
"login": `{{ define "content" }}
|
|
|
|
|
<h1>Login</h1>
|
|
|
|
|
{{ if .form.Error }}
|
|
|
|
|
<p>{{ .form.Error }}</p>
|
|
|
|
|
{{ end }}
|
|
|
|
|
<form action="/check-login" method="post" class="auth-form">
|
|
|
|
|
<div class="field">
|
|
|
|
|
<label for="name">Username</label>
|
|
|
|
|
<input type="text" id="name" name="name" autocomplete="off" required autofocus/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="field">
|
|
|
|
|
<label for="password">Password</label>
|
|
|
|
|
<input type="password" id="password" name="password" required/>
|
|
|
|
|
</div>
|
|
|
|
|
<br>
|
|
|
|
|
<input type="submit" value="Submit">
|
|
|
|
|
</form>
|
|
|
|
|
{{ end }}`,
|
|
|
|
|
"register": `{{ define "content" }}
|
|
|
|
|
<h1>Register</h1>
|
|
|
|
|
{{ if .form.Error }}
|
|
|
|
|
<p>{{ .form.Error }}</p>
|
|
|
|
|
{{ end }}
|
|
|
|
|
<form action="/register" method="post" class="auth-form">
|
|
|
|
|
<div class="field">
|
|
|
|
|
<label for="name">Username</label>
|
|
|
|
|
<input type="text" id="name" name="name" autocomplete="off" required autofocus/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="field">
|
|
|
|
|
<label for="password">Password</label>
|
|
|
|
|
<input type="password" id="password" name="password" required/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="field">
|
|
|
|
|
<label for="password-confirm">Confirm password</label>
|
|
|
|
|
<input type="password" id="password-confirm" name="password-confirm" required/>
|
|
|
|
|
</div>
|
|
|
|
|
<br>
|
|
|
|
|
<input type="submit" value="Submit">
|
|
|
|
|
</form>
|
2021-11-22 09:06:23 +00:00
|
|
|
{{ end }}`,
|
|
|
|
|
}
|