Unverified Commit 859e891a authored by Ethan Madison's avatar Ethan Madison
Browse files

Make .Site.Params.image default on other pages



If a page does not have .Params.image defined, it will use
.Site.Params.image in the jumbotron.

This means all pages will hae jumbotron images.
Signed-off-by: default avatarEthan Madison <ethan@ethanmad.com>
parent 66adbd44
{{ $isHomePage := eq .Title .Site.Title }}
{{ $baseUrl := .Site.BaseURL }}
<div class="jumbotron" style="background-image: url({{ if $isHomePage }}{{ with .Site.Params.image }}{{ . }}{{ end }}{{ else }}{{ with .Params.image }}{{ . }}{{ end }}{{ end }})">
<div class="jumbotron" style="background-image: url({{ if isset .Params "image" }}{{ .Params.image }}{{ else }}{{ with .Site.Params.image }}{{ if $isHomePage }}{{ . }}{{ else }}{{ $baseUrl }}/{{ . }}{{ end }}{{ end }}{{ end }});">
<div class="container">
<h1>{{ if $isHomePage }}{{ .Site.Title }}{{ else }}{{ .Title }}{{ end }}</h1>
<p>{{ if $isHomePage }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ else }}{{ with .Params.description }}{{ . }}{{ end }}{{ end }}</p>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment