diff options
author | FChannel <> | 2021-07-02 02:05:58 -0700 |
---|---|---|
committer | FChannel <> | 2021-07-02 02:05:58 -0700 |
commit | 97ce6d91545ec10f35d692ccbf60536d83f5debf (patch) | |
tree | da65fbb40a3e936255d6af0b1313743b172bc2d3 /client.go | |
parent | a122d62f78e5f1fd66efc28994809d720a2841ab (diff) |
added anchor links for index.html and public instance indexing tweak
Diffstat (limited to 'client.go')
-rw-r--r-- | client.go | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -1,6 +1,5 @@ package main -import "fmt" import "net/http" import "html/template" import "database/sql" @@ -36,7 +35,8 @@ type Board struct{ type PageData struct { Title string - Message string + Message string + MessageHTML template.HTML Board Board Pages []int CurrentPage int @@ -81,7 +81,8 @@ func IndexGet(w http.ResponseWriter, r *http.Request, db *sql.DB) { var data PageData data.Title = "Welcome to " + actor.PreferredUsername - data.Message = fmt.Sprintf("%s is a federated image board based on activitypub. The current version of the code running the server is still a work in progress, expect a bumpy ride for the time being. Get the server code here https://github.com/FChannel0", Domain) + data.Message = actor.PreferredUsername + " is a federated image board based on activitypub. The current version of the code running the server is still a work in progress, expect a bumpy ride for the time being. Get the server code here https://github.com/FChannel0" + data.MessageHTML = template.HTML(actor.PreferredUsername + " is a federated image board based on activitypub. The current version of the code running the server is still a work in progress, expect a bumpy ride for the time being. Get the server code here <a href='https://github.com/FChannel0'>https://github.com/FChannel0</a>") data.Boards = Boards data.Board.Name = "" data.Key = *Key @@ -92,6 +93,8 @@ func IndexGet(w http.ResponseWriter, r *http.Request, db *sql.DB) { data.Board.Restricted = actor.Restricted data.InstanceIndex = GetCollectionFromReq("https://fchan.xyz/followers").Items + + t.ExecuteTemplate(w, "layout", data) } |