1<?php
2/**
3 * Default shell - the frame every page is rendered inside.
4 *
5 * A shell is plain HTML plus a handful of one-line calls. Everything dynamic
6 * comes from a function, so you can move any block anywhere, delete what you
7 * do not want, or rewrite the whole thing.
8 *
9 * theme_title() the site title, escaped
10 * theme_body_class() "theme-default page_highscores"
11 * theme_asset('x') URL of one of your files in assets/
12 * theme_content() the page itself - this one you must keep
13 * theme_menu() includes this theme's menu.php (optional)
14 * theme_sidebar() includes this theme's aside.php (optional)
15 * widget('login') one widget from widgets/ (optional)
16 */
17
18$countDown = $countDown ?? null;
19$countDown_hide = $countDown_hide ?? 0;
20$countDown_complete = $countDown_complete ?? '';
21
22$launch_seconds = $countDown ? (strtotime($countDown) - time()) : 0;
23$delay_hide = $launch_seconds + $countDown_hide;
24
25$aacQueries = $aacQueries ?? 0;
26?>
27<!DOCTYPE html>
28<html lang="en" dir="ltr">
29<head>
30 <meta charset="utf-8">
31 <meta name="viewport" content="width=device-width, initial-scale=1">
32 <title><?= theme_title() ?></title>
33
34 <link rel="stylesheet" href="<?= theme_asset('css/style.css') ?>">
35 <link rel="stylesheet" href="assets/fontawesome/css/font-awesome.min.css">
36 <link rel="stylesheet" href="<?= theme_asset('css/resp.css') ?>">
37
38 <?php if ($delay_hide > 0): ?>
39 <script src="<?= theme_asset('js/countdown.js') ?>" charset="utf-8"></script>
40 <?php endif; ?>
41
42 <script>
43 document.addEventListener('DOMContentLoaded', function () {
44 <?php if ($delay_hide > 0): ?>
45 countDown("countDownTimer", <?= (int)$launch_seconds ?>, <?= json_encode($countDown_complete) ?>);
46 <?php endif; ?>
47
48 document.querySelectorAll('.loginBtn').forEach(function (button) {
49 button.addEventListener('click', function (event) {
50 var firstLoginInput = document.querySelector('.loginContainer input:first-of-type');
51 if (firstLoginInput) {
52 event.preventDefault();
53 firstLoginInput.focus();
54 }
55 });
56 });
57
58 var accountLink = document.getElementById('accountLink');
59 if (accountLink) {
60 accountLink.addEventListener('click', function (event) {
61 var firstLoginInput = document.querySelector('.loginContainer input:first-of-type');
62 if (firstLoginInput && this.href.indexOf('#') >= 0) {
63 event.preventDefault();
64 firstLoginInput.focus();
65 }
66 });
67 }
68 });
69 </script>
70</head>
71<body class="<?= theme_body_class() ?>">
72
73 <div class="main">
74
75 <?php theme_menu(); ?>
76
77 <div class="well banner"></div>
78
79 <div class="well feedContainer preventCollapse">
80
81 <?php if ($delay_hide > 0): ?>
82 <div class="well topPane preventCollapse">
83 <div class="well pull-left">
84 <div id="countDownTimer" data-date="<?= htmlspecialchars((string)$countDown, ENT_QUOTES, 'UTF-8') ?>"></div>
85 </div>
86 </div>
87 <?php endif; ?>
88
89 <!-- MAIN FEED -->
90 <div class="pull-left leftPane">
91 <?php theme_content(); ?>
92 </div>
93 <!-- MAIN FEED END -->
94
95 <?php theme_sidebar(); ?>
96 </div>
97
98 <footer class="well preventCollapse">
99 <?php $footerText = theme_option('footer_html'); ?>
100 <?php if ($footerText !== ''): ?>
101 <div class="well preventCollapse footerCustom"><?= $footerText ?></div>
102 <?php endif; ?>
103 <div class="pull-left">
104 <p>© <?= theme_title() ?>.
105 <?= h(t('footer.generated_in', ['time' => elapsedTime()])) ?>
106 Q: <?= (int)$aacQueries ?>.
107 <?= h(t('footer.designed_by')) ?> <a href="https://otland.net/members/snavy.155163/" target="_blank" rel="noopener">Snavy</a>.
108 <?= h(t('footer.engine')) ?> <a href="credits.php">ZnoteX</a>.
109 </p>
110 </div>
111 <div class="pull-right">
112 <p><?= h(t('footer.server_clock', ['clock' => getClock(false, true)])) ?></p>
113 </div>
114 </footer>
115
116 </div><!-- .main -->
117
118</body>
119</html>
120