diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 1f18236..ce8de87 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -22,7 +22,7 @@ logofile = "img/logo.png" faviconfile = "img/logo.png" highlightjs = true progressively = true -latestpostcount = 10 +latestpostcount = 5 lang = "en" github = "example" email = "you@example.com" diff --git a/exampleSite/content/blog/example-of-an-article.md b/exampleSite/content/blog/example-of-an-article.md index 99c14dc..ad24994 100644 --- a/exampleSite/content/blog/example-of-an-article.md +++ b/exampleSite/content/blog/example-of-an-article.md @@ -2,6 +2,7 @@ author: "Alexis Tacnet" date: 2015-09-28 title: Example article +best: true --- ## Text diff --git a/layouts/_default/section.html b/layouts/_default/section.html index 54b2c0b..8348150 100644 --- a/layouts/_default/section.html +++ b/layouts/_default/section.html @@ -10,16 +10,18 @@ {{ end }} {{ end }} +
{{ if ne (len (where .Data.Pages "Title" "!=" $globalTitle)) 0}} -
{{ .Title }}
- {{ end }} +
diff --git a/layouts/index.html b/layouts/index.html index 849493b..94e632f 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -8,12 +8,16 @@ {{ end }} +
{{ $nbPosts := len (where .Data.Pages "Section" "blog") }} {{ if gt $nbPosts 0 }}
Latest posts
@@ -21,6 +25,21 @@ See more ... {{ end }} {{ end }} +
+ +
+ {{ $nbPosts := len (where .Data.Pages "Params.best" true) }} + {{ if gt $nbPosts 0 }} +
Best posts
+ + {{ end }} +
diff --git a/layouts/section/blog.html b/layouts/section/blog.html index bd20396..f89835d 100644 --- a/layouts/section/blog.html +++ b/layouts/section/blog.html @@ -2,15 +2,17 @@
-
Blog
-
    - {{ range .Data.Pages.GroupByDate "Jan, 2006" "desc"}} -
  • {{ .Key }}
  • - {{ range .Pages.ByPublishDate }} - {{ partial "li.html" . }} +
    +
    Blog
    +
      + {{ range .Data.Pages.GroupByDate "Jan, 2006" "desc"}} +
    • {{ .Key }}
    • + {{ range .Pages.ByPublishDate }} + {{ partial "li.html" . }} + {{ end }} {{ end }} - {{ end }} -
    +
+
diff --git a/static/css/main.css b/static/css/main.css index 0fe2d03..bd5471b 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -495,6 +495,9 @@ section.main .content .title-container { -ms-justify-content: space-between; justify-content: space-between; } +section.main .content .posts { + margin-bottom: 4em; +} section.main .content .page-heading { font-size: 18px; font-family: 'Raleway', 'Helvetica Neue', 'Arial', sans-serif; @@ -637,9 +640,6 @@ section.header { section.header-home { padding-top: 36px; } -section.icons { - padding-top: 0; -} section.main { padding-top: 32px; padding-bottom: 32px; @@ -660,7 +660,6 @@ section.main .container .content .post-item { padding-bottom: 60px; } section.icons { - padding-top: 60px; padding-bottom: 60px; } section.main {