Add testimonials

This commit is contained in:
Chandler Swift 2025-12-28 19:42:39 -06:00
parent 06e943d478
commit 40223a12b5
7 changed files with 318 additions and 101 deletions

20
main.go
View file

@ -26,8 +26,24 @@ var notFoundTemplate string
//go:embed headshots/*
var headshots embed.FS
var tmpl = template.Must(template.New("index").Parse(indexTemplate))
var notFoundTmpl = template.Must(template.New("404").Parse(notFoundTemplate))
// Used for testimonial slider
var funcMap = template.FuncMap{
"add": func(a, b int) int {
return a + b
},
"sub": func(a, b int) int {
return a - b
},
"mod": func(a, b int) int {
if b == 0 {
return 0
}
return a % b
},
}
var tmpl = template.Must(template.New("index").Funcs(funcMap).Parse(indexTemplate))
var notFoundTmpl = template.Must(template.New("404").Funcs(funcMap).Parse(notFoundTemplate))
var completionProviders map[string]completion.CompletionProvider = map[string]completion.CompletionProvider{
"openrouter": openrouter.OpenRouterProvider{