diff options
author | KushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com> | 2021-08-18 00:26:02 -0300 |
---|---|---|
committer | KushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com> | 2021-08-18 00:26:02 -0300 |
commit | 9e782ba01620997becc3118433e3d1961a88b2c3 (patch) | |
tree | 14219adaa719d6c6fb913dd9a2cf73ba3a09df71 /client.go | |
parent | 17e54854794dacac8409cd10ffb77005d74b8dbe (diff) |
rudimentary theme switching
Diffstat (limited to 'client.go')
-rw-r--r-- | client.go | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -53,6 +53,7 @@ type PageData struct { ReturnTo string NewsItems []NewsItem BoardRemainer []int + Themes *[]string } type AdminPage struct { @@ -271,6 +272,8 @@ func OutboxGet(w http.ResponseWriter, r *http.Request, db *sql.DB, collection Co returnData.Pages = pages returnData.TotalPage = len(returnData.Pages) - 1 + returnData.Themes = &Themes + t.ExecuteTemplate(w, "layout", returnData) } @@ -374,6 +377,8 @@ func ArchiveGet(w http.ResponseWriter, r *http.Request, db *sql.DB, collection C returnData.Posts = collection.OrderedItems + returnData.Themes = &Themes + t.ExecuteTemplate(w, "layout", returnData) } @@ -467,6 +472,8 @@ func PostGet(w http.ResponseWriter, r *http.Request, db *sql.DB) { returnData.PostId = shortURL(returnData.Board.To, returnData.Posts[0].Id) } + returnData.Themes = &Themes + t.ExecuteTemplate(w, "layout", returnData) } |