diff options
author | Somrat Sorkar <37659754+somratpro@users.noreply.github.com> | 2021-09-14 12:43:03 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-14 12:43:03 +0300 |
commit | 6e43041f43d88d9f1cfe59e1df697a14904784e6 (patch) | |
tree | 4ca3550f9947c50239e899d9fa105aab340a11ef | |
parent | f37ea9a7077c49244459b84dcad8af13b82e0a4b (diff) | |
parent | b60eba29d738767fbcf6086ffc62768c3ac5f6dd (diff) |
Merge pull request #47 from joomlaext/master
Blog view fixes & improvements
-rw-r--r-- | assets/scss/templates/_main.scss | 7 | ||||
-rw-r--r-- | exampleSite/config/_default/params.toml | 3 | ||||
-rw-r--r-- | layouts/_default/list.html | 4 |
3 files changed, 12 insertions, 2 deletions
diff --git a/assets/scss/templates/_main.scss b/assets/scss/templates/_main.scss index a616e70..d5869ef 100644 --- a/assets/scss/templates/_main.scss +++ b/assets/scss/templates/_main.scss @@ -48,6 +48,13 @@ } } +// blog card +.card-img { + object-fit: cover; + width: 100%; + height: 10vw; +} + // blog post a.post-title { color: $text-color-dark; diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index 9858d83..22b235f 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -8,6 +8,9 @@ image = "images/logo.png" # this image will be used as fallback if a page has no # contact form action contact_form_action = "#" # contact form works with https://formspree.io +# Type of pages to be rendered with a blog view +blogCategoryType = "category" + # Preloader [preloader] enable = false diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 6f4f283..2e03aeb 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -3,7 +3,7 @@ {{ partial "page-header.html" . }} <!-- checking blog --> -{{ if or (or (eq .Section "post") (eq .Section "blog")) (or (eq .Section "categories") (eq .Section "tags") )}} +{{ if or (or (eq .Section "post") (eq .Section "blog") (eq .Type site.Params.blogCategoryType)) (or (eq .Section "categories") (eq .Section "tags") )}} <section class="section"> <div class="container"> @@ -22,7 +22,7 @@ </div> </div> {{ end }} - {{ $paginator := .Paginate .Data.Pages }} + {{ $paginator := .Paginate (where .Data.Pages "Type" "!=" "featured") }} {{ range $paginator.Pages }} <div class="col-lg-4 col-sm-6 mb-5"> <div class="card border-0"> |