Make the inline showcase template names unique

To avoid surprising re-definitions.
This commit is contained in:
Bjørn Erik Pedersen 2018-02-10 12:59:18 +01:00
parent f97826a172
commit a180cd5cb6
No known key found for this signature in database
GPG Key ID: 330E6E2BD4859D8F

View File

@ -9,15 +9,15 @@ Showcase: {{ .Title }}
<div class="flex flex-wrap"> <div class="flex flex-wrap">
<div class="w-100 w-20-l order-1 order-0-l"> <div class="w-100 w-20-l order-1 order-0-l">
{{template "details" .}} {{template "sc-details" .}}
</div> </div>
<div class="w-100 w-60-l order-0 order-1-l"> <div class="w-100 w-60-l order-0 order-1-l">
{{template "main-column" .}} {{template "sc-main-column" .}}
</div> </div>
<aside class="dn mid-gray w-100 w-20-ns flex-l justify-center order-2"> <aside class="dn mid-gray w-100 w-20-ns flex-l justify-center order-2">
{{template "navigation" .}} {{template "sc-navigation" .}}
</aside> </aside>
</div> </div>
@ -32,7 +32,7 @@ Showcase: {{ .Title }}
{{define "main-column"}} {{define "sc-main-column"}}
{{ $img := (.Resources.ByType "image").GetMatch "*featured*" }} {{ $img := (.Resources.ByType "image").GetMatch "*featured*" }}
{{ with $img }} {{ with $img }}
{{ $big := .Fill "1024x512 top" }} {{ $big := .Fill "1024x512 top" }}
@ -50,7 +50,7 @@ Showcase: {{ .Title }}
{{end}} {{end}}
{{define "details"}} {{define "sc-details"}}
<div class="mt4 mt0-ns nested-links mr3-m mr4-l"> <div class="mt4 mt0-ns nested-links mr3-m mr4-l">
<div class="ba b--light-gray bg-white pa3"> <div class="ba b--light-gray bg-white pa3">
<h1 class="f3 mt0">{{.Title}}</h1> <h1 class="f3 mt0">{{.Title}}</h1>
@ -74,7 +74,7 @@ Showcase: {{ .Title }}
</div> </div>
{{end}} {{end}}
{{define "navigation"}} {{define "sc-navigation"}}
{{$section := where .Site.RegularPages "Section" .Section}} {{$section := where .Site.RegularPages "Section" .Section}}
{{$number_of_entries := $section | len}} {{$number_of_entries := $section | len}}
<ul class="pa0 list"> <ul class="pa0 list">