package pages
import (
"html/template"
"atri.dad/lib"
"github.com/labstack/echo/v4"
)
type HomeProps struct {
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: "Fediverse",
Href: "https://blahaj.zone/@himbothy",
Icon: template.HTML(``),
},
{
Name: "GitHub",
Href: "https://github.com/atridadl",
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(``),
},
{
Name: "YouTube",
Href: "https://www.youtube.com/@himbothyswaggins",
Icon: template.HTML(``),
},
}
tech := []lib.IconLink{
{
Name: "React",
Href: "https://react.dev",
Icon: template.HTML(``),
},
{
Name: "TypeScript",
Href: "https://typescriptlang.org",
Icon: template.HTML(``),
},
{
Name: "Node.js",
Href: "https://nodejs.org",
Icon: template.HTML(``),
},
{
Name: "Bun",
Href: "https://bun.sh",
Icon: template.HTML(``),
},
{
Name: "Go",
Href: "https://golang.org",
Icon: template.HTML(``),
},
{
Name: "PostgreSQL",
Href: "https://postgresql.org",
Icon: template.HTML(``),
},
{
Name: "Redis",
Href: "https://redis.io",
Icon: template.HTML(``),
},
{
Name: "Docker",
Href: "https://docker.com",
Icon: template.HTML(``),
},
}
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,
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)
}