aboutsummaryrefslogtreecommitdiff
path: root/client.go
diff options
context:
space:
mode:
authorKushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com>2021-08-18 00:50:13 -0300
committerKushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com>2021-08-18 00:50:13 -0300
commitd460fa6316d3db4e68e6b4d4c7ee2d02d6505304 (patch)
treeb343013d9754cdaa61d30a407b28e3a01e53356d /client.go
parent9e782ba01620997becc3118433e3d1961a88b2c3 (diff)
it works
Diffstat (limited to 'client.go')
-rw-r--r--client.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/client.go b/client.go
index bef5c77..31e11f2 100644
--- a/client.go
+++ b/client.go
@@ -123,6 +123,8 @@ func IndexGet(w http.ResponseWriter, r *http.Request, db *sql.DB) {
data.InstanceIndex = GetCollectionFromReq("https://fchan.xyz/followers").Items
data.NewsItems = getNewsFromDB(db, 3)
+ data.Themes = &Themes
+
t.ExecuteTemplate(w, "layout", data)
}
@@ -156,6 +158,8 @@ func NewsGet(w http.ResponseWriter, r *http.Request, db *sql.DB, timestamp int)
data.Title = actor.PreferredUsername + ": " + data.NewsItems[0].Title
+ data.Themes = &Themes
+
t.ExecuteTemplate(w, "layout", data)
}
@@ -180,6 +184,8 @@ func AllNewsGet(w http.ResponseWriter, r *http.Request, db *sql.DB) {
data.Board.Restricted = actor.Restricted
data.NewsItems = getNewsFromDB(db, 0)
+ data.Themes = &Themes
+
t.ExecuteTemplate(w, "layout", data)
}
@@ -329,6 +335,8 @@ func CatalogGet(w http.ResponseWriter, r *http.Request, db *sql.DB, collection C
returnData.Posts = collection.OrderedItems
+ returnData.Themes = &Themes
+
t.ExecuteTemplate(w, "layout", returnData)
}