diff options
author | cel 🌸 <cel@blos.sm> | 2024-02-19 22:23:39 +0000 |
---|---|---|
committer | cel 🌸 <cel@blos.sm> | 2024-02-19 22:23:39 +0000 |
commit | 3c1b8007b6d5992e6bffc701ad06e0adec717145 (patch) | |
tree | af2a9a756aa6ad8e8f3f8ac18273c1668c711afe /templates | |
parent | bdfc973207a67a3b217c130520d53373d088763c (diff) | |
download | legit-3c1b8007b6d5992e6bffc701ad06e0adec717145.tar.gz legit-3c1b8007b6d5992e6bffc701ad06e0adec717145.tar.bz2 legit-3c1b8007b6d5992e6bffc701ad06e0adec717145.zip |
support categories at index
Diffstat (limited to 'templates')
-rw-r--r-- | templates/index.html | 35 |
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 |