summaryrefslogtreecommitdiffstats
path: root/templates/index.html
diff options
context:
space:
mode:
authorLibravatar cel 🌸 <cel@blos.sm>2024-02-19 22:23:39 +0000
committerLibravatar cel 🌸 <cel@blos.sm>2024-02-19 22:23:39 +0000
commit3c1b8007b6d5992e6bffc701ad06e0adec717145 (patch)
treeaf2a9a756aa6ad8e8f3f8ac18273c1668c711afe /templates/index.html
parentbdfc973207a67a3b217c130520d53373d088763c (diff)
downloadlegit-3c1b8007b6d5992e6bffc701ad06e0adec717145.tar.gz
legit-3c1b8007b6d5992e6bffc701ad06e0adec717145.tar.bz2
legit-3c1b8007b6d5992e6bffc701ad06e0adec717145.zip
support categories at index
Diffstat (limited to '')
-rw-r--r--templates/index.html35
1 files changed, 20 insertions, 15 deletions
diff --git a/templates/index.html b/templates/index.html
index 80c9e1d..a820dec 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -2,20 +2,25 @@
<html>
{{ template "head" . }}
- <header>
- <h1>{{ .meta.Title }}</h1>
- <h2>{{ .meta.Description }}</h2>
- </header>
- <body>
- <main>
- <div class="index">
- {{ range .info }}
- <div class="index-name"><a href="/{{ .Name }}">{{ .Name }}</a></div>
- <div class="desc">{{ .Desc }}</div>
- <div>{{ .Idle }}</div>
+<header>
+ <h1>{{ .meta.Title }}</h1>
+ <h2>{{ .meta.Description }}</h2>
+</header>
+
+<body>
+ <main>
+ {{ range $key, $value := .categories }}
+ <div class="index-category">{{ $key }}</div>
+ <div class="index">
+ {{ range $value }}
+ <div class="index-name"><a href="/{{ .Path }}">{{ .Name }}</a></div>
+ <div class="desc">{{ .Desc }}</div>
+ <div>{{ .Idle }}</div>
{{ end }}
- </div>
- </main>
- </body>
+ </div>
+ {{ end }}
+ </main>
+</body>
+
</html>
-{{ end }}
+{{ end }} \ No newline at end of file