working on the header image. Still does't show images set in front matter.
[theme-danix.xyz.git] / layouts / partials / head-addition.html
CommitLineData
e28a215c 1{{/*
2 * Add the featured image to the header if it's present in the Front Matter
3 */}}
50cea8ca 4{{ if .IsPage }}
44056311 5 {{ with $.Params.featured_image }}
6 {{ $source := $.Params.featured_image }}
7 {{ $image := resources.Get $source }}
8 <style media="screen">
9 #banner {
10 background-image: url( {{ $image.Permalink }} );
11 }
12 </style>
50cea8ca 13 {{ end }}
e28a215c 14{{ end }}