summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorivar <i@oiee.no>2026-04-04 16:34:46 +0200
committerivar <i@oiee.no>2026-04-04 16:34:46 +0200
commita6355e7a6530af3335c4cd8af05f1e9c8b978169 (patch)
treec9d920d1e996ef1c42d3455825731598df6b56c2 /templates
parent8a093aacd162d3fd9f142b53aab9edfa061fd66a (diff)
downloadnebbet.no-a6355e7a6530af3335c4cd8af05f1e9c8b978169.tar.xz
nebbet.no-a6355e7a6530af3335c4cd8af05f1e9c8b978169.zip
.
Diffstat (limited to 'templates')
-rw-r--r--templates/admin.html4
-rw-r--r--templates/admin/base.html13
-rw-r--r--templates/base.html4
-rw-r--r--templates/index.html44
4 files changed, 53 insertions, 12 deletions
diff --git a/templates/admin.html b/templates/admin.html
index c0ebeaa..9a649e7 100644
--- a/templates/admin.html
+++ b/templates/admin.html
@@ -4,8 +4,8 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin — {{.Title}}</title>
- <link rel="stylesheet" href="/styles/main.css">
- <link rel="stylesheet" href="/styles/admin.css">
+ <link rel="stylesheet" href="/assets/styles/main.css">
+ <link rel="stylesheet" href="/assets/styles/admin.css">
{{.ImportMapTag}}
{{- range .ComponentScripts}}
<script type="module" src="{{.}}"></script>
diff --git a/templates/admin/base.html b/templates/admin/base.html
index f88bba6..07811f8 100644
--- a/templates/admin/base.html
+++ b/templates/admin/base.html
@@ -6,14 +6,11 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin — {{.Title}}</title>
- <link rel="stylesheet" href="/styles/admin.css">
- <link rel="stylesheet" href="/lib/milkdown-crepe/style.css">
- <script type="importmap">
- {
- "imports": {
- "@milkdown/crepe": "/lib/node_modules/@milkdown/crepe"
- }
- }
+ <link rel="stylesheet" href="/assets/styles/admin.css">
+ {{.ImportMapTag}}
+ {{- range .ComponentScripts}}
+ <script type="module" src="{{.}}"></script>
+ {{- end}}
</script>
</head>
diff --git a/templates/base.html b/templates/base.html
index 9128b2e..2ff86e7 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -4,8 +4,8 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{.Title}}</title>
- <link rel="stylesheet" href="/styles/main.css">
- {{.ImportMapTag}}
+ <link rel="stylesheet" href="/assets/styles/main.css">
+ <script type="importmap">{ "imports": {} }</script>
{{- range .ComponentScripts}}
<script type="module" src="{{.}}"></script>
{{- end}}
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