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

github.com/2-REC/hugo-myportfolio-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Severin <severinderek@gmail.com>2018-10-15 13:48:04 +0300
committerDerek Severin <severinderek@gmail.com>2018-10-15 13:48:04 +0300
commit14c7edd88cacfeb0bdcc4dbc2f768aa5cea3dbb2 (patch)
tree80f9f1fcca0e9bfaa0f6cd612d231772c25033d0 /layouts
parent3ad003f159804820cc8fb9d98d44fc972bd5f6eb (diff)
Homepage project sections: Allow specific image for projects
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/limage.html5
1 files changed, 3 insertions, 2 deletions
diff --git a/layouts/_default/limage.html b/layouts/_default/limage.html
index c2ad958..52c82b0 100644
--- a/layouts/_default/limage.html
+++ b/layouts/_default/limage.html
@@ -1,8 +1,9 @@
<div class="col-lg-4 col-sm-6">
{{ $path := replace .Dir "\\" "/" }}
<a href="/{{ $path }}" class="project-box project-link">
- {{ if .Params.small_image }}
- {{ $image := .Resources.GetMatch .Params.small_image }}
+ {{ $image_file := or .Params.cover_image .Params.small_image }}
+ {{ if $image_file }}
+ {{ $image := .Resources.GetMatch $image_file }}
{{ with $image }}
<img src="{{ .RelPermalink | relURL }}" class="img-responsive" alt="{{ .Name }}">
{{ end }}