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(`RSS`), }, { Name: "Git", Href: "https://git.atri.dad/atridad", Icon: template.HTML(`Forgejo`), }, { Name: "Mastodon", Href: "https://fedi.atri.dad/@me", Icon: template.HTML(`Mastodon`), }, { Href: "https://bsky.app/profile/atridad.bsky.social", Icon: template.HTML(`Bluesky`), }, } 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) }