diff options
author | Frank Koenders <frank_koenders@hotmail.com> | 2019-11-17 03:27:21 +0300 |
---|---|---|
committer | Frank Koenders <frank_koenders@hotmail.com> | 2019-11-17 03:27:21 +0300 |
commit | 76941929d2951fec16a492a1759b16b5495bdb43 (patch) | |
tree | 790d42c82e755b0fbe19c6cdab00b858b8965b62 /layouts | |
parent | 0b5f90ad99b0631dd2e06377e8eb1caede167de7 (diff) |
Include more image checks
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/list.html | 4 | ||||
-rw-r--r-- | layouts/about/single.html | 2 | ||||
-rw-r--r-- | layouts/index.html | 8 |
3 files changed, 14 insertions, 0 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 0efd3f2..63cfb7c 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -10,7 +10,9 @@ {{ range $paginator.Pages }} <div class="col-md-6 mb-4"> <article class="card"> + {{ if .Params.Image }} <img src="{{ .Params.Image | absURL }}" class="card-img-top" alt="{{ .Title | markdownify }}"> + {{ end }} <div class="card-body px-0"> {{ range .Params.Categories }} <a href="{{ "categories/" | relLangURL }}{{ . | urlize | lower }}" @@ -34,8 +36,10 @@ <div class="widget"> {{ range first 1 (where .Site.RegularPages "Type" "about")}} <h4 class="widget-title">{{ .Title | markdownify }}</h4> + {{ if .Params.Image }} <img src="{{ .Params.Image | absURL }}" alt="" class="img-fluid author-thumb-sm d-block mx-auto rounded-circle mb-4"> + {{ end }} <p>{{ .Summary }}</p> <a href="{{ .Permalink }}" class="btn btn-outline-primary">Know More</a> {{ end }} diff --git a/layouts/about/single.html b/layouts/about/single.html index b32749a..f8ffc2a 100644 --- a/layouts/about/single.html +++ b/layouts/about/single.html @@ -4,7 +4,9 @@ <div class="container"> <div class="row"> <div class="col-lg-8 mx-auto text-center"> + {{ if .Params.Image }} <img src="{{ .Params.Image | absURL }}" alt="" class="img-fluid d-block mx-auto rounded-circle mb-4"> + {{ end }} <h4 class="widget-title">{{ .Title | markdownify }}</h4> <div class="content"> {{ .Content }} diff --git a/layouts/index.html b/layouts/index.html index b9683c6..b34087f 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -10,7 +10,9 @@ <article class="card featured-post"> <div class="row no-gutters align-items-center"> <div class="col-md-5"> + {{ if .Params.Image }} <img src="{{ .Params.Image | absURL }}" class="card-img" alt="{{ .Title | markdownify }}"> + {{ end }} </div> <div class="col-md-6 offset-md-1"> <div class="card-body"> @@ -38,7 +40,9 @@ {{ range first 3 (where .Site.RegularPages "Type" "post")}} <div class="col-lg-4 small-post-border"> <article class="media"> + {{ if .Params.Image }} <div class="recent-post-thumb mr-3" style="background-image: url('{{ .Params.Image | absURL }}');"></div> + {{ end }} <div class="media-body"> <div class="mb-3"><span>By {{ .Site.Params.Author }}</span> <span class="border-bottom border-primary px-2 mx-1"></span> @@ -64,7 +68,9 @@ {{ range $paginator.Pages }} <div class="col-md-6 mb-4"> <article class="card"> + {{ if .Params.Image }} <img src="{{ .Params.Image | absURL }}" class="card-img-top" alt="{{ .Title | markdownify }}"> + {{ end }} <div class="card-body px-0"> {{ range .Params.Categories }} <a href="{{ "categories/" | relLangURL }}{{ . | urlize | lower }}" @@ -88,8 +94,10 @@ <div class="widget"> {{ range first 1 (where .Site.RegularPages "Type" "about")}} <h4 class="widget-title">{{ .Title | markdownify }}</h4> + {{ if .Params.Image }} <img src="{{ .Params.Image | absURL }}" alt="" class="img-fluid author-thumb-sm d-block mx-auto rounded-circle mb-4"> + {{ end }} <p>{{ .Summary }}</p> <a href="{{ .Permalink }}" class="btn btn-outline-primary">Know More</a> {{ end }} |