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

github.com/bul-ikana/hugo-cards.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/sidebar.html')
-rw-r--r--layouts/partials/sidebar.html8
1 files changed, 6 insertions, 2 deletions
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html
index 1c5d9f5..155ce70 100644
--- a/layouts/partials/sidebar.html
+++ b/layouts/partials/sidebar.html
@@ -1,7 +1,11 @@
<div class="col-md-4 mt20">
<div class="post-img">
- {{ if .Params.img }}
- <img width="600" src="{{ .Site.BaseURL}}images/{{ .Params.img }}" alt="{{ .Params.title }}">
+ {{ if .Params.img }}
+ {{ with .Resources.Match .Params.img }}
+ {{ range . }}
+ <img width="100%" src="{{ .RelPermalink }}" alt="{{ .Title }}">
+ {{ end }}
+ {{ end }}
{{ else }}
<img width="600" src="{{ .Site.BaseURL }}images/{{ .Site.Params.defaultImage }}" alt="webjeda">
{{ end }}