{{ define "title" }}{{ .Title }}, Seite 1 :: {{ .Site.Title }}{{ end }}

{{ define "htmlheadbefore" }}
	{{ $images := .Resources.ByType "image" }}
	{{ $imageCount := len $images }}
	{{ $firstImage := index $images 0 }}
	<link rel="preload" href="{{ $firstImage.RelPermalink }}" as="image">
	{{ if gt $imageCount 1 }}
		<link rel="next" href="2/">
	{{ end }}
	{{ partial "comicpageslide.html" . }}
{{ end }}

{{ define "main" }}
	{{ $images := .Resources.ByType "image" }}
	{{ $imageCount := len $images }}
	{{ $firstImage := index $images 0 }}
	<h1>{{ .Title }}, Seite 1</h1>
	<nav class="comicnav">
		<span></span>
		<span></span>
		{{ if gt $imageCount 1 }}
			<a class="next" href="2/">Weiter</a>
			<a class="last" href="{{ $imageCount }}/">Ende</a>
		{{ else }}
			<span></span>
			<span></span>
		{{ end }}
	</nav>	
	<div id="comicpage">
		<img src="{{ $firstImage.RelPermalink }}">
	</div>
	<nav class="comicnav">
		<span></span>
		<span></span>
		{{ if gt $imageCount 1 }}
			<a class="next" href="2/">Weiter</a>
			<a class="last" href="{{ $imageCount }}/">Ende</a>
		{{ else }}
			<span></span>
			<span></span>
		{{ end }}
	</nav>
{{ end }}