diff options
Diffstat (limited to 'layouts/index.html')
-rw-r--r-- | layouts/index.html | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..62c2b9e --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,32 @@ +{{ define "main" }} + + {{ $pages := where site.RegularPages "Type" "in" .Site.Params.mainSections }} + + <main class="index"> + {{ if .Content }} + <h1>{{ .Title | emojify }}</h1> + {{ .Content }} + {{ else }} + + {{ $paginator := .Paginate $pages }} + + <h1>{{ T "posts" }}</h1> + + <ul class="posts"> + {{ range $paginator.Pages }} + <li> + <a class="btn" href="{{ .Permalink }}"> + <p>{{ .Title | emojify }}</p> + {{ if not .Date.IsZero }}<time datetime="{{ .Date | dateFormat "2006-01-02" }}">{{ .Date.Format "2006-01-02" }}</time>{{ end }} + </a> + </li> + {{ end }} + </ul> + + {{ partial "pagination" . }} + + {{ end }} + + </main> + +{{ end }} |