{{define "imgspage"}}
{{range $i, $img := .Data.Imgs}}
	{{if eq (add $i $.Data.Start) $.Data.End}}
		{{if ne $.Data.UserImpersonation ""}}
		<div hx-get="/imgs?page={{add $.Data.Page 1}}&fragment&user={{$.Data.UserImpersonation}}"
				hx-trigger="revealed"
				hx-swap="afterend">
		{{else}}
		<div hx-get="/imgs?page={{add $.Data.Page 1}}&fragment"
				hx-trigger="revealed"
				hx-swap="afterend">
		{{end}}
			<span>{{$img.Name}}</span><br/>
			<a href="{{$img.Link}}"><img src="{{$img.Link}}" /></a><br/>
	{{else}}
		<div>
			<span>{{$img.Name}}</span><br/>
			<a href="{{$img.Link}}"><img src="{{$img.Link}}" /></a><br/>
	{{end}}
			<hr/>
		</div>
{{end}}
{{end}}
