diff options
| author | ivar <i@oiee.no> | 2026-04-04 16:34:46 +0200 |
|---|---|---|
| committer | ivar <i@oiee.no> | 2026-04-04 16:34:46 +0200 |
| commit | a6355e7a6530af3335c4cd8af05f1e9c8b978169 (patch) | |
| tree | c9d920d1e996ef1c42d3455825731598df6b56c2 /templates/index.html | |
| parent | 8a093aacd162d3fd9f142b53aab9edfa061fd66a (diff) | |
| download | nebbet.no-a6355e7a6530af3335c4cd8af05f1e9c8b978169.tar.xz nebbet.no-a6355e7a6530af3335c4cd8af05f1e9c8b978169.zip | |
.
Diffstat (limited to 'templates/index.html')
| -rw-r--r-- | templates/index.html | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..ae46faf --- /dev/null +++ b/templates/index.html @@ -0,0 +1,44 @@ +<!DOCTYPE html> +<html> + +<head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>nebbet.no</title> + <link rel="stylesheet" href="/assets/styles/main.css"> +</head> + +<body> + <main> + <h1>Posts</h1> + <form class="search" method="GET" action="/"> + <input type="search" name="q" value="{{.Query}}" placeholder="..."> + <button type="submit">Søk</button> + {{if .Query}}<a href="/">Tøm</a>{{end}} + </form> + + {{if .ActiveTag}} + <p class="filter-info">Emne: <strong>{{.ActiveTag}}</strong> <a href="/">tøm</a></p> + {{end}} + + {{if .Posts}} + <ul class="post-list"> + {{range .Posts}} + <li> + <a href="/{{.Slug}}">{{.Title}}</a> + <time>{{.Date}}</time> + {{if .Tags}} + <div class="tags"> + {{range .Tags}}<a href="/?tag={{.}}" class="tag">{{.}}</a>{{end}} + </div> + {{end}} + </li> + {{end}} + </ul> + {{else}} + <p class="empty">Dessverre.</p> + {{end}} + </main> +</body> + +</html>
\ No newline at end of file |
