package pages import ( "html/template" "atri.dad/lib" "github.com/labstack/echo/v4" ) type HomeProps struct { Title template.HTML Subtitle template.HTML Socials []lib.IconLink Tech []lib.IconLink ButtonsLinks []lib.ButtonLink } func Home(c echo.Context) error { socials := []lib.IconLink{ { Name: "Email", Href: "mailto:me@atri.dad", Icon: template.HTML(``), }, { Name: "RSS", Href: "/api/rss", Icon: template.HTML(``), }, { Name: "Github", Href: "https://github.com/atridadl", Icon: template.HTML(``), }, { name: "Bluesky", Href: "https://bsky.app/profile/atridad.bsky.social", Icon: template.HTML(``), }, { Name: "LinkedIn", Href: "https://www.linkedin.com/in/atridadl/", Icon: template.HTML(``), }, { Name: "Twitch", Href: "https://www.twitch.tv/himbothyswaggins", Icon: template.HTML(``), }, } tech := []lib.IconLink{ { Name: "React", Href: "https://react.dev", Icon: template.HTML(`React`), }, { Name: "TypeScript", Href: "https://typescriptlang.org", Icon: template.HTML(`TypeScript`), }, { Name: "Node.js", Href: "https://nodejs.org", Icon: template.HTML(`Node.js`), }, { Name: "Bun", Href: "https://bun.sh", Icon: template.HTML(`Bun`), }, { Name: "Go", Href: "https://golang.org", Icon: template.HTML(`Go`), }, { Name: "PostgreSQL", Href: "https://postgresql.org", Icon: template.HTML(`PostgreSQL`), }, { Name: "Redis", Href: "https://redis.io", Icon: template.HTML(`Redis`), }, { Name: "Docker", Href: "https://docker.com", Icon: template.HTML(`Docker`), }, } buttons := []lib.ButtonLink{ { Name: "Resumé", Href: "/public/files/Atridad_Lahiji_Resume.pdf", Internal: false, }, { Name: "Posts", Href: "/posts", Internal: true, }, } props := HomeProps{ Title: "Hi, I'm Atridad", Subtitle: "Researcher, Full-Stack Developer, and IT Professional.", Socials: socials, Tech: tech, ButtonsLinks: buttons, } // Specify the partials used by this page partials := []string{"header", "navitems", "iconlinks", "buttonlinks"} // Render the template return lib.RenderTemplate(c.Response().Writer, "base", partials, props) }