2021-11-22 09:06:23 +00:00
|
|
|
// Code generated by go generate; DO NOT EDIT.
|
|
|
|
|
|
|
|
|
|
package handler
|
|
|
|
|
|
|
|
|
|
var TplCommonMap = map[string]string{
|
2021-11-28 07:40:11 +00:00
|
|
|
"flash": `{{ define "flash" }}
|
|
|
|
|
{{ if . }}
|
|
|
|
|
<p class="flash">{{ . }}</p>
|
|
|
|
|
{{ end }}
|
|
|
|
|
{{ end }}`,
|
2021-11-22 09:06:23 +00:00
|
|
|
"layout": `{{ define "layout" }}
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="en">
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
2021-12-14 06:41:05 +00:00
|
|
|
<title>{{ template "title" . }}Status Cafe</title>
|
2021-11-22 20:23:30 +00:00
|
|
|
<meta name="description" content="your friends' updates">
|
|
|
|
|
<link rel="stylesheet" href="/assets/style.css"/>
|
2021-12-14 06:41:05 +00:00
|
|
|
{{ if .face }}
|
|
|
|
|
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>{{ .face }}</text></svg>">
|
|
|
|
|
{{ else }}
|
|
|
|
|
<link rel="icon" href="/assets/favicon.ico">
|
|
|
|
|
{{ end }}
|
2021-11-22 09:06:23 +00:00
|
|
|
{{ template "head" . }}
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
2021-11-22 20:23:30 +00:00
|
|
|
<header>
|
2021-11-26 22:36:48 +00:00
|
|
|
<nav>
|
2022-02-12 15:14:46 +00:00
|
|
|
<a href="/">status.cafe</a> <a href="https://forum.status.cafe">forum</a>
|
2021-11-26 22:36:48 +00:00
|
|
|
{{ if .logged }}
|
2021-11-26 22:43:14 +00:00
|
|
|
<a href="/settings">settings</a> <a href="/users/{{ .logged }}">{{ .logged }}</a> (<a href="/logout">logout</a>)
|
2021-11-26 22:36:48 +00:00
|
|
|
{{ else }}
|
|
|
|
|
<a href="/register">register</a> <a href="/login">login</a>
|
|
|
|
|
{{ end }}</nav>
|
2021-11-22 20:23:30 +00:00
|
|
|
</header>
|
|
|
|
|
<main>
|
2021-11-22 09:06:23 +00:00
|
|
|
{{ template "content" . }}
|
2021-11-22 20:23:30 +00:00
|
|
|
</main>
|
|
|
|
|
<footer>
|
|
|
|
|
</footer>
|
|
|
|
|
</div>
|
|
|
|
|
|
2021-11-22 09:06:23 +00:00
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|
{{ end }}
|
2021-11-22 20:23:30 +00:00
|
|
|
{{ define "head" }}{{ end }}
|
2021-12-14 06:41:05 +00:00
|
|
|
{{ define "title" }}{{ end }}`,
|
2021-11-25 05:56:21 +00:00
|
|
|
"status": `{{ define "status" }}
|
2021-11-30 20:50:10 +00:00
|
|
|
<div class="status-username"><a href="/users/{{ .User }}">{{ .User }}</a> {{ .Face }} {{ .TimeAgo }}</div>
|
2022-02-19 07:53:38 +00:00
|
|
|
<p class="status-content">{{ .ContentHtml }}</p>
|
2021-12-02 20:41:17 +00:00
|
|
|
{{ end }}`,
|
|
|
|
|
"status_form": `{{ define "status_form" }}
|
2021-12-04 15:22:30 +00:00
|
|
|
<div class="faces">
|
2021-12-03 05:52:34 +00:00
|
|
|
{{ range $i, $v := faces }}
|
2021-12-02 20:41:17 +00:00
|
|
|
<div class="radio">
|
2021-12-03 05:52:34 +00:00
|
|
|
<input
|
|
|
|
|
type="radio"
|
|
|
|
|
id="face{{ $i }}"
|
|
|
|
|
name="face"
|
|
|
|
|
value="{{ $v }}"
|
|
|
|
|
{{ if eq $i 0 }}
|
|
|
|
|
{{ if or (eq $.Face $v) (eq $.Face "") }}checked{{ end }}
|
|
|
|
|
{{ else }}
|
|
|
|
|
{{ if eq $.Face $v }}checked{{ end }}
|
|
|
|
|
{{ end }}>
|
|
|
|
|
<label for="face{{ $i }}">{{ $v }}</label>
|
2021-12-02 20:41:17 +00:00
|
|
|
</div>
|
2021-12-03 05:52:34 +00:00
|
|
|
{{ end }}
|
2021-12-02 20:41:17 +00:00
|
|
|
</div>
|
2025-11-20 00:12:26 +00:00
|
|
|
<div class="number">
|
|
|
|
|
What's your current word count?
|
2025-11-20 02:23:23 +00:00
|
|
|
<input type="number"
|
|
|
|
|
name="number"
|
|
|
|
|
min="1"
|
|
|
|
|
max="1000000000"
|
|
|
|
|
value="{{ .Number }}"
|
|
|
|
|
required><br>What do you want to say about your project? (Optional)<br><div class="field"> <textarea class="edit-status" name="content" maxlength="140"
|
|
|
|
|
placeholder="What project are you working on?" autofocus>{{ .Content }}</textarea>
|
|
|
|
|
|
2021-12-02 20:41:17 +00:00
|
|
|
</div>
|
|
|
|
|
<input type="submit" value="Submit">
|
2021-12-26 17:42:49 +00:00
|
|
|
{{ end }}
|
|
|
|
|
`,
|
2021-11-22 09:06:23 +00:00
|
|
|
}
|