Skip to content
Snippets Groups Projects
list.html 1.2 KiB
Newer Older
alexisben's avatar
alexisben committed
{{ define "main" }}
  {{ partial "pages/hero.html" . }}

alexisben's avatar
alexisben committed
  <div class="document-content">
alexisben's avatar
alexisben committed
    {{- $category := site.GetPage (printf "/categories%s" .Params.category) -}}
    {{- if .Params.blocks }}
      {{ $need_aside := false }}
      {{ range .Params.blocks }}
        {{ if .title }}
          {{ $need_aside = true }}
        {{ end }}
alexisben's avatar
alexisben committed
      {{ end }}
alexisben's avatar
alexisben committed
      {{ partial "toc/container.html"
          (dict
              "category" $category
              "toc" "pages/toc.html"
              "context" .
          )
      }}
    {{ end }}

    {{ partial "hooks/after-page-hero.html" . }}

alexisben's avatar
alexisben committed
    {{ partial "pages/chapo.html" (dict
        "context" .
        "block_wrapped" true
      ) }}
alexisben's avatar
alexisben committed
      {{ partial "blocks/list.html" . }}
alexisben's avatar
alexisben committed
    {{ else }}
Arnaud Levy's avatar
Arnaud Levy committed
      <section class="block block-pages block-pages--grid">
        <div class="container">
          <div class="block-content">
alexisben's avatar
alexisben committed
            {{- partial "blocks/templates/pages/grid.html" (dict 
                "pages" .Params.children
                "show_images" true
                "show_descriptions" true
                ) }}
Arnaud Levy's avatar
Arnaud Levy committed
          </div>
        </div>
      </section>
alexisben's avatar
alexisben committed
    {{ end }}
alexisben's avatar
alexisben committed
  </div>
alexisben's avatar
alexisben committed

{{ end }}