package pages
import (
"html/template"
"github.com/labstack/echo/v4"
"goth.stack/lib"
)
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:example@email.com",
Icon: template.HTML(``),
},
{
Name: "RSS",
Href: "/api/rss",
Icon: template.HTML(``),
},
{
Name: "GitHub",
Href: "https://github.com/atridadl/goth.stack",
Icon: template.HTML(``),
},
}
tech := []lib.IconLink{
{
Name: "Go",
Href: "https://golang.org",
Icon: template.HTML(``),
},
{
Name: "Redis",
Href: "https://redis.io",
Icon: template.HTML(``),
},
{
Name: "Docker",
Href: "https://docker.com",
Icon: template.HTML(``),
},
}
props := HomeProps{
Socials: socials,
Tech: tech,
ContractLink: "mailto:contract@goth.stack",
ResumeURL: "https://srv.goth.stack/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)
}