danix
's git repository
home
/
my projects
/
theme-danix.xyz.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed images display on smaller screens
[theme-danix.xyz.git]
/
layouts
/
partials
/
head-addition.html
diff --git
a/layouts/partials/head-addition.html
b/layouts/partials/head-addition.html
index
40ac3a0
..
42eff42
100644
(file)
--- a/
layouts/partials/head-addition.html
+++ b/
layouts/partials/head-addition.html
@@
-3,12
+3,14
@@
*/}}
{{ if .IsPage }}
{{ with $.Params.featured_image }}
*/}}
{{ if .IsPage }}
{{ with $.Params.featured_image }}
- {{ $source := $.Params.featured_image }}
- {{ $image := resources.Get $source }}
- <style media="screen">
+ {{ with resources.Get . }}
+ <style media="screen">
#banner {
#banner {
-
background-image: url( {{ $image
.Permalink }} );
+
background-image: url( {{
.Permalink }} );
}
}
- </style>
+ </style>
+ {{ else }}
+ {{ warnf "featured image not found: %s" . }}
+ {{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}