Add tailwind v2 CSS framework
This commit is contained in:
@@ -7,8 +7,8 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
func StaticTemplate(templatePath string) http.HandlerFunc {
|
||||
tpl := views.Must(views.FromFS(templates.FS, templatePath))
|
||||
func StaticTemplate(templatePath ...string) http.HandlerFunc {
|
||||
tpl := views.Must(views.FromFS(templates.FS, templatePath...))
|
||||
|
||||
var testWriter strings.Builder
|
||||
err := tpl.ExecuteWriter(&testWriter, nil)
|
||||
@@ -19,7 +19,7 @@ func StaticTemplate(templatePath string) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) { tpl.Execute(w, nil) }
|
||||
}
|
||||
|
||||
func FAQ(templatePath string) http.HandlerFunc {
|
||||
func FAQ(templatePath ...string) http.HandlerFunc {
|
||||
questions := []struct {
|
||||
Question string
|
||||
Answer string
|
||||
@@ -34,7 +34,7 @@ func FAQ(templatePath string) http.HandlerFunc {
|
||||
},
|
||||
}
|
||||
|
||||
tpl := views.Must(views.FromFS(templates.FS, templatePath))
|
||||
tpl := views.Must(views.FromFS(templates.FS, templatePath...))
|
||||
|
||||
var testWriter strings.Builder
|
||||
err := tpl.ExecuteWriter(&testWriter, nil)
|
||||
|
||||
Reference in New Issue
Block a user