feat: tepmlate for all person bricks
and separate page for temporary template viewing
This commit is contained in:
@@ -237,54 +237,3 @@ func roomPageRoute(
|
||||
}
|
||||
}
|
||||
|
||||
func roomTemplatesPreview(
|
||||
templateFs *embed.FS,
|
||||
) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
type BrickData struct {
|
||||
ColorClass template.CSS
|
||||
Name string
|
||||
}
|
||||
|
||||
contentData := struct {
|
||||
Bricks []BrickData
|
||||
}{
|
||||
Bricks: []BrickData{
|
||||
{
|
||||
Name: "expand",
|
||||
ColorClass: "--expand-color",
|
||||
},
|
||||
{
|
||||
Name: "probing question",
|
||||
ColorClass: "--probing-q-color",
|
||||
},
|
||||
{
|
||||
Name: "change topic",
|
||||
ColorClass: "--change-topic-color",
|
||||
},
|
||||
{
|
||||
Name: "clarifying question",
|
||||
ColorClass: "--clarifying-q-color",
|
||||
},
|
||||
{
|
||||
Name: "meta",
|
||||
ColorClass: "--meta-color",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
pageData := pageData{
|
||||
Header: headerData{Title: "look at the room templates"},
|
||||
Content: contentData,
|
||||
}
|
||||
|
||||
baseFile := "templates/base.gohtml"
|
||||
tmpl := template.Must(template.ParseFS(templateFs, baseFile, "templates/tableTemplates.gohtml"))
|
||||
err := tmpl.ExecuteTemplate(w, "full-page", pageData)
|
||||
if err != nil {
|
||||
log.Printf("yoyo, error %s", err)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user