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

github.com/austingebauer/devise.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Gebauer <agebauer@hashicorp.com>2020-04-05 20:28:33 +0300
committerAustin Gebauer <agebauer@hashicorp.com>2020-04-05 20:28:33 +0300
commitad1d38fb45589612218cbe4d0c934dd59654b033 (patch)
tree5c5f918b017de83e258cfb3a829c1b5ff2f30021
parent48d793bc2d1312c4dbd87812f7d18dc3742b9e82 (diff)
fix: broken default image for non-existing image config
-rw-r--r--layouts/partials/header.html14
1 files changed, 7 insertions, 7 deletions
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index de8a0a7..1a7a325 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -3,15 +3,15 @@
<div class="col-sm-4 col-12 text-sm-right text-center pt-sm-4">
<a href="/" class="text-decoration-none">
<img id="home-image" class="rounded-circle"
- {{ if (fileExists (printf "static/%s" (strings.TrimPrefix "/" .Site.Params.home_image))) }}
- {{ if hasPrefix .Site.Params.home_image "/" }}
- src="{{ .Site.Params.home_image }}"
+ {{ if isset .Site.Params "home_image" }}
+ {{ if hasPrefix .Site.Params.home_image "/" }}
+ src="{{ .Site.Params.home_image }}"
+ {{ else }}
+ src="{{ printf "/%s" .Site.Params.home_image }}"
+ {{ end }}
{{ else }}
- src="{{ printf "/%s" .Site.Params.home_image }}"
+ src="https://cdn.clipart.email/83451492858686fbb12fdf8df0957c94_lil-silhouettes-by-lil-squid_481-512.png"
{{ end }}
- {{ else }}
- src="https://cdn.clipart.email/83451492858686fbb12fdf8df0957c94_lil-silhouettes-by-lil-squid_481-512.png"
- {{ end }}
/>
</a>
</div>