<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>datetime.link</title>
	<meta name="viewport" content="width=device-width">

	{{template "resources.html"}}
</head>
<body>
	{{template "resources-body.html"}}

	<main id="app">
		{{$app := .App}}
		{{$t := .Req.Time}}
		{{range $zoneName := .Req.Zones}}
			<d-zone zone="{{$zoneName}}">
				{{with resolveZone $app $zoneName}}
					{{if .Error}}
						<d-zoneerror>
							Unable to load zone "{{$zoneName}}". The zone could be invalid
						</d-zoneerror>
					{{else}}
						{{$zt := $t.In .Location}}
						<div class="zoneinfo">
							{{if not .IsOffset}}
							<d-zonename>
								<span class="zonearea">{{.FirstName}},</span>
								<span class="zonecountry">&nbsp;{{.City.Country.Ref}}</span>
							</d-zonename>
							{{else}}
							<d-zonename>
								{{.Name}}
							</d-zonename>
							{{end}}
							{{if not .IsOffset}}
								<d-zoneoffset>{{.TimeOffset $t | formatOffset}}</d-zoneoffset>
							{{end}}
							<d-date date="{{$zt.Format "2006-01-02"}}">{{$zt.Format "2006-01-02"}}</d-date>
						</div>
						<div class="zonefigure">
							<d-time time="{{$zt.Format "15:04"}}">{{$zt.Format "15:04"}}</d-time>
						</div>
					{{end}}
				{{end}}
			</d-zone>
		{{end}}

		<d-zoneadd></d-zoneadd>
	</main>

	{{template "footer.html"}}

	{{template "interactive-icons.html"}}

	<!--
	<script src="/js/third-party/luxon.min.js"></script>
	<script src="/js/interactive.js" async></script>
	-->
</body>
</html>
