{{ define "title" }}
  {{ title (i18n (lower .Title)) | default .Title }} · {{ .Site.Title }}
{{ end }}
{{ define "content" }}
  <section class="container list">
    <header>
      <h1 class="title">
        <a class="title-link" href="{{ .Permalink | safeURL }}">
          {{ title (i18n (lower .Title)) | default .Title }}
        </a>
      </h1>
    </header>
    {{ .Content }}
    <ul>
      {{ if eq .File.Path "writeups/_index.md" }}
	{{- range .Sections -}}
          {{- .Render "li" -}}
        {{- end -}}
      {{ else }}
      <h2 class="title">Solved challenges</h2>
        {{- range .Paginator.Pages -}}
	  {{- .Render "chall" -}}
        {{- end -}}
      {{ end }}
    </ul>

    {{ partial "pagination.html" . }}
  </section>
{{ end }}
