diff options
| author | Shulhan <ms@kilabit.info> | 2026-01-23 15:33:13 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2026-01-24 07:11:24 +0700 |
| commit | 62c2e03409e8f7bc6f3f20df36603344afaf2b3a (patch) | |
| tree | 0235899db041244ecabc754ca636d7bbd651d1e0 /template_index_html.go | |
| parent | 8970c0fef45c87c183a27f8a66d9620fdb6daa1e (diff) | |
| download | ciigo-62c2e03409e8f7bc6f3f20df36603344afaf2b3a.tar.xz | |
all: embed CSS and index HTML template using memfs
Previously, with direct embed, every time we change the CSS or index
template, we need to restart the "ciigo serve" command.
Using memfs make us easy to update and see the changes directly, without
restarting the server.
Diffstat (limited to 'template_index_html.go')
| -rw-r--r-- | template_index_html.go | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/template_index_html.go b/template_index_html.go deleted file mode 100644 index 8b43083..0000000 --- a/template_index_html.go +++ /dev/null @@ -1,51 +0,0 @@ -// SPDX-FileCopyrightText: 2020 Shulhan <ms@kilabit.info> -// SPDX-License-Identifier: GPL-3.0-or-later - -package ciigo - -const templateIndexHTML = `<!DOCTYPE html> -<html> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <meta name="theme-color" content="#375EAB"> -{{- range $k, $v := .Metadata}} - <meta name="{{$k}}" content="{{$v}}"> -{{- end}} - <title>{{.Title}}</title> -{{- if .EmbeddedCSS}} - <style> - {{.EmbeddedCSS}} - </style> -{{- end}} -{{- range .Styles}} - <link rel="stylesheet" href="{{.}}"> -{{- end}} - </head> - <body> - <div class="topbar"> - <div class="container"> - <div class="top-heading"> - <a href="/">{{.Title}}</a> - </div> - <div class="menu"> - <form class="item" action="/_internal/search"> - <input type="text" name="q" placeholder="Search" /> - </form> - </div> - </div> - </div> - <div class="page"> - <div class="container"> -{{.Body}} - </div> - </div> - <div class="footer"> - Powered by <a - href="https://git.sr.ht/~shulhan/ciigo" - > - ciigo - </a> - </div> - </body> -</html>` |
