247 lines
14 KiB
Twig
247 lines
14 KiB
Twig
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>{{ title|default(config('general.name')) }}</title>
|
|
<meta name="description" content="{{ description|default(config('general.description')) }}">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
|
{% if redirect is defined %}
|
|
<meta http-equiv="refresh" content="{{ redirectTimeout is defined ? redirectTimeout : '3' }}; URL={{ redirect }}">
|
|
{% endif %}
|
|
{{ block('meta') }}
|
|
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet" type="text/css">
|
|
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
|
|
<link href="/css/yuuno.css" rel="stylesheet" type="text/css">
|
|
{{ block('css') }}
|
|
<script src="/js/sakura.js" type="text/javascript"></script>
|
|
<script src="/js/yuuno.js" type="text/javascript"></script>
|
|
{{ block('js') }}
|
|
</head>
|
|
<body>
|
|
<div
|
|
id="container"
|
|
class="container"
|
|
{% if profile is defined ? profile.background : (user.perms.changeBackground and (user.backgroundSitewide or showBG|default(false)) and user.background) %}
|
|
style="background-image: url('{{ route('user.background', (profile is defined ? profile : user).id) }}'); "
|
|
{% endif %}
|
|
>
|
|
<span id="top"></span>
|
|
<div id="busy-window" class="busy hidden">
|
|
<div class="busy__content">
|
|
<h2 id="busy-status" class="busy__text"></h2>
|
|
<div class="fa fa-4x fa-refresh fa-spin" id="busy-icon"></div>
|
|
</div>
|
|
</div>
|
|
<div class="header" id="header">
|
|
<a class="header__logo" href="{{ route('main.index') }}">
|
|
{% if config('general.logo') %}
|
|
<img src="{{ config('general.logo') }}" alt="{{ config('general.name') }}">
|
|
{% else %}
|
|
{{ config('general.name') }}
|
|
{% endif %}
|
|
</a>
|
|
<div class="header__menu">
|
|
<div class="header__menu--left" id="navMenuSite">
|
|
<a class="header__menu-item fa fa-home" href="{{ route('main.index') }}" title="Home"></a>
|
|
<a class="header__menu-item fa fa-newspaper-o" href="{{ route('news.category') }}" title="News"></a>
|
|
<a class="header__menu-item fa fa-commenting" href="#" title="Chat"></a>
|
|
<a class="header__menu-item fa fa-list" href="{{ route('forums.index') }}" title="Forums"></a>
|
|
<a class="header__menu-item fa fa-search" href="{{ route('main.search') }}" title="Search"></a>
|
|
{% if user.isActive %}
|
|
<a class="header__menu-item fa fa-users" href="{{ route('members.index') }}" title="Members"></a>
|
|
<a class="header__menu-item fa fa-heart" href="{{ route('premium.index') }}" title="Support us"></a>
|
|
{% endif %}
|
|
</div>
|
|
<div class="header__menu--right" id="navMenuUser">
|
|
{% if user.isActive %}
|
|
<a class="header__menu-item header__menu-item--avatar avatar" href="{{ route('user.profile', user.id) }}" title="Logged in as {{ user.username }}" style="background-image: url('{{ route('user.avatar', user.id) }}'); width: auto; color: {{ user.colour }}; border-color: {{ user.colour }}; font-weight: 700;"></a>
|
|
<a class="header__menu-item fa fa-envelope" href="#" title="Messages"></a>
|
|
<a class="header__menu-item fa fa-bell" href="javascript:;" title="Notifications"></a>
|
|
{% if user.perms.isMod or user.perms.isAdmin %}
|
|
<a class="header__menu-item fa fa-gavel" href="{{ route('manage.index') }}" title="Manage"></a>
|
|
{% endif %}
|
|
<a class="header__menu-item fa fa-cogs" href="{{ route('settings.index') }}" title="Settings"></a>
|
|
<a class="header__menu-item fa fa-sign-out" href="javascript:yuunoLogout();" title="Logout"></a>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% if user.id == 0 %}
|
|
<div class="header-login-container">
|
|
<form class="header-login" method="post" action="javascript:void(0);" onsubmit="yuunoAttemptLogin(this)">
|
|
<div class="header-login__sub header-login__sub--form">
|
|
<input type="text" name="username" class="input__text header-login__text" placeholder="Username">
|
|
<input type="password" name="password" class="input__text header-login__text" placeholder="Password">
|
|
<input type="hidden" name="session" value="{{ session_id() }}">
|
|
<button class="input__button header-login__button">
|
|
<i class="fa fa-sign-in"></i> Login
|
|
</button>
|
|
</div>
|
|
<div class="header-login__sub header-login__sub--buttons">
|
|
<a class="input__button header-login__button header-login__button--small" href="{{ route('auth.register') }}">
|
|
<i class="fa fa-magic"></i> I don't have an account yet!
|
|
</a>
|
|
<a class="input__button header-login__button header-login__button--small" href="{{ route('auth.resetpassword') }}">
|
|
<i class="fa fa-exclamation-triangle"></i> I don't have access to my account!
|
|
</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<script>
|
|
function yuunoAttemptLogin(form) {
|
|
var ajax = new Sakura.AJAX;
|
|
|
|
ajax.SetUrl("{{ route('auth.login') }}");
|
|
ajax.SetFormData(new FormData(form));
|
|
|
|
ajax.AddCallback(200, function () {
|
|
var result = ajax.JSON();
|
|
|
|
if (result.error) {
|
|
var diag = new Sakura.Dialogue;
|
|
diag.Text = result.error;
|
|
diag.AddCallback(Sakura.DialogueButton.Ok, function () {
|
|
this.Close();
|
|
});
|
|
diag.Display();
|
|
} else if (result.go) {
|
|
window.location.assign(result.go);
|
|
} else {
|
|
window.location.reload();
|
|
}
|
|
});
|
|
|
|
ajax.Start(Sakura.HTTPMethod.POST);
|
|
}
|
|
</script>
|
|
{% else %}
|
|
<script>
|
|
function yuunoLogout() {
|
|
var confirm = new Sakura.Dialogue;
|
|
confirm.SetType(Sakura.DialogueType.Confirm);
|
|
confirm.Text = "Are you sure?";
|
|
|
|
confirm.AddCallback(Sakura.DialogueButton.No, function () {
|
|
this.Close();
|
|
});
|
|
|
|
confirm.AddCallback(Sakura.DialogueButton.Yes, function () {
|
|
var ajax = new Sakura.AJAX;
|
|
|
|
ajax.SetUrl("{{ route('auth.logout') }}");
|
|
ajax.SetFormData({
|
|
"sessions": Sakura.Config.SessionId
|
|
});
|
|
|
|
ajax.AddCallback(200, function () {
|
|
var result = ajax.JSON();
|
|
confirm.Close();
|
|
|
|
if (result.error) {
|
|
var error = new Sakura.Dialogue;
|
|
error.Text = result.error;
|
|
error.SetType(Sakura.DialogueType.Info);
|
|
|
|
error.AddCallback(Sakura.DialogueButton.Ok, function () {
|
|
this.Close();
|
|
});
|
|
|
|
error.Display();
|
|
} else {
|
|
window.location.reload();
|
|
}
|
|
});
|
|
|
|
ajax.Start(Sakura.HTTPMethod.POST);
|
|
});
|
|
|
|
confirm.Display();
|
|
}
|
|
</script>
|
|
{% endif %}
|
|
|
|
<div id="contentwrapper" class="container__content">
|
|
<div id="notifications" class="alerts"></div>
|
|
<div id="dialogues" class="dialogues"></div>
|
|
|
|
{% if user.restricted %}
|
|
<div class="announce-box announce-box--restricted">
|
|
<h1>Your account is currently in <span style="font-weight: 700 !important;">restricted mode</span>!</h1>
|
|
<div>A staff member has set your account to restricted mode most likely due to violation of the rules. While restricted you won't be able to use most public features of the site. If you think this is a mistake please <a href="{{ route('info.contact') }}" style="color: inherit;">get in touch with one of our staff members</a>.</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<noscript>
|
|
<div class="announce-box">
|
|
<h1>You have JavaScript disabled!</h1>
|
|
<div>A lot of things are not going to work without it so I recommend you turn it on or use a capable browser.</div>
|
|
</div>
|
|
</noscript>
|
|
|
|
{% if config('general.cover') %}
|
|
<div class="announce-box announce-box--header" style="background-image: url('{{ config('general.cover') }}');"></div>
|
|
{% endif %}
|
|
|
|
{% block content %}
|
|
<h1 style="text-align: center; margin: 2em auto;">There is nothing here!</h1>
|
|
{% endblock %}
|
|
</div>
|
|
<div class="footer">
|
|
<div class="footer__sections">
|
|
<div class="footer__copyright">Powered by <a class="footer__link" href="https://github.com/flashwave/sakura/">Sakura</a> © 2013-2016 <a class="footer__link" href="https://flash.moe/">flash.moe</a></div>
|
|
<ul class="footer__section">
|
|
<li class="footer__item footer__item--head">General</li>
|
|
<li class="footer__item"><a class="footer__link" href="{{ route('main.index') }}">Home</a></li>
|
|
<li class="footer__item"><a class="footer__link" href="{{ route('news.category') }}">News</a></li>
|
|
<li class="footer__item"><a class="footer__link" href="{{ route('main.search') }}">Search</a></li>
|
|
<li class="footer__item"><a class="footer__link" href="{{ route('info.contact') }}">Contact</a></li>
|
|
<li class="footer__item"><a class="footer__link" href="https://sakura.flash.moe">Changelog</a></li>
|
|
<li class="footer__item"><a class="footer__link" href="{{ route('premium.index') }}">Support us</a></li>
|
|
</ul>
|
|
<ul class="footer__section">
|
|
<li class="footer__item footer__item--head">Community</li>
|
|
<li class="footer__item"><a class="footer__link" href="{{ route('forums.index') }}">Forums</a></li>
|
|
<li class="footer__item"><a class="footer__link" href="https://twitter.com/_flashii">Twitter</a></li>
|
|
<li class="footer__item"><a class="footer__link" href="https://youtube.com/user/flashiinet">YouTube</a></li>
|
|
<li class="footer__item"><a class="footer__link" href="https://steamcommunity.com/groups/flashiinet">Steam</a></li>
|
|
<li class="footer__item"><a class="footer__link" href="https://github.com/aitemu">GitHub</a></li>
|
|
</ul>
|
|
<ul class="footer__section">
|
|
<li class="footer__item footer__item--head">Information</li>
|
|
<li class="footer__item"><a class="footer__link" href="{{ route('main.faq') }}">FAQ</a></li>
|
|
<li class="footer__item"><a class="footer__link" href="{{ route('info.rules') }}">Rules</a></li>
|
|
<li class="footer__item"><a class="footer__link" href="{{ route('status.index') }}">Server Status</a></li>
|
|
<li class="footer__item"><a class="footer__link" href="{{ route('info.terms') }}">Terms of Service</a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
Sakura.Config.Set({
|
|
LoggedIn: {{ user.isActive ? 'true' : 'false' }},
|
|
UserId: {{ user.id }},
|
|
SessionId: "{{ session_id() }}",
|
|
});
|
|
|
|
Yuuno.Main.Startup();
|
|
|
|
{% if config('dev.show_changelog') and stats is defined %}
|
|
Sakura.Changelog.Build(Sakura.DOM.ID('indexPanel'));
|
|
{% endif %}
|
|
|
|
{% if config('dev.show_errors') %}
|
|
window.addEventListener("error", function () {
|
|
Yuuno.Notifications.Display({
|
|
id: -(Date.now()),
|
|
title: "Something happened!",
|
|
text: "Check the console for more info.",
|
|
image: "FONT:fa-bomb",
|
|
link: null,
|
|
});
|
|
});
|
|
{% endif %}
|
|
</script>
|
|
</body>
|
|
</html>
|