2015-04-06 21:23:54 +00:00
<!DOCTYPE html>
<html>
<head>
<!-- META -->
2016-03-31 20:03:25 +00:00
<meta charset=" {{ config ( 'charset' ) }} " />
<title> {% block title %} {{ config ( 'sitename' ) }} {% endblock %} </title>
<meta name="description" content=" {{ config ( 'sitedesc' ) }} " />
<meta name="keywords" content=" {{ config ( 'sitetags' ) | json_decode | join ( ', ' ) }} " />
2015-04-06 21:23:54 +00:00
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
2015-10-11 23:37:54 +00:00
<meta name="msapplication-TileColor" content="#9475b2" />
2015-08-12 17:24:10 +00:00
<meta name="msapplication-TileImage" content="/content/images/icons/ms-icon-144x144.png" />
2015-08-23 22:08:36 +00:00
<meta name="theme-color" content="#9475B2" />
2016-03-27 21:18:57 +00:00
{# want to start moving away from page.etc but older files are a thing #}
{% if message is not defined %} {% set message = page .message %} {% endif %}
{% if redirect is not defined %} {% set redirect = page .redirect %} {% endif %}
{% if redirectTimeout is not defined %} {% set redirectTimeout = page .redirectTimeout %} {% endif %}
{% if redirect %}
<meta http-equiv="refresh" content=" {{ redirectTimeout ? redirectTimeout : '3' }} ; URL= {{ redirect }} " />
2015-09-05 16:11:04 +00:00
{% endif %}
2015-08-12 17:24:10 +00:00
<link rel="apple-touch-icon" sizes="57x57" href="/content/images/icons/apple-icon-57x57.png" />
<link rel="apple-touch-icon" sizes="60x60" href="/content/images/icons/apple-icon-60x60.png" />
<link rel="apple-touch-icon" sizes="72x72" href="/content/images/icons/apple-icon-72x72.png" />
<link rel="apple-touch-icon" sizes="76x76" href="/content/images/icons/apple-icon-76x76.png" />
<link rel="apple-touch-icon" sizes="114x114" href="/content/images/icons/apple-icon-114x114.png" />
<link rel="apple-touch-icon" sizes="120x120" href="/content/images/icons/apple-icon-120x120.png" />
<link rel="apple-touch-icon" sizes="144x144" href="/content/images/icons/apple-icon-144x144.png" />
<link rel="apple-touch-icon" sizes="152x152" href="/content/images/icons/apple-icon-152x152.png" />
<link rel="apple-touch-icon" sizes="180x180" href="/content/images/icons/apple-icon-180x180.png" />
<link rel="icon" type="image/png" sizes="192x192" href="/content/images/icons/android-icon-192x192.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/content/images/icons/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="96x96" href="/content/images/icons/favicon-96x96.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/content/images/icons/favicon-16x16.png" />
<link rel="manifest" href="/manifest.json" />
2015-09-05 16:11:04 +00:00
{{ block ( 'meta' ) }}
2015-04-06 21:23:54 +00:00
<!-- CSS -->
2016-04-01 15:31:05 +00:00
<link rel="stylesheet" type="text/css" href=" {{ resource ( 'css/yuuno.css' ) }} " />
2015-09-05 16:11:04 +00:00
{{ block ( 'css' ) }}
2015-04-06 21:23:54 +00:00
<!-- JS -->
2016-03-31 20:03:25 +00:00
<script type="text/javascript" src=" {{ config ( 'content_path' ) }} /scripts/sakura.js"></script>
2016-04-01 15:31:05 +00:00
<script type="text/javascript" src=" {{ resource ( 'js/yuuno.js' ) }} "></script>
2015-04-06 21:23:54 +00:00
<script type="text/javascript">
2015-05-09 00:56:55 +00:00
// Create an object so we can access certain settings from remote JavaScript files
var sakuraVars = {
"cookie": {
2016-03-31 20:03:25 +00:00
"prefix": " {{ config ( 'cookie_prefix' ) }} ",
"path": " {{ config ( 'cookie_path' ) }} "
2015-05-09 00:56:55 +00:00
},
2016-03-31 20:03:25 +00:00
"siteName": " {{ config ( 'sitename' ) }} ",
"content": " {{ config ( 'content_path' ) }} ",
"recaptchaEnabled": " {{ config ( 'recaptcha' ) }} ",
2015-05-09 00:56:55 +00:00
2016-03-31 20:03:25 +00:00
"minUserLen": {{ config ( 'username_min_length' ) }} ,
"maxUserLen": {{ config ( 'username_max_length' ) }} ,
"minPwdEntropy": {{ config ( 'min_entropy' ) }} ,
2016-03-13 20:35:51 +00:00
"checkLogin": {{ session .checkLogin ? 'true' : 'false' }}
2015-05-09 00:56:55 +00:00
};
2015-12-06 01:52:35 +00:00
// Set cookie prefix and path
2016-03-31 20:03:25 +00:00
Sakura.cookiePrefix = " {{ config ( 'cookie_prefix' ) }} ";
Sakura.cookiePath = " {{ config ( 'cookie_path' ) }} ";
2015-12-06 01:52:35 +00:00
2015-09-23 20:45:42 +00:00
// Error reporter
window.onerror = function(msg, url, line, col, error) {
2015-09-26 16:12:42 +00:00
notifyUI( {
"title": "An error has occurred!",
"text": "There was a problem while executing the JavaScript code for this page: " + msg + ", URL: " + url + ", Line: " + line + ", Column: " + col + ". Please report this to a developer.",
2016-03-27 21:18:57 +00:00
"image": "FONT:fa-warning"
2015-09-26 16:12:42 +00:00
});
2015-09-23 20:45:42 +00:00
}
2015-04-06 21:23:54 +00:00
</script>
2015-09-05 16:11:04 +00:00
{{ block ( 'js' ) }}
2015-04-06 21:23:54 +00:00
</head>
2015-05-04 20:08:53 +00:00
<body>
2015-04-06 21:23:54 +00:00
<div id="container">
<span id="top"></span>
<div class="header" id="header">
2016-03-31 20:03:25 +00:00
<a class="logo" href=" {{ route ( 'main.index' ) }} "> {% if config ( 'sitelogo' ) %} <img src=" {{ config ( 'sitelogo' ) }} " alt=" {{ config ( 'sitename' ) }} " /> {% else %} {{ config ( 'sitename' ) }} {% endif %} </a>
2015-09-28 21:01:41 +00:00
<div class="menu fa">
<div class="menu-nav" id="navMenuSite">
2015-04-06 21:23:54 +00:00
<!-- Navigation menu, displayed on left side of the bar. -->
2016-02-27 16:46:16 +00:00
<a class="menu-item fa-home" href=" {{ route ( 'main.index' ) }} " title="Home"></a>
2016-03-28 14:47:43 +00:00
<a class="menu-item fa-newspaper-o" href=" {{ route ( 'news.category' ) }} " title="News"></a>
2016-02-27 16:46:16 +00:00
<a class="menu-item fa-commenting" href=" {{ route ( 'main.infopage' , 'chat' ) }} " title="Chat"></a>
<a class="menu-item fa-list" href=" {{ route ( 'forums.index' ) }} " title="Forums"></a>
<a class="menu-item fa-search" href=" {{ route ( 'main.search' ) }} " title="Search"></a>
2015-08-19 19:44:01 +00:00
{% if session .checkLogin %}
2016-02-27 16:46:16 +00:00
<a class="menu-item fa-users" href=" {{ route ( 'members.index' ) }} " title="Members"></a>
<a class="menu-item fa-heart" href=" {{ route ( 'premium.index' ) }} " title="Support us"></a>
2015-04-18 18:26:52 +00:00
{% endif %}
2015-04-06 21:23:54 +00:00
</div>
2015-09-28 21:01:41 +00:00
<div class="menu-ucp" id="navMenuUser">
2015-04-06 21:23:54 +00:00
<!-- User menu, displayed on right side of the bar. -->
2015-08-19 19:44:01 +00:00
{% if session .checkLogin %}
2016-02-27 16:46:16 +00:00
<a class="menu-item avatar" href=" {{ route ( 'user.profile' , user .id ) }} " title="Logged in as {{ user .username }} " style="background-image: url(' {{ route ( 'file.avatar' , user .id ) }} '); width: auto; color: {{ user .colour }} ; border-color: {{ user .colour }} ; font-weight: 700;"></a>
2016-03-30 21:30:15 +00:00
{#<a class="menu-item fa-envelope" href="#" title="Messages"></a>#}
2015-12-31 14:51:01 +00:00
{% if user .permission ( constant ( 'Sakura\\Perms\\Manage::USE_MANAGE' ) , constant ( 'Sakura\\Perms::MANAGE' ) ) %}
2016-03-30 21:30:15 +00:00
<a class="menu-item fa-gavel" href="#" title="Manage"></a>
2015-12-31 14:51:01 +00:00
{% endif %}
2016-03-30 21:30:15 +00:00
<a class="menu-item fa-cogs" href=" {{ route ( 'settings.index' ) }} " title="Settings"></a>
2016-03-27 22:15:51 +00:00
<a class="menu-item fa-sign-out" href=" {{ route ( 'auth.logout' ) }} ?s= {{ session_id ( ) }} " title="Logout" id="headerLogoutLink"></a>
2015-04-17 22:51:53 +00:00
{% else %}
2016-03-31 20:07:54 +00:00
{% if config ( 'lock_authentication' ) %}
<a class="menu-item fa-lock" style="cursor: default;" title="Authentication is locked"></a>
2015-04-24 19:31:09 +00:00
{% else %}
2016-03-13 20:35:51 +00:00
<a class="menu-item fa-magic" href=" {{ route ( 'auth.register' ) }} " title="Register"></a>
2016-02-27 16:46:16 +00:00
<a class="menu-item fa-sign-in" href=" {{ route ( 'auth.login' ) }} " title="Login"></a>
2015-04-24 19:31:09 +00:00
{% endif %}
2015-04-17 22:51:53 +00:00
{% endif %}
2015-04-06 21:23:54 +00:00
</div>
</div>
</div>
<div id="contentwrapper">
2015-05-09 00:56:55 +00:00
<div id="notifications"></div>
2016-03-13 20:35:51 +00:00
{% if profile is defined ? profile .background : ( user .permission ( constant ( 'Sakura\\Perms\\Site::CHANGE_BACKGROUND' ) ) and user .optionFields .profileBackgroundSiteWide and user .background ) %}
<div id="userBackground" style="background-image: url(' {{ route ( 'file.background' , ( profile is defined ? profile : user ) .id ) }} ');"></div>
2015-08-19 19:44:01 +00:00
{% endif %}
2016-02-27 16:46:16 +00:00
{% if not session .checkLogin and sakura .currentPage != route ( 'auth.login' ) %}
2016-02-28 17:45:25 +00:00
<div class="headerLoginContainer">
2016-02-27 16:46:16 +00:00
<form method="post" action=" {{ route ( 'auth.login' ) }} " id="headerLoginForm">
2015-08-20 23:17:27 +00:00
<input type="hidden" name="redirect" value=" {{ sakura .currentPage }} " />
2016-03-27 22:15:51 +00:00
<input type="hidden" name="session" value=" {{ session_id ( ) }} " />
<input type="hidden" name="time" value=" {{ date ( ) .timestamp }} " />
2015-04-20 19:39:49 +00:00
<input type="hidden" name="mode" value="login" />
2015-04-24 17:48:56 +00:00
<div>
<label for="headerLoginUserName">Username:</label>
<input type="text" id="headerLoginUserName" name="username" class="inputStyling" placeholder="Username" />
</div>
<div>
<label for="headerLoginPassword">Password:</label>
<input type="password" id="headerLoginPassword" name="password" class="inputStyling" placeholder="Password" />
</div>
<div>
<input type="checkbox" name="remember" id="headerLoginRemember" />
<label for="headerLoginRemember">Remember me</label>
</div>
<div>
2015-06-19 16:12:44 +00:00
<input type="submit" id="headerLoginButton" name="submit" class="inputStyling small" value="Login" />
2015-04-24 17:48:56 +00:00
</div>
2015-04-20 19:39:49 +00:00
</form>
2016-02-28 17:45:25 +00:00
<form method="get" action=" {{ route ( 'auth.register' ) }} ">
<button class="inputStyling small">Register</button>
</form>
</div>
2015-04-06 21:23:54 +00:00
{% endif %}
2015-12-29 21:52:19 +00:00
{% if user .permission ( constant ( 'Sakura\\Perms\\Site::RESTRICTED' ) ) %}
2015-10-18 19:06:30 +00:00
<div class="headerNotify" style="background: repeating-linear-gradient(-45deg, #B33, #B33 10px, #B00 10px, #B00 20px); color: #FFF; border: 1px solid #C00; box-shadow: 0 0 3px #C00;">
<h1>Your account is currently in <span style="font-weight: 700 !important;">restricted mode</span>!</h1>
2016-03-13 20:35:51 +00:00
<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 ( 'main.infopage' , 'contact' ) }} " style="color: inherit;">get in touch with one of our staff members</a>.</div>
2015-08-21 22:07:45 +00:00
</div>
{% endif %}
2016-02-05 22:03:08 +00:00
2015-04-25 20:08:44 +00:00
<noscript>
2015-09-05 16:11:04 +00:00
<div class="headerNotify">
2015-04-25 20:08:44 +00:00
<h1>You have JavaScript disabled!</h1>
2016-03-25 17:10:42 +00:00
<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>
2015-04-25 20:08:44 +00:00
</div>
</noscript>
2015-09-05 16:11:04 +00:00
2016-03-31 20:03:25 +00:00
{% if config ( 'header_announcement_image' ) %}
<div class="headerAnnouncement" style="background-image: url(' {{ config ( 'header_announcement_image' ) }} ');">
{% if config ( 'header_announcement_link' ) %}
<a href=" {{ config ( 'header_announcement_link' ) }} " class="clean"></a>
2015-12-11 20:49:40 +00:00
{% endif %}
</div>
{% endif %}
2015-09-05 16:11:04 +00:00
{% block content %}
2016-03-27 22:15:51 +00:00
<h1 class="stylised" style="text-align: center; margin: 2em auto;">There is nothing here!</h1>
2015-09-05 16:11:04 +00:00
{% endblock %}
</div>
<div class="footer">
<div class="ftsections">
2015-12-31 14:51:01 +00:00
<div class="copycentre">Powered by <a href="https://github.com/flashwave/sakura/" target="_blank">Sakura</a> {% if sakura .dev .showChangelog %} <a href="https://sakura.flash.moe/#r {{ sakura .versionInfo .version }} " target="_blank">r {{ sakura .versionInfo .version }} </a> {% endif %} © 2013-2016 <a href="http://flash.moe/" target="_blank">Flashwave</a></div>
2015-09-05 16:11:04 +00:00
<ul class="ftsection">
<li class="fthead">General</li>
2016-03-28 14:47:43 +00:00
<li><a href=" {{ route ( 'main.index' ) }} ">Home</a></li>
<li><a href=" {{ route ( 'news.category' ) }} ">News</a></li>
<li><a href=" {{ route ( 'main.search' ) }} ">Search</a></li>
<li><a href=" {{ route ( 'main.infopage' , 'contact' ) }} ">Contact</a></li>
<li><a href="https://sakura.flash.moe" target="_blank">Changelog</a></li>
<li><a href=" {{ route ( 'premium.index' ) }} ">Support us</a></li>
2015-09-05 16:11:04 +00:00
</ul>
<ul class="ftsection">
<li class="fthead">Community</li>
2016-03-28 14:47:43 +00:00
<li><a href=" {{ route ( 'forums.index' ) }} ">Forums</a></li>
<li><a href="https://twitter.com/_flashii" target="_blank">Twitter</a></li>
<li><a href="https://youtube.com/user/flashiinet" target="_blank">YouTube</a></li>
<li><a href="https://steamcommunity.com/groups/flashiinet" target="_blank">Steam</a></li>
<li><a href="https://github.com/flashii" target="_blank">GitHub</a></li>
2015-09-05 16:11:04 +00:00
</ul>
<ul class="ftsection">
<li class="fthead">Information</li>
2016-03-28 14:47:43 +00:00
<li><a href=" {{ route ( 'main.faq' ) }} ">FAQ</a></li>
<li><a href=" {{ route ( 'main.infopage' , 'rules' ) }} ">Rules</a></li>
<li><a href="//fiistat.us" target="_blank">Server Status</a></li>
<li><a href=" {{ route ( 'main.infopage' , 'terms' ) }} ">Terms of Service</a></li>
2015-09-05 16:11:04 +00:00
</ul>
</div>
</div>
</div>
2016-02-05 22:03:08 +00:00
<script type="text/javascript">
// Parse time elements
var timeElems = document.getElementsByTagName('time');
2016-03-10 18:54:36 +00:00
2016-02-05 22:03:08 +00:00
// Iterate over them
for (var timeElem in timeElems) {
2016-03-31 20:03:25 +00:00
console.log(timeElems[timeElem].dateTime);
2016-02-05 22:03:08 +00:00
// Attempt to parse it
2016-03-31 20:03:25 +00:00
var parsed = Date.parse(timeElems[timeElem].dateTime);
2016-02-05 22:03:08 +00:00
// If it can be parsed do DOM edits
if (!isNaN(parsed)) {
timeElems[timeElem].title = timeElems[timeElem].innerText;
timeElems[timeElem].innerText = Sakura.timeElapsed(Math.floor(parsed / 1000));
}
}
2016-03-26 16:36:58 +00:00
2016-03-27 22:15:51 +00:00
notifyRequest(' {{ session_id ( ) }} ');
2016-03-26 16:36:58 +00:00
setInterval(function() {
2016-03-27 22:15:51 +00:00
notifyRequest(' {{ session_id ( ) }} ');
2016-03-26 16:36:58 +00:00
}, 60000);
2016-03-30 21:30:15 +00:00
var friendClient = new AJAX();
friendClient.contentType("application/x-www-form-urlencoded");
function addFriend(id) {
var url = " {{ route ( 'friends.add' , 1 ) }} ".replace(1, id);
friendMode(url, id);
}
function removeFriend(id) {
var url = " {{ route ( 'friends.remove' , 1 ) }} ".replace(1, id);
friendMode(url, id);
}
function friendMode(url, id) {
var level = document.querySelectorAll('.friend-' + id + '-level'),
toggle = document.querySelectorAll('.friend-' + id + '-toggle');
friendClient.setUrl(url);
friendClient.setSend( { "session":" {{ session_id ( ) }} "});
friendClient.addCallback(200, function () {
var resp = JSON.parse(friendClient.response());
friendClient.setRawSend("");
if (resp.error) {
ajaxBusyView(true, resp.error, 'fail');
setTimeout(function () {
ajaxBusyView(false);
}, 1500);
} else {
ajaxBusyView(true, resp.message, 'ok');
location.reload();
}
});
friendClient.start(HTTPMethods.POST);
}
2016-02-05 22:03:08 +00:00
</script>
2016-03-10 18:54:36 +00:00
{% if sakura .dev .showChangelog and stats %}
<script type="text/javascript" src="https://sakura.flash.moe/?get=all&limit=5&variable=true"></script>
2015-10-14 14:14:30 +00:00
<script type="text/javascript">
2015-10-16 13:37:29 +00:00
// Column colours for actions
var changelogColours = [
'inherit', // Unknown
2015-12-11 20:49:40 +00:00
'#2A2', // Add
'#2AA', // Update
'#2AA', // Fix
'#A22', // Remove
'#62C', // Export
'#C44' // Revert
2015-10-16 13:37:29 +00:00
];
2016-03-10 18:54:36 +00:00
window.addEventListener("load", function () {
2015-10-14 14:14:30 +00:00
// Check if the changelog variable is an object
if(typeof changelog === 'object') {
// Grab the index panel
2016-03-10 18:54:36 +00:00
var _panel = document.getElementById('indexPanel');
2015-10-14 14:14:30 +00:00
// Create the head container
2016-03-10 18:54:36 +00:00
var _cltitle = document.createElement('div');
_cltitle.className = 'head';
_cltitle.style.marginBottom = '1px';
2015-10-14 14:14:30 +00:00
// Create a link
2016-03-10 18:54:36 +00:00
var _cllink = document.createElement('a');
_cllink.className = 'underline';
_cllink.target = '_blank';
_cllink.href = 'https://sakura.flash.moe/#r {{ sakura .versionInfo .version }} ';
2015-10-14 14:14:30 +00:00
// Append everything
2016-03-10 18:54:36 +00:00
_cllink.appendChild(document.createTextNode('Changelog'));
_cltitle.appendChild(_cllink);
_panel.appendChild(_cltitle);
2015-10-14 14:14:30 +00:00
2015-10-16 13:37:29 +00:00
// Create changelog table
2016-03-10 18:54:36 +00:00
var _cltable = document.createElement('table');
_cltable.className = 'panelTable';
_cltable.style.borderSpacing = '0 1px';
2015-10-16 13:37:29 +00:00
2015-10-14 14:14:30 +00:00
// Create and append all changelog entries
2016-03-10 18:54:36 +00:00
for (var _s in changelog) {
// Create header
var _hr = document.createElement('tr');
var _hri = document.createElement('td');
2015-10-16 13:37:29 +00:00
// Set data
2016-03-10 18:54:36 +00:00
_hri.appendChild(document.createTextNode(_s));
_hri.style.background = '#9475b2';
_hri.style.color = '#306';
_hri.style.fontWeight = '700';
_hri.style.fontSize = '1.2em';
_hri.setAttribute('colspan', '2');
2015-10-16 13:37:29 +00:00
// Append
2016-03-10 18:54:36 +00:00
_hr.appendChild(_hri);
_cltable.appendChild(_hr);
for (var _e in changelog[_s]) {
// Reassign _e
_e = changelog[_s][_e];
// Create elements
var _clr = document.createElement('tr');
var _clca = document.createElement('td');
var _clcm = document.createElement('td');
// Set data
_clca.appendChild(document.createTextNode(_e['change_action']['action_name']));
_clca.style.background = changelogColours[_e['change_action']['action_id']];
_clca.style.borderBottom = '1px solid ' + changelogColours[_e['change_action']['action_id']];
_clcm.style.borderBottom = '1px solid ' + changelogColours[_e['change_action']['action_id']];
_clcm.appendChild(document.createTextNode(_e['change_message']));
// Append
_clr.appendChild(_clca);
_clr.appendChild(_clcm);
_cltable.appendChild(_clr);
}
2015-10-14 14:14:30 +00:00
}
2015-10-16 13:37:29 +00:00
// Append it to indexPanel
2016-03-10 18:54:36 +00:00
indexPanel.appendChild(_cltable);
2015-10-14 14:14:30 +00:00
}
});
</script>
{% endif %}
2015-09-05 16:11:04 +00:00
</body>
</html>