Added Fiber and layouts

This commit is contained in:
Leon Mika 2025-01-27 10:19:31 +11:00
parent f8e7ea482b
commit 63b19a249a
17 changed files with 331 additions and 37 deletions

8
templates/fs.go Normal file
View file

@ -0,0 +1,8 @@
package templates
import "embed"
//go:embed *.html
//go:embed layouts/*.html
//go:embed sites/*.html
var FS embed.FS

5
templates/index.html Normal file
View file

@ -0,0 +1,5 @@
<h1>Thing</h1>
<form method="post" action="/sites">
<input type="submit" value="Create Site">
</form>

View file

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>TEMP</title>
</head>
<body>
{{embed}}
</body>
</html>

View file

@ -0,0 +1 @@
<h1>Site {{.site.Title}}</h1>