Modified models to support a DB
This commit is contained in:
parent
3591e0c723
commit
ebaec3d296
33 changed files with 675 additions and 64 deletions
6
layouts/simplecss/fs.go
Normal file
6
layouts/simplecss/fs.go
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
package simplecss
|
||||
|
||||
import "embed"
|
||||
|
||||
//go:embed *.html
|
||||
var FS embed.FS
|
||||
23
layouts/simplecss/layout_main.html
Normal file
23
layouts/simplecss/layout_main.html
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{ .Site.Title }}</title>
|
||||
<link rel="stylesheet" href="https://cdn.simplecss.org/simple.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1>{{ .Site.Title }}</h1>
|
||||
<p>{{ .Site.Tagline }}</p>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
{{ .Body }}
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<p>This site under construction.</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
5
layouts/simplecss/posts_list.html
Normal file
5
layouts/simplecss/posts_list.html
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{{ range .Posts }}
|
||||
{{ if .Meta.Title }}<h3>{{ .Meta.Title }}</h3>{{ end }}
|
||||
{{ .HTML }}
|
||||
<a href="{{ url_abs .Path }}">{{ format_date .Meta.Date }}</a>
|
||||
{{ end }}
|
||||
3
layouts/simplecss/posts_single.html
Normal file
3
layouts/simplecss/posts_single.html
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{{ if .Meta.Title }}<h3>{{ .Meta.Title }}</h3>{{ end }}
|
||||
{{ .HTML }}
|
||||
<a href="{{ url_abs .Path }}">{{ format_date .Meta.Date }}</a>
|
||||
Loading…
Add table
Add a link
Reference in a new issue