From fadbed1bcafcebfd68da62254a0eca79bc06eb41 Mon Sep 17 00:00:00 2001 From: Alyx BB Date: Sun, 5 Nov 2023 00:19:15 +0000 Subject: [PATCH 1/4] cleaned up index infobar --- controllers/index.go | 7 ++----- models/index.go | 8 +------- views/index.tmpl | 21 +++++---------------- 3 files changed, 8 insertions(+), 28 deletions(-) diff --git a/controllers/index.go b/controllers/index.go index f51e9cff..932adb26 100644 --- a/controllers/index.go +++ b/controllers/index.go @@ -19,7 +19,6 @@ type IndexController struct { type RenderData struct { CurrentAndNext *myradio.CurrentAndNext Banners []myradio.Banner - Teams []myradio.Team Timeslots []myradio.Timeslot Podcasts []myradio.Podcast MsgBoxError bool @@ -37,7 +36,7 @@ func (ic *IndexController) Get(w http.ResponseWriter, r *http.Request) { // This is where any form params would be parsed model := models.NewIndexModel(ic.session) - currentAndNext, banners, teams, timeslots, podcasts, showOnAir, err := model.Get() + currentAndNext, banners, timeslots, podcasts, showOnAir, err := model.Get() if err != nil { log.Println(err) @@ -47,7 +46,6 @@ func (ic *IndexController) Get(w http.ResponseWriter, r *http.Request) { data := RenderData{ CurrentAndNext: currentAndNext, Banners: banners, - Teams: teams, Timeslots: timeslots, Podcasts: podcasts, ShowOnAir: showOnAir, @@ -66,7 +64,7 @@ func (ic *IndexController) Post(w http.ResponseWriter, r *http.Request) { // Get all the data for the webpage model := models.NewIndexModel(ic.session) - currentAndNext, banners, teams, timeslots, podcasts, showOnAir, err := model.Get() + currentAndNext, banners, timeslots, podcasts, showOnAir, err := model.Get() if err != nil { log.Println(err) @@ -76,7 +74,6 @@ func (ic *IndexController) Post(w http.ResponseWriter, r *http.Request) { data := RenderData{ CurrentAndNext: currentAndNext, Banners: banners, - Teams: teams, Timeslots: timeslots, Podcasts: podcasts, ShowOnAir: showOnAir, diff --git a/models/index.go b/models/index.go index 56cf5744..f826e209 100644 --- a/models/index.go +++ b/models/index.go @@ -19,7 +19,7 @@ func NewIndexModel(s *myradio.Session) *IndexModel { // // On success, it returns the current and next show, and nil. // Otherwise, it returns undefined data and the error causing failure. -func (m *IndexModel) Get() (currentAndNext *myradio.CurrentAndNext, banners []myradio.Banner, teams []myradio.Team, timeslots []myradio.Timeslot, podcasts []myradio.Podcast, showOnAir bool, err error) { +func (m *IndexModel) Get() (currentAndNext *myradio.CurrentAndNext, banners []myradio.Banner, timeslots []myradio.Timeslot, podcasts []myradio.Podcast, showOnAir bool, err error) { currentAndNext, err = m.session.GetCurrentAndNext() if err != nil { return @@ -28,12 +28,6 @@ func (m *IndexModel) Get() (currentAndNext *myradio.CurrentAndNext, banners []my if err != nil { return } - - teams, err = m.session.GetCurrentTeams() - if err != nil { - return - } - timeslots, err = m.session.GetPreviousTimeslots(11) if err != nil { return diff --git a/views/index.tmpl b/views/index.tmpl index 440e2783..e56d2498 100644 --- a/views/index.tmpl +++ b/views/index.tmpl @@ -28,26 +28,15 @@
-
+
{{template "message_box" .}}
-
+

Get Involved


-
-
-

University Radio York has been alive since 1968, when we became the first legal independent radio station in the UK!

-

Help us continue our legacy by joining the URY team.

-

Contact our teams to find out more.

-
-
- -
-
+

University Radio York has been alive since 1968, when we became the first legal independent radio station in the UK!

+

Help us continue our legacy by joining the URY team.

+

find out more

From e787896102e85de55bb43dc7a0de94d9e26eb88d Mon Sep 17 00:00:00 2001 From: Alyx BB Date: Sun, 5 Nov 2023 17:14:47 +0000 Subject: [PATCH 2/4] added padding on infobar --- views/index.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/index.tmpl b/views/index.tmpl index e56d2498..816f1f82 100644 --- a/views/index.tmpl +++ b/views/index.tmpl @@ -28,10 +28,10 @@
-
+
{{template "message_box" .}}
-
+

Get Involved


University Radio York has been alive since 1968, when we became the first legal independent radio station in the UK!

From 115c096107d185530d8ffad658172a67af11cf69 Mon Sep 17 00:00:00 2001 From: Alyx BB Date: Sun, 5 Nov 2023 20:26:19 +0000 Subject: [PATCH 3/4] Revert "added padding on infobar" This reverts commit e787896102e85de55bb43dc7a0de94d9e26eb88d. --- views/index.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/index.tmpl b/views/index.tmpl index 816f1f82..e56d2498 100644 --- a/views/index.tmpl +++ b/views/index.tmpl @@ -28,10 +28,10 @@
-
+
{{template "message_box" .}}
-
+

Get Involved


University Radio York has been alive since 1968, when we became the first legal independent radio station in the UK!

From d4e5be467481e152a14a2893817b7e2e7df412d0 Mon Sep 17 00:00:00 2001 From: Alyx BB Date: Sun, 5 Nov 2023 20:35:57 +0000 Subject: [PATCH 4/4] added padding to index bar but good --- views/index.tmpl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/views/index.tmpl b/views/index.tmpl index e56d2498..323a6fa5 100644 --- a/views/index.tmpl +++ b/views/index.tmpl @@ -28,10 +28,13 @@
-
+
{{template "message_box" .}}
-
+
+ +
+

Get Involved


University Radio York has been alive since 1968, when we became the first legal independent radio station in the UK!