all repos — homestead @ 4bbbd38124322ce51bba65298c6143e0e6d1a746

Code for my website

refactor CalendarPage to match other template function signatures

Alan Pearce
commit

4bbbd38124322ce51bba65298c6143e0e6d1a746

parent

086f378195ddc1e3bce087196fcbda4e6d3ae6fd

1 file changed, 7 insertions(+), 7 deletions(-)

changed files
M domain/calendar/templates/calendar.godomain/calendar/templates/calendar.go
@@ -13,15 +13,15 @@ "alin.ovh/homestead/domain/calendar"
"alin.ovh/homestead/domain/web/templates" ) -func CalendarPage( - site templates.SiteSettings, - page templates.PageSettings, - cal calendar.Calendar, -) g.Node { - return templates.Layout(site, page, Calendar(site, cal)) +func CalendarPage(site templates.SiteSettings, cal *calendar.Calendar) g.Node { + return templates.Layout(site, templates.PageSettings{ + Title: "Calendar", + TitleAttrs: templates.Attrs{}, + BodyAttrs: templates.Attrs{}, + }, Calendar(site, cal)) } -func Calendar(site templates.SiteSettings, cal calendar.Calendar) g.Node { +func Calendar(site templates.SiteSettings, cal *calendar.Calendar) g.Node { past := true dates, err := cal.Availability(2) if err != nil {