refactor templateFiles

This commit is contained in:
Chris kerr 2024-05-27 22:06:26 -04:00
parent e699eec6e0
commit 69e6374a75

View File

@ -17,14 +17,14 @@ const (
) )
// Define the common layout templates filenames // Define the common layout templates filenames
var layoutFiles = []string{ var templateFiles = []string{
"#layout.html", "#layout.html",
"header.html", "header.html",
"footer.html", "footer.html",
} }
// Initialize the common templates with full paths // Initialize the common templates with full paths
var layout = utils.PrependDir(templatesDir, layoutFiles) var layout = utils.PrependDir(templatesDir, templateFiles)
func renderTemplate(w http.ResponseWriter, data PageData, view string) { func renderTemplate(w http.ResponseWriter, data PageData, view string) {