mirror of https://github.com/theNewDynamic/gohugo-theme-ananke.git

Bud Parr
16.42.2017 2b1db71ce3920407fcf0ebcb2236443ef44512c2
Merge pull request #1 from budparr/dev

add taxonomy templates
2 files added
47 ■■■■■ changed files
layouts/_default/taxonomy.html 18 ●●●●● patch | view | raw | blame | history
layouts/_default/terms.html 29 ●●●●● patch | view | raw | blame | history
layouts/_default/taxonomy.html
New file
@@ -0,0 +1,18 @@
{{ define "main" }}
  <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">
      <p>Below you will find pages that utilize the taxonomy term “{{ .Title }}”</p>
    </div>
  </article>
  <div class="mw8 center">
    {{ $section := .Data.Pages }}
    <section class="flex-ns flex-wrap justify-around mt5">
      {{ range  $section }}
        <div class="relative w-100  mb4 bg-white">
          {{ partial "summary.html" . }}
        </div>
      {{ end }}
    </section>
  </div>
{{ end }}
layouts/_default/terms.html
New file
@@ -0,0 +1,29 @@
{{ define "main" }}
  <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">
      {{ .Content }}
    </div>
  </article>
  <div class="mw8 center">
    {{ range $taxonomyname, $taxonomy := .Site.Taxonomies }}
      <h1>
        {{ $taxonomyname | humanize }}
      </h1>
      <section class="ph4">
        {{ range $key, $value := $taxonomy }}
          <h2 class="f1">
            <a href="{{ $key | urlize }}" class="link blue hover-black">
              {{ $key }}
            </a>
          </h2>
          {{ range $value.Pages }}
            {{ partial "summary.html" . }}
          {{ end }}
        {{ end }}
      </section>
    {{ end }}
  </div>
{{ end }}