diff --git a/html/index.html b/html/index.html index 171ec48..98d2262 100644 --- a/html/index.html +++ b/html/index.html @@ -14,10 +14,10 @@ {{ .SiteName }}

- the search for the new—endless + {{ .Data.Tagline }}

- +
diff --git a/html/search.html b/html/search.html index 0c20709..9a1df01 100644 --- a/html/search.html +++ b/html/search.html @@ -1,7 +1,7 @@ {{ template "head" . }} {{ template "nav" . }}
- +
diff --git a/server/server.go b/server/server.go index 84f6086..8f05481 100644 --- a/server/server.go +++ b/server/server.go @@ -28,6 +28,11 @@ type SearchData struct { Pages []types.PageData } +type IndexData struct { + Tagline string + Placeholder string +} + type ListData struct { Title string URLs []types.PageData @@ -60,7 +65,7 @@ func (h RequestHandler) searchRoute(res http.ResponseWriter, req *http.Request) } if len(query) == 0 { - view.Data = SearchData{} + view.Data = IndexData{Tagline: h.config.General.Tagline, Placeholder: h.config.General.Placeholder} h.renderView(res, "index", view) return } diff --git a/types/types.go b/types/types.go index 1afe936..d27e0d9 100644 --- a/types/types.go +++ b/types/types.go @@ -15,9 +15,11 @@ type PageData struct { type Config struct { General struct { - Name string `json:name` - URL string `json:url` - Port int `json:port` + Name string `json:name` + Tagline string `json:tagline` + Placeholder string `json:placeholder` + URL string `json:url` + Port int `json:port` } `json:general` Data struct { Source string `json:source`