<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>{_title}</title>

	<link rel="stylesheet" href="/assets/reset.css">
	<link rel="stylesheet" href="/assets/dk.css">

	<script src="/assets/scripts/confirm_modal.js"></script>
	<script src="/assets/scripts/select_arrows.js"></script>

	<script>
		function open_char_popup()
		{
			window.open("/showchar", "", "width=210,height=500,scrollbars")
		}

		function open_map_popup()
		{
			window.open("/showmap", "", "width=520,height=520,scrollbars")
		}
	</script>
</head>
<body>
	<div id="container">
		<header>
			<div><img src="/assets/images/logo.gif" alt="Dragon Knight" title="Dragon Knight"></div>
			<nav>{include "topnav.html"}</nav>
		</header>

		<section id="game">
			<aside id="left">
				{if authenticated}
					{include "leftside.html"}
				{/if}
			</aside>
			<main>
				{include "flashes.html"}
				{yield "content"}
			</main>
			<aside id="right">
				{if authenticated}
					{include "rightside.html"}
				{/if}
			</aside>
		</section>

		<footer>
			<div>Powered by <a href="/">Dragon Knight</a></div>
			<div>&copy; 2025 Sharkk</div>
			<div>{_totaltime} Seconds, {_memalloc} MiB</div>
			<div>Version {_version} {_build}</div>
		</footer>
	</div>

	<div id="confirm-modal" class="modal">
		<div class="content">
			<p id="msg">Are you sure you want to continue?</p>
			<div class="buttons">
				<button id="confirm" class="btn btn-primary">Yes</button>
				<button id="cancel" class="btn">Cancel</button>
			</div>
		</div>
	</div>

	{yield "scripts"}

	<script>
		document.addEventListener('DOMContentLoaded', addSelectArrows)
	</script>
</body>
</html>
