~aleteoryx/webjrnl

ref: ccb2c90f2928dabb1ca8a83fda49b238c8065323 webjrnl/template/jrnl.html -rw-r--r-- 888 bytes
ccb2c90f — Aleteoryx compat testing 5 months ago
                                                                                
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
27
28
29
{{template "head" .}}
	{{$text := .Jrnl.GetYearText .Year}}
	{{if eq $text ""}}
	<p>It's empty right now. Write a <code>&gt; date heading</code> to get started.</p>
	{{else}}
	<p>Edit an entry, or write a <code>&gt; date heading</code> to add a new one.</p>
	{{end}}
	<form method="POST">
		<textarea name="text" cols="72" rows="24">{{$text}}</textarea>
		<br/>
		<button type="submit">Update!</button>
	</form>
	{{if not (eq $text "")}}
	<br>
	<form method="GET" action="../goto">
		<input type="hidden" name="pfx" value="ntry/{{.Year}}/" />
		<label for="dest">View history for:</label>
		<select name="dest">
			{{range .Jrnl.ListYearEntries .Year}}
			<option value="{{printf "%02d/%02d" .Date.Month .Date.Day}}">
				{{printf "%02d-%02d" .Date.Month .Date.Day}}</option>
			{{end}}
		</select>
		&nbsp;
		<button type="submit">Go To</button>
	</form>
	{{end}}
{{template "foot" .}}