Commit | Line | Data |
---|---|---|
1 | {{/* | |
2 | * Add the featured image to the header if it's present in the Front Matter | |
3 | */}} | |
4 | {{ if .IsPage }} | |
5 | {{ with $.Params.featured_image }} | |
6 | {{ with resources.Get . }} | |
7 | <style media="screen"> | |
8 | #banner { | |
9 | background-image: url( {{ .Permalink }} ); | |
10 | } | |
11 | </style> | |
12 | {{ else }} | |
13 | {{ warnf "featured image not found: %s" . }} | |
14 | {{ end }} | |
15 | {{ end }} | |
16 | {{ end }} |