diff --git a/.misc/screenshot1.png b/.misc/screenshot1.png index 388a618..011bf82 100644 Binary files a/.misc/screenshot1.png and b/.misc/screenshot1.png differ diff --git a/.misc/screenshot2.png b/.misc/screenshot2.png index 44b8bac..2f3dc3c 100644 Binary files a/.misc/screenshot2.png and b/.misc/screenshot2.png differ diff --git a/main.go b/main.go index cc5defc..0c87e4d 100644 --- a/main.go +++ b/main.go @@ -16,10 +16,11 @@ var appTemplate *template.Template = template.New("app") var db Database type TemplateData struct { - TOC []string - Entry string Title string + SiteDescription string + TOC []string EntryTitle string + Entry string Footer []template.HTML } @@ -42,7 +43,14 @@ func handleApplication(w http.ResponseWriter, req *http.Request) { } err = appTemplate.ExecuteTemplate( w, "app", - TemplateData{TOC: db.Keys, Entry: entry, Title: MainTitle, EntryTitle: entryName, Footer: FooterContent}) + TemplateData{ + TOC: db.Keys, + Entry: entry, + Title: MainTitle, + EntryTitle: entryName, + Footer: FooterContent, + SiteDescription: SiteDescription, + }) if err != nil { logger.Println(err) } } diff --git a/public/index.html b/public/index.html index ffbcc77..3ded2be 100644 --- a/public/index.html +++ b/public/index.html @@ -19,7 +19,10 @@ {{- else -}}
-

{{ .Title }}

+
+

{{ .Title }}

+ {{ if .SiteDescription }}
{{ .SiteDescription }}
{{ end }} +
diff --git a/public/static/style.css b/public/static/style.css index 4f115a1..7e27b7d 100644 --- a/public/static/style.css +++ b/public/static/style.css @@ -62,9 +62,15 @@ footer, footer * { box-sizing: border-box; gap: 1rem; } -.home-main > h1 { +.about { + margin-bottom: 2rem; +} +.about > h1 { font-size: 1.6rem; } +.description { + white-space: pre-line; +} .home-main, .toc, #search-results { display: flex; flex-direction: column; diff --git a/settings.go b/settings.go index 640521c..870a530 100644 --- a/settings.go +++ b/settings.go @@ -14,6 +14,8 @@ const StaticDirectory = "./public/static" var ContentLanguage = language.English const MainTitle = "Encyclopedia" +var SiteDescription = `A very simple and clean reader/browser? +for plaintext... documentation? wiki? chapters of a book? whatever.` var FooterContent = []template.HTML{ template.HTML("powered by plaintext-encyclopedia"), }