<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">

	<title>{% block title %}Shadowfacts{% endblock %}</title>

	<link rel="cannonical" href="https://{{ Self::domain() }}{{ self.permalink() }}">
	<link rel="alternate" type="application/rss+xml" title="Shadowfacts" href="https://{{ Self::domain() }}/feed.xml">

	<link rel="icon" href="/favicon.ico">
	<link rel="apple-touch-icon-precomposed" href="/favicon-152.png">
	<meta name="msapplication-TileColor" content="#F9C72F">
	<meta name="msapplication-TileImage" content="/favicon-152.png">

	<meta name="twitter:card" content="summary">
	<meta name="twitter:creator" content="@ShadowfactsDev">
	<meta property="og:title" content="{% block title %}{% endblock %}">
	{% block image %}
	<meta property="twitter:image" content="https://{{ Self::domain() }}shadowfacts.png">
	<meta property="og:image" content="https://{{ Self::domain() }}shadowfacts.png">
	{% endblock %}
	<meta property="og:url" content="https://{{ Self::domain() }}{{ self.permalink() }}">
	<meta property="og:site_name" content="Shadowfacts">

	{% block head %}{% endblock %}

	<script>
		(() => {
			const theme = localStorage.getItem("theme") || "auto";
			document.write(`<link rel="stylesheet" href="/css/${theme}.css?{{ Self::stylesheet_cache_buster() }}">`);
		})();
	</script>
	<noscript>
		<link rel="stylesheet" href="/css/auto.css?{{ Self::stylesheet_cache_buster() }}">
	</noscript>
</head>
<body itemscope itemtype="https://schema.org/Blog">
	<header class="site-header container">
		<div>
			<div>
				<h1 class="site-title">{{ Self::fancy_link("Shadowfacts", "/", None)|safe }}</h1>
				<p class="site-description">The outer part of a shadow is called the penumbra.</p>
			</div>
			<nav class="site-nav" role="navigation">
				<ul>
					<li>{{ Self::fancy_link("Archive", "/archive", None)|safe }}</li>
					<li>{{ Self::fancy_link("Tutorials", "/tutorials", None)|safe }}</li>
					<li>{{ Self::fancy_link("TV", "/tv", None)|safe }}</li>
					<li>
						<a href="#" class="dropdown-link" aria-haspopup="true">Other <span class="arrow arrow-down" aria-hidden="true"></span></a>
						<ul aria-label="Other links">
							<li>{{ Self::fancy_link("Gitea", "https://git.shadowfacts.net", None)|safe }}</li>
							<li>{{ Self::fancy_link("RTFM", "https://rtfm.shadowfacts.net", None)|safe }}</li>
							<li>{{ Self::fancy_link("Maven", "https://maven.shadowfacts.net", None)|safe }}</li>
							<li>{{ Self::fancy_link("Type", "https://type.shadowfacts.net", None)|safe }}</li>
							<li>{{ Self::fancy_link("Meme Machine", "https://mememachine.shadowfacts.net", None)|safe }}</li>
						</ul>
					</li>
				</ul>
			</nav>
		</div>
	</header>

	<div class="container main" role="main">
		{% block content %}{% endblock %}
	</div>

	<footer class="site-footer container">
		<!-- <h2 class="site-title">Shadowfacts</h2> -->
		<span class="ui-controls">
			Theme:
			<input type="radio" name="theme" id="auto" value="auto">
			<label for="auto">auto</label>
			<input type="radio" name="theme" id="light" value="light">
			<label for="light">light</label>
			<input type="radio" name="theme" id="dark" value="dark">
			<label for="dark">dark</label>
		</span>
		<span class="site-colophon">
			Generated on {{ Self::generated_at() | pretty_date }} by <a href="https://git.shadowfacts.net/shadowfacts/v6">v6</a>.
			<br>
			<img src="/buttons/vi.png" alt="Made with vi" />
			<img src="/buttons/rust.png" alt="Powered by Rust" />
			<img src="/buttons/html.png" alt="HTML: Learn it today!" />
		</span>

		<nav class="links">
			<ul>
				<li>{{ Self::fancy_link("Email", "mailto:me@shadowfacts.net", Some("rel=me"))|safe }}</li>
				<li>{{ Self::fancy_link("RSS", "/feed.xml", None)|safe }}</li>
				<li>{{ Self::fancy_link("GitHub", "https://github.com/shadowfacts", Some("rel=me"))|safe }}</li>
				<li>{{ Self::fancy_link("Mastodon", "https://social.shadowfacts.net/users/shadowfacts", Some("rel=me"))|safe }}</li>
			</ul>
		</nav>
		<aside class="webring">
			<a href="https://metro.bieszczady.pl">Metro Bieszczady webring</a>
			<a title="previous page in webring" href="https://metro.bieszczady.pl/cgi-bin/webring?action=previous&amp;from=shadowfacts">←</a>
			<a title="next page in webring" href="https://metro.bieszczady.pl/cgi-bin/webring?action=next&amp;from=shadowfacts">→</a>
		</aside>

		<script>
			(() => {
				const theme = localStorage.getItem("theme") || "auto";
				document.getElementsByName("theme").forEach((el) => {
					el.checked = theme === el.value;
					el.onchange = () => {
						localStorage.setItem("theme", el.value);
						window.location.reload();
					};
				});
			})();
		</script>
		<noscript>
			<style>
				.ui-controls {
					display: none;
				}
			</style>
		</noscript>
	</footer>

	<script data-goatcounter="https://shadowfacts.goatcounter.com/count" async src="//gc.zgo.at/count.v3.js" crossorigin="anonymous"></script>	

</body>
</html>