Template
1
0
Fork 0
goth.stack/pages/tools.resize.go

40 lines
1.2 KiB
Go
Raw Permalink Normal View History

2024-02-22 14:14:11 -07:00
package pages
import (
"github.com/labstack/echo/v4"
2024-11-03 17:01:48 -06:00
"goth.stack/lib"
2024-02-22 14:14:11 -07:00
)
type ResizeProps struct {
Talks []lib.CardLink
}
func Resize(c echo.Context) error {
talks := []lib.CardLink{
{
Name: "How to ship less JavaScript",
Description: "A talk on building websites while being mindful of the JavaScript we ship. Presented at the Dev Edmonton July 2023 JS/Ruby/Python Meetup",
Href: "https://github.com/atridadl/devedmonton-july-2023",
Tags: []string{"astro", "ssr"},
Date: "July 06, 2023",
},
{
Name: "Hypermedia as the engine of application state - an Introduction",
Description: "A talk on building reactive websites using tools like HTMX instead of JSON + JS. Will be presented at the Dev Edmonton Fabruary 2024 JS/Ruby/Python Meetup",
2024-09-08 23:42:36 -06:00
// Href: lib.GeneratePublicURL("hypermedia_talk_atridad.pdf"),
2024-11-03 17:01:48 -06:00
Tags: []string{"golang", "htmx", "ssr"},
Date: "February 01, 2024",
2024-02-22 14:14:11 -07:00
},
}
2024-11-03 17:01:48 -06:00
props := ResizeProps{
2024-02-22 14:14:11 -07:00
Talks: talks,
}
// Specify the partials used by this page
partials := []string{"header", "navitems", "cardlinks"}
// Render the template
return lib.RenderTemplate(c.Response().Writer, "base", partials, props)
}