Added Fiber and layouts
This commit is contained in:
parent
f8e7ea482b
commit
63b19a249a
17 changed files with 331 additions and 37 deletions
8
templates/fs.go
Normal file
8
templates/fs.go
Normal 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
5
templates/index.html
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<h1>Thing</h1>
|
||||
|
||||
<form method="post" action="/sites">
|
||||
<input type="submit" value="Create Site">
|
||||
</form>
|
||||
9
templates/layouts/main.html
Normal file
9
templates/layouts/main.html
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>TEMP</title>
|
||||
</head>
|
||||
<body>
|
||||
{{embed}}
|
||||
</body>
|
||||
</html>
|
||||
1
templates/sites/index.html
Normal file
1
templates/sites/index.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
<h1>Site {{.site.Title}}</h1>
|
||||
Loading…
Add table
Add a link
Reference in a new issue