misuzu/templates/master.twig

155 lines
5.1 KiB
Twig
Raw Permalink Normal View History

2022-09-13 13:14:49 +00:00
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
2022-09-13 13:14:49 +00:00
{% include '_layout/meta.twig' %}
<link href="/vendor/fontawesome/css/all.min.css" type="text/css" rel="stylesheet">
<link href="/vendor/highlightjs/styles/tomorrow-night.css" type="text/css" rel="stylesheet">
<link href="{{ assets.mszcss|default() }}" type="text/css" rel="stylesheet">
2022-09-13 13:14:49 +00:00
{% if site_background is defined %}
<style>
:root {
--background-width: {{ site_background.width }}px;
--background-height: {{ site_background.height }}px;
--background-image: url('{{ site_background.url|raw }}');
}
</style>
{% endif %}
{% if site_logo is defined %}
<style>
:root {
--site-logo: url('{{ site_logo }}');
}
</style>
{% endif %}
</head>
<body class="main{% if site_background is defined %} {{ site_background.classNames('main--bg-%s')|join(' ') }}{% endif %}"
style="{% if global_accent_colour is defined %}{{ global_accent_colour|html_colour('--accent-colour') }}{% endif %}" id="container">
{% set site_menu = [
{
'title': 'Home',
'url': url('index'),
'menu': [
{
'title': 'Members',
'url': url('user-list'),
'display': current_user is defined,
},
{
'title': 'Changelog',
'url': url('changelog-index'),
},
{
'title': 'Contact',
'url': url('info', {'title': 'contact'}),
},
{
'title': 'Rules',
'url': url('info', {'title': 'rules'}),
},
],
},
{
'title': 'News',
'url': url('news-index'),
},
{
'title': 'Forum',
'url': url('forum-index'),
'menu': [
{
'title': 'Leaderboard',
'url': url('forum-leaderboard'),
'display': current_user.legacyPerms.forum|default(0)|perms_check(constant('MSZ_PERM_FORUM_VIEW_LEADERBOARD')),
},
],
},
{
'title': 'Chat',
'url': globals.site_chat|default(''),
'display': globals.site_chat is defined and globals.site_chat is not empty,
2022-09-13 13:14:49 +00:00
},
] %}
{% set user_menu =
current_user is defined
? [
{
'title': 'Profile',
'url': url('user-profile', {'user': current_user.id}),
'icon': 'fas fa-user fa-fw',
},
{
'title': 'Settings',
'url': url('settings-index'),
'icon': 'fas fa-cog fa-fw',
},
{
'title': 'Search',
'url': url('search-index'),
'icon': 'fas fa-search fa-fw',
},
{
'title': 'Return to Site',
'url': site_link|default(url('index')),
'icon': 'fas fa-door-open fa-fw',
'display': has_manage_access and manage_menu is defined
},
{
'title': 'Manage',
'url': manage_link|default(url('manage-index')),
'icon': 'fas fa-door-closed fa-fw',
'display': has_manage_access and manage_menu is not defined
},
{
'title': 'Log out',
'url': url('auth-logout'),
'icon': 'fas fa-sign-out-alt fa-fw',
},
]
: [
{
'title': 'Register',
'url': url('auth-register'),
'icon': 'fas fa-user-plus fa-fw',
},
{
'title': 'Log in',
'url': url('auth-login'),
'icon': 'fas fa-sign-in-alt fa-fw',
},
]
%}
{% block main_header %}
{% include '_layout/header.twig' %}
{% endblock %}
<div class="main__wrapper">
{% if current_user.hasActiveWarning|default(false) %}
<div class="warning">
<div class="warning__content">
You have been {{ current_user.isSilenced ? 'silenced' : 'banned' }} {% if current_user.isActiveWarningPermanent %}<strong>permanently</strong>{% else %}until <strong>{{ current_user.activeWarningExpiration|date('r') }}</strong>{% endif %}, view the account standing table on <a href="{{ url('user-account-standing', {'user': current_user.id}) }}" class="warning__link">your profile</a> to view why.
</div>
</div>
{% endif %}
{% block content %}
<div class="container" style="margin: 2px 0; padding: 2px 5px;">
This page is empty, populate it.
</div>
{% endblock %}
</div>
{% block main_footer %}
{% include '_layout/footer.twig' %}
{% endblock %}
<script type="text/javascript">
window.addEventListener('DOMContentLoaded', function() { Misuzu(); });
</script>
<script src="/vendor/highlightjs/highlight.pack.js" type="text/javascript"></script>
<script src="{{ assets.mszjs|default() }}" type="text/javascript"></script>
2022-09-13 13:14:49 +00:00
</body>
</html>