- journal domain package - httpserver package - html templates - main.go in root dir
29 lines
741 B
HTML
29 lines
741 B
HTML
{{ template "layout.html" . }}
|
|
|
|
{{ define "title" }}Home{{ end }}
|
|
|
|
{{ define "content" }}
|
|
<style>
|
|
.disabled {
|
|
color: #aaa !important;
|
|
pointer-events: none;
|
|
}
|
|
</style>
|
|
<main class="container">
|
|
<h1>Journal entries</h1>
|
|
<hr />
|
|
<ul>
|
|
<!-- Entry title [date | YYYY-MM-DD] -->
|
|
{{ range .Entries }} <!-- begin range -->
|
|
<li>
|
|
<a href="/entry/{{ .ID }}">{{ .Title }} [{{ .FormattedDate }}]</a>
|
|
</li>
|
|
{{ end }} <!-- end range -->
|
|
</ul>
|
|
<hr />
|
|
<p>
|
|
[<a href="/?offset={{ .Pagination.Prev }}" class="{{ if eq .Pagination.Prev 0 }}disabled{{ end }}">prev</a>]
|
|
[<a href="/?offset={{ .Pagination.Next }}" class="{{ if eq .Pagination.Next 0 }}disabled{{ end }}">next</a>]
|
|
</p>
|
|
</main>
|
|
{{ end }}
|