diff --git a/lib/links.go b/lib/links.go index 3858128..f1f6efa 100644 --- a/lib/links.go +++ b/lib/links.go @@ -18,3 +18,9 @@ type CardLink struct { Tags []string Internal bool } + +type ButtonLink struct { + Name string + Href string + Internal bool +} diff --git a/main.go b/main.go index 92705ab..e69f8ba 100755 --- a/main.go +++ b/main.go @@ -66,6 +66,7 @@ func main() { e.GET("/", pages.Home) e.GET("/projects", pages.Projects) e.GET("/talks", pages.Talks) + e.GET("/testimonials", pages.Testimonials) e.GET("/blog", pages.Blog) e.GET("/post/:post", pages.Post) e.GET("/rss", pages.RSSFeedHandler) diff --git a/pages/home.go b/pages/home.go index 4b9244b..5646c3b 100644 --- a/pages/home.go +++ b/pages/home.go @@ -10,9 +10,7 @@ import ( type HomeProps struct { Socials []lib.IconLink Tech []lib.IconLink - ContractLink string - ResumeURL string - SupportLink string + ButtonsLinks []lib.ButtonLink } func Home(c echo.Context) error { @@ -137,16 +135,37 @@ func Home(c echo.Context) error { }, } + buttons := []lib.ButtonLink{ + { + Name: "Contract Me", + Href: "mailto:contract@atri.dad", + Internal: false, + }, + { + Name: "Resumé", + Href: lib.GeneratePublicURL("Atridad_Lahiji_Resume.pdf"), + Internal: false, + }, + { + Name: "Testimonials", + Href: "/testimonials", + Internal: true, + }, + { + Name: "Support 🩵", + Href: "https://donate.stripe.com/8wMeVF25c78L0V2288", + Internal: false, + }, + } + props := HomeProps{ Socials: socials, Tech: tech, - ContractLink: "mailto:contract@atri.dad", - ResumeURL: lib.GeneratePublicURL("Atridad_Lahiji_Resume.pdf"), - SupportLink: "https://donate.stripe.com/8wMeVF25c78L0V2288", + ButtonsLinks: buttons, } // Specify the partials used by this page - partials := []string{"header", "navitems"} + partials := []string{"header", "navitems", "iconlinks", "buttonlinks"} // Render the template return lib.RenderTemplate(c.Response().Writer, "base", partials, props) diff --git a/pages/templates/home.html b/pages/templates/home.html index a7551d9..0b237e9 100644 --- a/pages/templates/home.html +++ b/pages/templates/home.html @@ -24,70 +24,26 @@ Atridad Lahiji // Root