package pages
import (
"html/template"
"atri.dad/lib"
"github.com/labstack/echo/v4"
)
type HomeProps struct {
Socials []lib.IconLink
Tech []lib.IconLink
ContractLink string
ResumeURL string
SupportLink string
}
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: "Discord",
Href: "http://discord.com/users/83679718401904640",
Icon: template.HTML(``),
},
{
Name: "Spotify",
Href: "https://open.spotify.com/user/31v3p4oq6im7fvpqhhbju222pbr4?si=f25bb92301434db2",
Icon: template.HTML(``),
},
{
Name: "Mastdon",
Href: "https://hachyderm.io/@atri",
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: "Remix",
Href: "https://remix.run",
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: "SQLite",
Href: "https://sqlite.org",
Icon: template.HTML(``),
},
{
Name: "Redis",
Href: "https://redis.io",
Icon: template.HTML(``),
},
{
Name: "OpenAI",
Href: "https://openai.com",
Icon: template.HTML(``),
},
{
Name: "Railway",
Href: "https://railway.app?referralCode=i4U1gm",
Icon: template.HTML(``),
},
{
Name: "Docker",
Href: "https://docker.com",
Icon: template.HTML(``),
},
}
props := HomeProps{
Socials: socials,
Tech: tech,
ContractLink: "mailto:contract@atri.dad",
ResumeURL: lib.GeneratePublicURL("Atridad_Lahiji_Resume.pdf"),
SupportLink: "https://donate.stripe.com/8wMeVF25c78L0V2288",
}
// Specify the partials used by this page
partials := []string{"header", "navitems"}
// Render the template
return lib.RenderTemplate(c.Response().Writer, "base", partials, props)
}