{{ define "header" }}
<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />	
	<title>{{ .Data.Title }} - {{ .SiteName }}</title>
	<meta name="description" content="{{ .Data.Description }}" />
	<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />

	{{ if .EnablePublicArchive }}
		<link rel="alternate" type="application/rss+xml" title="{{ L.T "public.archiveTitle" }} - {{ .SiteName }}"
			href="{{ .RootURL }}/archive.xml" />
	{{ end }}

	<link href="/public/static/style.css?v={{ .AssetVersion }}" rel="stylesheet" type="text/css" />
	<link href="/public/custom.css?v={{ .AssetVersion }}" rel="stylesheet" type="text/css">
	<script src="/public/custom.js?v={{ .AssetVersion }}" async defer></script>

	{{ if ne .FaviconURL "" }}
		<link rel="icon" href="{{ .FaviconURL }}" type="image/x-icon" />
	{{ else }}
		<link rel="icon" href="/public/static/favicon.png?v={{ .AssetVersion }}" type="image/png" />
	{{ end }}
</head>
<body>
    <div class="container wrap">
		<header class="header">
			<div class="logo">
				<a href="{{ if .EnablePublicSubPage }}{{ .RootURL}}/subscription/form{{ end }}">
				{{ if ne .LogoURL "" }}
					<img src="{{ .LogoURL }}" alt="{{ .Data.Title }}" />
				{{ else }}
					<img src="/public/static/logo.svg?v={{ .AssetVersion }}" alt="{{ .Data.Title }}" />
				{{ end }}
				</a>
			</div>
		</header>
{{ end }}

{{ define "footer" }}
	</div>
	
	<footer class="container">
		{{ L.T "public.poweredBy" }} <a href="https://source.offmarket.win/aleagle/EagleCast" target="_blank" rel="noopener noreferrer">EagleCast</a>
	</footer>
</body>
</html>
{{ end }}
