Commit cb144c35 authored by Ethan Madison's avatar Ethan Madison
Browse files

Refactor jumbotron into partial



All jumbotrons now use the same code.
Jumbotron will detect if it is being loaded on the home page and load
information accordingly.
Signed-off-by: default avatarEthan Madison <ethan@ethanmad.com>
parent 663f0dbf
{{ partial "header.html" . }}
<div class="jumbotron">
<div class="container">
<h1>{{ .Title }}</h1>
<p>{{ with .Params.description }}{{ . }}{{ end }}</p>
</div>
</div>
{{ partial "jumbotron.html" . }}
<div class="container">
<div class="row">
<div class="col-sm-8 doc-main">
......
......@@ -3,12 +3,7 @@
<main role="main">
<div class="jumbotron">
<div class="container">
<h1>{{ .Site.Title }}</h1>
<p>{{ if isset .Site.Params "description" }}{{ .Site.Params.description }}{{ else }}You can customize this text by params "description" in your <code>config.toml</code>.{{ end }}</p>
</div>
</div>
{{ partial "jumbotron.html" . }}
<div class="container">
<div class="row">
......
{{ $isHomePage := eq .Title .Site.Title }}
<div class="jumbotron">
<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>
</div>
</div>
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