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

github.com/vickylaixy/hugo-theme-introduction.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/projects/list.html')
-rw-r--r--layouts/projects/list.html9
1 files changed, 7 insertions, 2 deletions
diff --git a/layouts/projects/list.html b/layouts/projects/list.html
index 1977c46..619253e 100644
--- a/layouts/projects/list.html
+++ b/layouts/projects/list.html
@@ -15,8 +15,13 @@
<div class="card">
<div class="card-image">
<figure class="image is-3by2">
- <a href="{{ if .Params.external_link }}{{ .Params.external_link }}{{ else }}{{.Permalink}}{{ end }}">
- <img src="{{ if .Params.image }}{{ .Params.image | relURL }}{{ else }}{{ (.Site.Params.placeHolderimg | default "/img/workday.jpg") | relURL }}{{ end }}" alt="{{ .Title }}">
+ <a href="{{ if .Params.external_link }}{{ .Params.external_link }}{{ else }}{{ .Permalink }}{{ end }}">
+ {{ with .Resources.ByType "image" }}
+ {{ range first 1 (sort . "Params.weight") }}
+ {{ $image := .Resize "302x" }}
+ <img src="{{ $image.Permalink }}" alt ="{{ $image.Name }}">
+ {{ end }}
+ {{ end }}
</a>
</figure>
</div>