{{ partial "head" . }}

{{ if (eq (trim .Site.Params.provider " " | lower) "github") | and (isset .Site.Params "repo_url") }}
  {{ $repo_id := replace .Site.Params.repo_url "https://github.com/" ""}}
  {{ .Scratch.Set "repo_id" $repo_id }}
{{ end }}

<div class="backdrop">
	<div class="backdrop-paper"></div>
</div>

<input class="toggle" type="checkbox" id="toggle-drawer">
<input class="toggle" type="checkbox" id="toggle-search">
<label class="toggle-button overlay" for="toggle-drawer"></label>

<header class="header">
	{{ partial "header" . }}
</header>

<main class="main">
	<div class="drawer">
		{{ partial "drawer" . }}
	</div>

	<article class="article">
		<div class="wrapper">
			<h1>Pages in {{ .Title }}</h1>

			{{ range .Data.Pages }}
			<a href="{{ .Permalink }}" title="{{ .Title }}">
				<h2>{{ .Title }}</h2>
			</a>

			<br>
			{{ printf "%s" .Summary | markdownify }} <br><a href="{{ .Permalink }}">[...]</a>

			<hr>
			{{ end }}

			{{ partial "copyright.html" . }}
		</div>
	</article>

	<div class="results" role="status" aria-live="polite">
		<div class="scrollable">
			<div class="wrapper">
				<div class="meta"></div>
				<div class="list"></div>
			</div>
		</div>
	</div>
</main>

{{ partial "footer_js" . }}