222 lines
9.9 KiB
Plaintext
222 lines
9.9 KiB
Plaintext
{php
|
|
$utils = Wruczek\TSWebsite\Utils\Utils::class;
|
|
$tplutils = Wruczek\TSWebsite\Utils\TemplateUtils::i();
|
|
$auth = Wruczek\TSWebsite\Auth::class;
|
|
$userlangcode = $userLanguage->getLanguageCode();
|
|
$navActiveIndex = isset($navActiveIndex) ? (int) $navActiveIndex : 0;
|
|
}<!DOCTYPE html>
|
|
<html n:attr="lang => $userlangcode">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta name="generator" content="TS-website {\__TSWEBSITE_VERSION} by Wruczek / https://github.com/Wruczek/ts-website">
|
|
<meta name="csrf-token" content="{$csrfToken}">
|
|
<link rel="shortcut icon" href="img/icons/defaulticon-16.png">
|
|
|
|
<!-- TODO make it use the language variable "WEBSITE_TITLE" after the ACP update -->
|
|
<title>{$title} | {$config["website_title"]}</title>
|
|
|
|
<!-- Bootstrap 4.6.0 -->
|
|
{$tplutils::includeStylesheet("{cdnjs}/twitter-bootstrap/4.6.0/css/bootstrap.min.css", "sha256-T/zFmO5s/0aSwc6ics2KLxlfbewyRz6UNw1s3Ppf5gE=")}
|
|
|
|
<!-- FontAwesome CSS 5.8.2 -->
|
|
{$tplutils::includeStylesheet("{cdnjs}/font-awesome/5.15.2/css/all.min.css", "sha256-0fuNgzfNIlaClbDtmYyFxY8LTNCDrwsNshywr4AALy0=")}
|
|
|
|
<!-- DataTables 1.10.21 -->
|
|
{$tplutils::includeStylesheet("{cdnjs}/datatables/1.10.21/css/dataTables.bootstrap4.min.css", "sha256-ugpqzk9NhK3S2sVpMgSrIin1AzsJMlqUIMOCXyzPaL8=")}
|
|
|
|
<!-- Internal scripts -->
|
|
{$tplutils::includeStylesheet("css/flags/famfamfam-flags.min.css", true)}
|
|
{$tplutils::includeStylesheet("css/style.css", true)}
|
|
{$tplutils::includeStylesheet("css/loader.css", true)}
|
|
{$tplutils::includeStylesheet("css/cookiealert.css", true)}
|
|
{$tplutils::includeStylesheet("css/themes/dark.css", true)}
|
|
|
|
{if __DEV_MODE}
|
|
<!-- Dev script - added when dev mode is on -->
|
|
{$tplutils::includeStylesheet("css/dev.css", true)}
|
|
{/if}
|
|
</head>
|
|
<body n:attr="class => 'lang ' . $userlangcode">
|
|
|
|
<noscript>
|
|
<div class="alert alert-danger noscript-alert bottom-error-alert" role="alert">
|
|
{_"NO_JAVASCRIPT_ENABLED"}
|
|
</div>
|
|
</noscript>
|
|
|
|
<div class="alert alert-danger oldbrowser-alert bottom-error-alert" role="alert" style="display: none">
|
|
{_"UNSUPPORTED_BROWSER"}
|
|
</div>
|
|
|
|
{if !$auth::isLoggedIn()}
|
|
{include "utils/modal-login.latte"}
|
|
{/if}
|
|
|
|
<nav id="main-navbar" class="navbar navbar-expand-lg fixed-top nav-fix-scroll navbar-dark bg-primary">
|
|
<div class="container">
|
|
<a class="navbar-brand" href=".">
|
|
<img src="img/icons/defaulticon-64.png" width="32" height="32" class="d-inline-block align-top mr-1" alt="Brand image">
|
|
{$config["nav_brand"]}
|
|
</a>
|
|
|
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#mainNavbarNavDropdown"
|
|
aria-controls="mainNavbarNavDropdown" aria-expanded="false" aria-label="{_"NAV_TOGGLE"}">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
|
|
<div class="collapse navbar-collapse" id="mainNavbarNavDropdown">
|
|
<ul class="navbar-nav">
|
|
<li class="nav-item{if $navActiveIndex === 1} active{/if}">
|
|
<a class="nav-link" href="viewer.php"><i class="fas fa-eye"></i>{_"NAV_VIEWER"}</a>
|
|
</li>
|
|
<li class="nav-item{if $navActiveIndex === 2} active{/if}">
|
|
<a class="nav-link" href="assigner.php"><i class="fas fa-gamepad"></i>{_"NAV_ASSIGNER"}</a>
|
|
</li>
|
|
<li class="nav-item{if $navActiveIndex === 3} active{/if}">
|
|
<a class="nav-link" href="bans.php"><i class="fas fa-ban"></i>{_"NAV_BANS"}</a>
|
|
</li>
|
|
<li class="nav-item{if $navActiveIndex === 4} active{/if}">
|
|
<a class="nav-link" href="rules.php"><i class="fas fa-book"></i>{_"NAV_RULES"}</a>
|
|
</li>
|
|
<li class="nav-item{if $navActiveIndex === 5} active{/if}">
|
|
<a class="nav-link" href="faq.php"><i class="far fa-question-circle"></i>{_"NAV_FAQ"}</a>
|
|
</li>
|
|
</ul>
|
|
<ul class="navbar-nav ml-md-auto">
|
|
|
|
{if $auth::isLoggedIn()}
|
|
<li class="nav-item dropdown">
|
|
<a class="nav-link login-button text-truncate dropdown-toggle" href="#" id="navbarDropdownUser" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
<i class="fas fa-user"></i>{$auth::getNickname()}
|
|
</a>
|
|
<div class="dropdown-menu" aria-labelledby="navbarDropdownUser">
|
|
<button class="dropdown-item logoutUser"><i class="fas fa-sign-out-alt"></i>{_"NAV_ACCOUNT_LOGOUT"}</button>
|
|
</div>
|
|
</li>
|
|
{else}
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="#" data-openLoginModal><i class="fas fa-sign-in-alt"></i>{_"NAV_ACCOUNT_LOGIN"}</a>
|
|
</li>
|
|
{/if}
|
|
|
|
<li class="nav-item dropdown">
|
|
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownLanguageChooser" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
<i class="fas fa-language"></i>{$userLanguage->getLanguageNameNative()}
|
|
</a>
|
|
<form method="post" action="api/setlang.php">
|
|
{$csrfField}
|
|
<input type="hidden" name="return-to" value="{$_SERVER['PHP_SELF']}">
|
|
|
|
<div class="dropdown-menu" aria-labelledby="navbarDropdownLanguageChooser">
|
|
<button name="lang" class="dropdown-item{if $lang->getLanguageCode() === $userlangcode} active{/if}"
|
|
n:foreach="$languageList as $lang"
|
|
n:attr="value => $lang->getLanguageCode(), title => $lang->getLanguageNameEnglish()">
|
|
{$lang->getLanguageNameNative()}
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<div class="container">
|
|
{ifset $oldestTimestamp}
|
|
{include "utils/data-problem.latte", message => ("OUTDATED_DATA"|translate,($oldestTimestamp|fuzzyDateAbbr))}
|
|
{/ifset}
|
|
|
|
{if $tsExceptions}
|
|
{include "utils/data-problem.latte", message => "We are having trouble communicating with the server. Some parts of the website might not be working as expected."}
|
|
{/if}
|
|
|
|
<div class="row">
|
|
<!-- 1st column -->
|
|
<div class="col-lg-9">
|
|
{block content}{/block}
|
|
</div>
|
|
|
|
<!-- 2nd column -->
|
|
<div class="col-lg-3">
|
|
{include "sidebar.latte"}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- COOKIES -->
|
|
{include "utils/cookiealert.latte"}
|
|
<!-- /COOKIES -->
|
|
|
|
<footer class="footer d-md-flex">
|
|
<div>
|
|
© {$config["website_title"]} {date("Y")}
|
|
|
|
{if $config["imprint_enabled"]}
|
|
— <a href="{$config["imprint_url"]}">imprint</a>
|
|
{/if}
|
|
</div>
|
|
<div class="ml-auto footer-copyright">
|
|
<!-- Please respect the amount of work we've put for free into this project and leave the authors in the footer. Thanks! -->
|
|
<a href="https://github.com/Wruczek/ts-website" target="_blank">ts-website</a> v {\__TSWEBSITE_VERSION} —
|
|
© <a href="https://wruczek.tech/?source=tsw" target="_blank">Wruczek</a> 2017 - 2020
|
|
</div>
|
|
</footer>
|
|
|
|
<!-- JAVASCRIPT -->
|
|
|
|
<script>
|
|
// Simple error handler
|
|
window.onerror = function (msg, url, linenumber) {
|
|
// TODO: log to acp and deal with it, also better display (notification?)
|
|
alert('Javascript error occurred: ' + msg + '\nURL: ' + url + '\nLine Number: ' + linenumber);
|
|
return false // still run the default handler
|
|
}
|
|
</script>
|
|
|
|
<!-- jQuery 3.5.1 -->
|
|
{$tplutils::includeScript("{cdnjs}/jquery/3.5.1/jquery.min.js", "sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=")}
|
|
|
|
<!-- Bootstrap 4.6.0 (bundle - includes Popper.js) -->
|
|
{$tplutils::includeScript("{cdnjs}/twitter-bootstrap/4.6.0/js/bootstrap.bundle.min.js", "sha256-sCElQ8xaSgoxwbWp0eiXMmGZIRa0z94+ffzzO06BqXs=")}
|
|
|
|
<!-- JS-Cookie 2.2.1 -->
|
|
{$tplutils::includeScript("{cdnjs}/js-cookie/2.2.1/js.cookie.min.js", "sha256-oE03O+I6Pzff4fiMqwEGHbdfcW7a3GRRxlL+U49L5sA=")}
|
|
|
|
<!-- day.js 1.10.4 -->
|
|
{$tplutils::includeScript("{cdnjs}/dayjs/1.10.4/dayjs.min.js", "sha256-NTsR4SOm3YHfJrmrmvBtEYqfQ6jQ5yvEKMhgQe3DIl0=")}
|
|
{$tplutils::includeScript("{cdnjs}/dayjs/1.10.4/plugin/localizedFormat.min.js", "sha256-lT2SyoTnTiTm9q25nSMjZFGoltUUrKgr1KEI8lIUszE=")}
|
|
{$tplutils::includeScript("{cdnjs}/dayjs/1.10.4/plugin/relativeTime.min.js", "sha256-Cto+wNkJbN1edfnamCQc/qvvQ5OUDOBzibYzJrJ8ElQ=")}
|
|
|
|
{var $dayjslang = __get("DAYJS_LANG", [], true)}
|
|
{if $dayjslang !== null && $dayjslang !== "en"}
|
|
{$tplutils::includeScript("{cdnjs}/dayjs/1.10.4/locale/$dayjslang.js")}
|
|
<script>
|
|
dayjs.locale({$dayjslang} || navigator.languages || navigator.language)
|
|
</script>
|
|
{/if}
|
|
|
|
<!-- DataTables 1.10.21 + Support for Bootstrap 4 -->
|
|
{$tplutils::includeScript("{cdnjs}/datatables/1.10.21/js/jquery.dataTables.min.js", "sha256-/7zo27Ll/hVKhCsE+y8m2SS5bhFPEQFheTCL87HuumA=")}
|
|
{$tplutils::includeScript("{cdnjs}/datatables/1.10.21/js/dataTables.bootstrap4.min.js", "sha256-1bbr2U4VkmmTxaxcHlFp9rgBhLrwQTP2rl8/jlivGb0=")}
|
|
|
|
<!-- DataTables responsive plugin -->
|
|
{$tplutils::includeScript("{cdnjs}/datatables-responsive/2.2.7/dataTables.responsive.min.js", "sha256-lNhDn9rWCvb7iB+apRL+bi4SsUrHKLopvY8lE5nscyI=")}
|
|
|
|
<!-- script.js -->
|
|
{$tplutils::includeScript("js/script.js", true)}
|
|
{$tplutils::includeScript("js/status.js", true)}
|
|
{$tplutils::includeScript("js/login.js", true)}
|
|
|
|
{block footerbottom}{/block}
|
|
|
|
<!--
|
|
TS-website {\__TSWEBSITE_VERSION} ({\__TSWEBSITE_COMMIT}) by Wruczek
|
|
Generated in {@$tplutils::getRenderTime()} s
|
|
MySQL queries: {$sqlCount}
|
|
-->
|
|
|
|
</body>
|
|
</html>
|