feat: add app code
- journal domain package - httpserver package - html templates - main.go in root dir
This commit is contained in:
parent
3cc4d28aac
commit
943922a6e1
20 changed files with 1032 additions and 0 deletions
29
templates/entries.html
Normal file
29
templates/entries.html
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{{ 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 }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue