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

github.com/chipsenkbeil/grid-side.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChip Senkbeil <chip.senkbeil@gmail.com>2015-09-27 22:42:32 +0300
committerChip Senkbeil <chip.senkbeil@gmail.com>2015-09-27 22:42:32 +0300
commit30b31921b9f14595d5ce08768982d62d4eca0443 (patch)
tree352d61c6b4dacd97255b588d871cbf9a63d0d6c9
parentdd713c8169cd43f3dc920b00a81d82d99d87c21a (diff)
Added fallback image if one is not set for projects
-rw-r--r--layouts/partials/project/item.html7
1 files changed, 6 insertions, 1 deletions
diff --git a/layouts/partials/project/item.html b/layouts/partials/project/item.html
index 4d1a7c7..1706760 100644
--- a/layouts/partials/project/item.html
+++ b/layouts/partials/project/item.html
@@ -1,6 +1,11 @@
{{ $url := $.Site.BaseURL }}
-{{ $image := .Params.image | urlize }}
+{{ if isset .Params "image" }}
+ {{ $.Scratch.Set "image" .Params.image }}
+{{ else }}
+ {{ $.Scratch.Set "image" "/img/placeholder.jpg" }}
+{{ end }}
+{{ $image := $.Scratch.Get "image" | urlize }}
{{ $title := .Title }}
{{ $summary := .Summary }}
{{ $link := .Permalink }}