~aleteoryx/webjrnl

ref: e5970b54b302888a18d39d90bba4615674386235 webjrnl/template/dash.html -rw-r--r-- 892 bytes
e5970b54 — Aleteoryx everything but logging, I think 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
30
31
32
{{template "head" .}}
	<p>o/ {{.Jrnl.Id}}</p>
	{{ $hasToday := .Jrnl.HasEntry .Today }}
	{{ $hasYesterday := .Jrnl.HasEntry .Yesterday }}

	<table cellspacing="0"><tr>
		<td>Today is {{ .Today }}.</td>
		<td>&nbsp;</td>
		{{if not $hasToday}}
		<td><form method="POST" action="jrnl/{{ .Today.Year }}">
			<input type="hidden" name="text" value="&gt; {{ .Today.URL }}&#10;" />
			<button type="submit">Start today's entry!</button>
		</form></td>
		{{end}}
		{{if not $hasYesterday}}
		<td><form method="POST" action="jrnl/{{ .Yesterday.Year }}">
			<input type="hidden" name="text" value="&gt; {{ .Yesterday.URL }} &#10;" />
			<button type="submit">Start yesterday's entry!</button>
		</form></td>
		{{end}}
	</tr></table>

	<hr/>

	<p>
		{{range $i, $year := .Jrnl.ListYears}}
		{{if ne $i 0}} • {{end}}
		<a href="jrnl/{{ $year }}">{{ $year }}</a>
		{{end}}
	</p>
{{template "foot" .}}