Merge pull request #15 from budparr/dev

improve terms template
This commit is contained in:
Bud Parr 2017-04-19 20:01:26 -04:00 committed by GitHub
commit be0af409e7
2 changed files with 14 additions and 20 deletions

View file

@ -1,29 +1,22 @@
{{ define "main" }} {{ define "main" }}
{{ $data := .Data }}
<article class="cf pa3 pa4-m pa4-l"> <article class="cf pa3 pa4-m pa4-l">
<div class="measure-wide-l center f4 lh-copy nested-copy-line-height nested-links nested-img mid-gray"> <div class="measure-wide-l center f4 lh-copy nested-copy-line-height nested-links nested-img mid-gray">
{{ .Content }} {{ .Content }}
</div> </div>
</article> </article>
<div class="mw8 center"> <div class="mw8 center">
{{ range $taxonomyname, $taxonomy := .Site.Taxonomies }} <section class="ph4">
<h1> {{ range $key, $value := .Data.Terms }}
{{ $taxonomyname | humanize }} <h2 class="f1">
</h1> <a href="{{ "/" | relLangURL }}{{ $.Data.Plural | urlize }}/{{ $key | urlize }}" class="link blue hover-black">
{{ $.Data.Singular | humanize }}: {{ $key }}
<section class="ph4"> </a>
{{ range $key, $value := $taxonomy }} </h2>
<h2 class="f1"> {{ range $value.Pages }}
<a href="{{ $key | urlize }}" class="link blue hover-black"> {{ partial "summary.html" . }}
{{ $key }}
</a>
</h2>
{{ range $value.Pages }}
{{ partial "summary.html" . }}
{{ end }}
{{ end }} {{ end }}
</section> {{ end }}
</section>
{{ end }}
</div> </div>
{{ end }} {{ end }}

View file

@ -1,11 +1,12 @@
<div class="relative w-100 mb4 bg-white nested-copy-line-height"> <div class="relative w-100 mb4 bg-white nested-copy-line-height">
<div class="bg-white mb3 pa4 gray overflow-hidden"> <div class="bg-white mb3 pa4 gray overflow-hidden">
<span class="f6 db">{{ humanize .Section }}</span>
<h1 class="f3 near-black"> <h1 class="f3 near-black">
<a href="{{ .URL }}" class="link black dim"> <a href="{{ .URL }}" class="link black dim">
{{ .Title }} {{ .Title }}
</a> </a>
</h1> </h1>
<div class="nested-links f5 lh-copy nested-copy-line-height"> <div class="nested-links f5 lh-copy nested-copy-line-height">
{{ .Summary }} {{ .Summary }}
</div> </div>
</div> </div>