From 67c46febcab72c964b1be56487fa300f76b64b92 Mon Sep 17 00:00:00 2001 From: Teajey <21069848+Teajey@users.noreply.github.com> Date: Wed, 15 May 2024 23:42:48 +1200 Subject: [PATCH] feat: bootstrap styling --- context/foreign_wishlist.go | 11 ++- templates/base.gotmpl | 30 +++++- templates/foreign_wishlist.gotmpl | 125 ++++++++++++++--------- templates/home.gotmpl | 159 +++++++++++++++++------------- templates/login.gotmpl | 35 ++++--- templates/register.gotmpl | 37 ++++--- 6 files changed, 249 insertions(+), 148 deletions(-) diff --git a/context/foreign_wishlist.go b/context/foreign_wishlist.go index fd1e31f..e6c487a 100644 --- a/context/foreign_wishlist.go +++ b/context/foreign_wishlist.go @@ -8,10 +8,11 @@ import ( ) type ForeignWishlistProps struct { - CurrentUserId string - Username string - UserReference string - Gifts []db.Gift + CurrentUserId string + CurrentUserName string + Username string + UserReference string + Gifts []db.Gift } func (ctx *Context) ViewForeignWishlist(w http.ResponseWriter, r *http.Request) { @@ -37,6 +38,6 @@ func (ctx *Context) ViewForeignWishlist(w http.ResponseWriter, r *http.Request) http.Error(w, "An error occurred while fetching this user's wishlist :(", http.StatusInternalServerError) return } - p := ForeignWishlistProps{CurrentUserId: user.Id, Username: otherUser.Name, UserReference: userReference, Gifts: gifts} + p := ForeignWishlistProps{CurrentUserId: user.Id, CurrentUserName: user.Name, Username: otherUser.Name, UserReference: userReference, Gifts: gifts} templates.Execute(w, "foreign_wishlist.gotmpl", p) } diff --git a/templates/base.gotmpl b/templates/base.gotmpl index 7fea8ec..038a0a0 100644 --- a/templates/base.gotmpl +++ b/templates/base.gotmpl @@ -4,6 +4,20 @@