Added blog posts, and improved homepage
This commit is contained in:
8
baseTemplates/templates/blog/blogPost.tmpl
Normal file
8
baseTemplates/templates/blog/blogPost.tmpl
Normal file
@@ -0,0 +1,8 @@
|
||||
{{ define "bodyClass" }}post post-{{ .Slug }}{{ end }}
|
||||
|
||||
{{ define "content" }}
|
||||
<main class="max-80">
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ .Body }}
|
||||
</main>
|
||||
{{ end }}
|
13
baseTemplates/templates/blog/postsList.tmpl
Normal file
13
baseTemplates/templates/blog/postsList.tmpl
Normal file
@@ -0,0 +1,13 @@
|
||||
{{ define "bodyClass" }}page-postsList{{ end }}
|
||||
|
||||
{{ define "content" }}
|
||||
<main class="max-80">
|
||||
<h1>Blog</h1>
|
||||
|
||||
<ul>
|
||||
{{ range .Posts }}
|
||||
<li><a href="/blog/{{ .Slug }}/"><strong>{{ .Date.Format "2006-01-02" }}</strong> - {{ .Title }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</main>
|
||||
{{ end }}
|
Reference in New Issue
Block a user