diff options
Diffstat (limited to 'layouts/posts')
| -rw-r--r-- | layouts/posts/page.html | 7 | ||||
| -rw-r--r-- | layouts/posts/section.html | 12 |
2 files changed, 19 insertions, 0 deletions
diff --git a/layouts/posts/page.html b/layouts/posts/page.html new file mode 100644 index 0000000..dd21496 --- /dev/null +++ b/layouts/posts/page.html @@ -0,0 +1,7 @@ +{{ define "main" }} + <h1>{{ .Title }}</h1> + {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} + {{ $dateHuman := .Date | time.Format "2006-01-02" }} + <time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time> + {{ .Content }} +{{ end }} diff --git a/layouts/posts/section.html b/layouts/posts/section.html new file mode 100644 index 0000000..eedc63e --- /dev/null +++ b/layouts/posts/section.html @@ -0,0 +1,12 @@ +{{ define "main" }} + <h1>{{ .Title }}</h1> + {{ .Content }} + <ul> + {{ range .Pages }} + <li> + <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a> + <p>{{ .Date | time.Format "2006-01-02" }}</p>{{ .Summary }} + </li> + {{ end }} + </ul> +{{ end }} |
