Dragon-Knight/templates/layouts/primary.php

55 lines
1.7 KiB
PHP

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?= page_title() ?></title>
<link rel="stylesheet" href="/css/dk.css">
<script src="/js/htmx.js"></script>
<script>
function opencharpopup(id = 0)
{
const url = id == 0 ? '/character' : '/character/' + id
window.open(url, "", "width=210,height=500,scrollbars")
}
function openmappopup()
{
window.open("/showmap", "", "width=520,height=520,scrollbars")
}
</script>
</head>
<body class="skin-<?= game_skin() ?>">
<div id="game-container">
<header>
<a href="/"><img id="logo" src="/img/logo.gif" alt="<?= env('game_name', 'Dragon Knight') ?>" title="<?= env('game_name', 'Dragon Knight') ?>"></a>
<nav>
<?php if (user() !== false): ?>
<a href='/logout'><img src='/img/button_logout.gif' alt='Log Out' title='Log Out'></a>
<?php else: ?>
<a href='/login'><img src='/img/button_login.gif' alt='Log In' title='Log In'></a>
<a href='/register'><img src='/img/button_register.gif' alt='Register' title='Register'></a>
<?php endif; ?>
<a href="/help" hx-boost='/help'><img src='/img/button_help.gif' alt='Help' title='Help'></a>
</nav>
</header>
<main>
<section id="left"><?= Render\left_nav() ?></section>
<section id="middle"><?= $content ?></section>
<section id="right"><?= Render\right_nav() ?></section>
</main>
<footer>
<div>Powered by <a href="/" target="_new">Dragon Knight</a></div>
<div>&copy; 2024 Sharkk</div>
<?= Render\debug_db_info(); ?>
<div>Version <?= VERSION ?> <?= BUILD ?></div>
</footer>
<?php if (env('debug', false)) echo Render\debug_query_log(); ?>
</div>
</body>
</html>