From 255816bddbb9f3dad1b7564bcf0fbe1667197e9e Mon Sep 17 00:00:00 2001 From: Alexis Tacnet Date: Wed, 4 Jan 2017 14:53:49 +0100 Subject: [PATCH] Add a "See more ..." on the homepage to see more blog posts --- layouts/index.html | 5 +++++ static/css/main.css | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/layouts/index.html b/layouts/index.html index 0f3b9f0..1add9bc 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -19,6 +19,11 @@ {{ end }} {{ end }} + + {{ $nbTotalGroup := len (.Data.Pages.GroupByDate "Jan, 2006" "desc")}} + {{ if gt $nbTotalGroup 5}} + See more ... + {{ end }} diff --git a/static/css/main.css b/static/css/main.css index 6263952..e0aea8e 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -513,6 +513,16 @@ section.main .container .content .post-item .meta { display: none; min-width: 100px; } +section.main .container .content .see-more { + font-style: italic; + float: right; + font-size: 0.9em; + margin-top: 2em; + color: #313537; +} +section.main .container .content .see-more:hover { + color: #666; +} section { padding: 0 16px; }