aboutsummaryrefslogtreecommitdiff
path: root/client.go
diff options
context:
space:
mode:
authorKushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com>2021-08-18 00:26:02 -0300
committerKushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com>2021-08-18 00:26:02 -0300
commit9e782ba01620997becc3118433e3d1961a88b2c3 (patch)
tree14219adaa719d6c6fb913dd9a2cf73ba3a09df71 /client.go
parent17e54854794dacac8409cd10ffb77005d74b8dbe (diff)
rudimentary theme switching
Diffstat (limited to 'client.go')
-rw-r--r--client.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/client.go b/client.go
index 1be926a..bef5c77 100644
--- a/client.go
+++ b/client.go
@@ -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)
}