Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/the2ne/hugo-frais.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fredon <the2ne@gmail.com>2016-10-19 19:30:49 +0300
committerOlivier Fredon <the2ne@gmail.com>2016-10-19 19:30:49 +0300
commit5c20eb5a6adac1d4566fa11f167960213218069c (patch)
tree5ff1cdae680a59a8289bc3ffcdf3f5c98c0d1e4c
parent58f0eb8e748642c31d450ebb1de08d769cef8370 (diff)
parent122f99e162a288e6f42caac57c8986515cd766c2 (diff)
Merge branch 'post-list'
-rw-r--r--layouts/index.html27
-rw-r--r--layouts/partials/post-list.html6
2 files changed, 25 insertions, 8 deletions
diff --git a/layouts/index.html b/layouts/index.html
index 7b6e3ea..1a783ed 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -7,8 +7,31 @@
</section>
<main class="content" role="main" id="main-content">
<h1>Yay!</h1>
- {{ partial "post-list" . }}
- {{ partial "pagination" . }}
+ {{ $baseurl := .Site.BaseURL }}
+ {{ $paginator := .Paginate (where .Data.Pages.ByDate.Reverse "Type" "post") 3 }}
+ {{ range $paginator.Pages }}
+ <article class="post post--preview">
+ <header>
+ <h2 class="post__title"><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
+ </header>
+ <footer class="post__meta">
+ <ul class="post__meta__infos">
+ <li class="post-meta__date"><time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "02 January 2006" }}</time></li>
+ </ul>
+ <ul class="post__meta__tags">
+ {{ range .Params.tags }}
+ <li><a href="{{ $baseurl }}tags/{{ . }}">{{ . }} </a></li>
+ {{ end }}
+ </ul>
+ </footer>
+ <section class="post__excerpt">
+ <p>{{ .Summary }}&hellip;</p>
+ {{ if .Truncated }}
+ <p class="readmore"><a href="{{ .Permalink }}">Read More…</a></p>
+ {{ end }}
+ </section>
+ </article>
+ {{ end }}
</main>
{{ partial "footer" . }}
{{ partial "js" . }}
diff --git a/layouts/partials/post-list.html b/layouts/partials/post-list.html
index a625a69..486e423 100644
--- a/layouts/partials/post-list.html
+++ b/layouts/partials/post-list.html
@@ -15,11 +15,5 @@
{{ end }}
</ul>
</footer>
- <section class="post__excerpt">
- <p>{{ .Summary }}&hellip;</p>
- {{ if .Truncated }}
- <p class="readmore"><a href="{{ .Permalink }}">Read More…</a></p>
- {{ end }}
- </section>
</article>
{{ end }}