This repository has been archived on 2024-06-26. You can view files and clone it, but cannot push or open issues or pull requests.
sakura/templates/yuuno/global/master.twig

330 lines
21 KiB
Twig
Raw Normal View History

2015-04-06 21:23:54 +00:00
<!DOCTYPE html>
<html>
<head>
<!-- META -->
<meta charset="{{ sakura.charset }}" />
<title>{% block title %}{{ sakura.siteName }}{% endblock %}</title>
2015-08-20 23:17:27 +00:00
<meta name="description" content="{{ sakura.siteDesc }}" />
<meta name="keywords" content="{{ sakura.siteTags|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" />
<meta name="msapplication-TileColor" content="#9475b2" />
<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" />
{% if page.redirect %}
<meta http-equiv="refresh" content="{{ page.redirectTimeout ? page.redirectTimeout : '3' }}; URL={{ page.redirect }}" />
{% endif %}
<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" />
{{ block('meta') }}
2015-04-06 21:23:54 +00:00
<!-- CSS -->
2015-04-27 00:41:59 +00:00
<link rel="stylesheet" type="text/css" href="{{ sakura.resources }}/css/yuuno.css" />
{{ block('css') }}
2015-04-06 21:23:54 +00:00
<!-- JS -->
<script type="text/javascript" src="{{ sakura.contentPath }}/scripts/sakura.js"></script>
2015-04-27 00:41:59 +00:00
<script type="text/javascript" src="{{ sakura.resources }}/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": {
2015-08-20 23:17:27 +00:00
"prefix": "{{ sakura.cookie.prefix }}",
"domain": "{{ sakura.cookie.domain }}",
"path": "{{ sakura.cookie.path }}"
2015-05-09 00:56:55 +00:00
},
"siteName": "{{ sakura.siteName }}",
2015-08-20 23:17:27 +00:00
"content": "{{ sakura.contentPath }}",
"resources": "{{ sakura.resources }}",
"recaptchaEnabled": "{{ sakura.recaptchaEnabled }}",
2015-05-09 00:56:55 +00:00
2015-08-20 23:17:27 +00:00
"minUserLen": {{ sakura.minUsernameLength }},
"maxUserLen": {{ sakura.maxUsernameLength }},
"minPwdEntropy": {{ sakura.minPwdEntropy }},
"checkLogin": {% if session.checkLogin %}true{% else %}false{% endif %}
2015-05-09 00:56:55 +00:00
};
// Set cookie prefix and path
Sakura.cookiePrefix = "{{ sakura.cookie.prefix }}";
Sakura.cookiePath = "{{ sakura.cookie.path }}";
// Space for things that need to happen onload
window.addEventListener("load", function() {
2015-08-19 19:44:01 +00:00
{% if session.checkLogin %}
// Convert href to object in logout link
prepareAjaxLink('headerLogoutLink', 'submitPost', ', true, "Logging out..."');
2015-08-20 23:17:27 +00:00
{% elseif not sakura.lockAuth and php.self != '/authenticate.php' %}
// Make the header login form dynamic
2015-09-16 20:34:36 +00:00
prepareAjaxForm('headerLoginForm', 'Logging in...');
2015-08-10 15:52:15 +00:00
{% endif %}
2015-08-19 19:44:01 +00:00
{% if session.checkLogin %}
// Make notification requests (there's a seperate one to make it happen before the first 60 seconds)
2015-08-10 15:52:15 +00:00
notifyRequest('{{ php.sessionid }}');
// Create interval
setInterval(function() {
notifyRequest('{{ php.sessionid }}');
}, 60000);
2015-05-09 00:56:55 +00:00
{% endif %}
{% if php.self == '/profile.php' and session.checkLogin and user.id != profile.id %}
// Make friend button dynamic
prepareAjaxLink('profileFriendToggle', 'submitPost', ', true, "{% if profile.friend == 0 %}Adding{% else %}Removing{% endif %} friend..."');
2015-08-10 15:52:15 +00:00
{% endif %}
2015-08-19 19:44:01 +00:00
{% if php.self == '/viewtopic.php' and session.checkLogin %}
2015-08-10 15:52:15 +00:00
var forumFriendToggles = document.querySelectorAll('.forum-friend-toggle');
for(var i in forumFriendToggles) {
prepareAjaxLink(forumFriendToggles[i], 'submitPost', ', true, "Please wait..."');
}
2015-06-20 16:06:07 +00:00
{% endif %}
2016-01-18 20:21:08 +00:00
{% if php.self == '/authenticate.php' and not (sakura.lockAuth or session.checkLogin) %}
// AJAX Form Submission
var forms = {
{% if not auth.changingPass %}
"loginForm": 'Logging in...',
{% if not sakura.disableRegistration %}
"registerForm": 'Processing registration...',
{% endif %}
2016-01-09 21:57:54 +00:00
{% if sakura.requireActivation %}
"resendForm": 'Attempting to resend activation...',
{% endif %}
"passwordForm": 'Sending password recovery mail...'
{% else %}
"passwordForm": 'Changing password...'
{% endif %}
};
for(var i in forms) {
2015-09-16 20:34:36 +00:00
prepareAjaxForm(i, forms[i], (i == 'registerForm'));
}
{% endif %}
});
// Error reporter
window.onerror = function(msg, url, line, col, error) {
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.",
"img": "FONT:fa-warning"
});
}
2015-04-06 21:23:54 +00:00
</script>
{{ 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">
<a class="logo" href="{{ urls.format('SITE_HOME') }}">{% if sakura.siteLogo %}<img src="{{ sakura.siteLogo }}" alt="{{ sakura.siteName }}" />{% else %}{{ sakura.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. -->
<a class="menu-item fa-home" href="{{ urls.format('SITE_HOME') }}" title="Home"></a>
<a class="menu-item fa-newspaper-o" href="{{ urls.format('SITE_NEWS') }}" title="News"></a>
2015-12-16 20:21:48 +00:00
<a class="menu-item fa-commenting" href="{{ urls.format('INFO_PAGE', ['chat']) }}" title="Chat"></a>
<a class="menu-item fa-list" href="{{ urls.format('FORUM_INDEX') }}" title="Forums"></a>
<a class="menu-item fa-search" href="{{ urls.format('SITE_SEARCH') }}" title="Search"></a>
2015-08-19 19:44:01 +00:00
{% if session.checkLogin %}
<a class="menu-item fa-users" href="{{ urls.format('MEMBERLIST_INDEX') }}" title="Members"></a>
<a class="menu-item fa-heart" href="{{ urls.format('SITE_PREMIUM') }}" 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 %}
<a class="menu-item avatar" href="{{ urls.format('USER_PROFILE', [user.id]) }}" title="Logged in as {{ user.username }}" style="background-image: url('{{ urls.format('IMAGE_AVATAR', [user.id]) }}'); width: auto; color: {{ user.colour }}; border-color: {{ user.colour }}; font-weight: 700;"></a>
2016-01-18 20:21:08 +00:00
{#<a class="menu-item fa-envelope" href="{{ urls.format('SETTING_CAT', ['messages']) }}" title="Messages"></a>#}
{% if user.permission(constant('Sakura\\Perms\\Manage::USE_MANAGE'), constant('Sakura\\Perms::MANAGE')) %}
<a class="menu-item fa-gavel" href="{{ urls.format('MANAGE_INDEX') }}" title="Manage"></a>
{% endif %}
<a class="menu-item fa-cogs" href="{{ urls.format('SETTINGS_INDEX') }}" title="Settings"></a>
<a class="menu-item fa-sign-out" href="{{ urls.format('USER_LOGOUT', [php.time, php.sessionid, sakura.currentPage]) }}" title="Logout" id="headerLogoutLink"></a>
2015-04-17 22:51:53 +00:00
{% else %}
2015-08-20 23:17:27 +00:00
{% if sakura.lockAuth %}
<div class="menu-item fa-lock" style="padding-left: 10px; padding-right: 10px;" title="Authentication is locked"></div>
2015-04-24 19:31:09 +00:00
{% else %}
<a class="menu-item fa-sign-in" href="{{ urls.format('SITE_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-01-17 01:58:31 +00:00
{% if php.self == '/profile.php' ? profile.background : (user.permission(constant('Sakura\\Perms\\Site::CHANGE_BACKGROUND')) and user.optionFields.profileBackgroundSiteWide and user.background) %}
2015-11-07 23:36:57 +00:00
<div id="userBackground" style="background-image: url('{{ urls.format('IMAGE_BACKGROUND', [(php.self == '/profile.php' ? profile : user).id]) }}');"></div>
2015-08-19 19:44:01 +00:00
{% endif %}
{% if not session.checkLogin and php.self != '/authenticate.php' %}
2015-09-16 20:34:36 +00:00
<form method="post" action="{{ urls.format('AUTH_ACTION') }}" id="headerLoginForm">
2015-08-20 23:17:27 +00:00
<input type="hidden" name="redirect" value="{{ sakura.currentPage }}" />
<input type="hidden" name="session" value="{{ php.sessionid }}" />
<input type="hidden" name="time" value="{{ php.time }}" />
<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>
</form>
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')) %}
<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>
<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="{{ urls.format('INFO_PAGE', ['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 %}
2015-04-25 20:08:44 +00:00
<noscript>
<div class="headerNotify">
2015-04-25 20:08:44 +00:00
<h1>You have JavaScript disabled!</h1>
<div>A lot of things on this site require JavaScript to be enabled (e.g. the chat), we try to keep both sides happy but it is highly recommended that you enable it (you'll also have to deal with this message being here if you don't enable it).</div>
2015-04-25 20:08:44 +00:00
</div>
</noscript>
{% if sakura.announcementImage %}
<div class="headerAnnouncement" style="background-image: url('{{ sakura.announcementImage }}');">
{% if sakura.announcementLink %}
<a href="{{ sakura.announcementLink }}" class="clean"></a>
{% endif %}
</div>
{% endif %}
{% block content %}
<h1 class="stylised" style="text-align: center; margin: 2em auto;">{{ php.self }} is now printing!</h1>
{% endblock %}
2016-01-20 23:06:21 +00:00
{% if not user.permission(constant('Sakura\\Perms\\Site::CHANGE_BACKGROUND')) or user.mainRankId == 4 %}
<div class="ad-container ad-footer" id="footerAd">
<div class="ad-box">
2016-01-20 23:06:21 +00:00
<a href="http://jbox.com/r.php??series/touhou&acc=269&___store=jlist&bannerid=8" target="_blank">
<img src="https://jlist.com/js/magestore/affiliateplus/banner.php?id=8&account_id=269&store_id=2" alt="728x90 PG -- Touhou 1" title="728x90 PG -- Touhou 1" width="728" height="90" />
</a>
</div>
2016-01-20 23:06:21 +00:00
</div>
{% endif %}
</div>
<div class="footer">
<div class="ftsections">
<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 %} &copy; 2013-2016 <a href="http://flash.moe/" target="_blank">Flashwave</a></div>
<ul class="ftsection">
<li class="fthead">General</li>
<li><a href="{{ urls.format('SITE_HOME') }}" title="Flashii Frontpage">Home</a></li>
<li><a href="{{ urls.format('SITE_NEWS') }}" title="Flashii News &amp; Updates">News</a></li>
<li><a href="{{ urls.format('SITE_SEARCH') }}" title="Do full-site search requests">Search</a></li>
<li><a href="{{ urls.format('INFO_PAGE', ['contact']) }}" title="Contact our Staff">Contact</a></li>
2015-10-14 14:14:30 +00:00
<li><a href="https://sakura.flash.moe" target="_blank" title="All the changes made to Sakura are listed here">Changelog</a></li>
<li><a href="{{ urls.format('SITE_PREMIUM') }}" title="Get Tenshi and help us pay the bills">Support us</a></li>
</ul>
<ul class="ftsection">
<li class="fthead">Community</li>
<li><a href="{{ urls.format('FORUM_INDEX') }}" title="Read and post on our forums">Forums</a></li>
<li><a href="https://twitter.com/_flashii" target="_blank" title="Follow us on Twitter for news messages that are too short for the news page">Twitter</a></li>
<li><a href="https://youtube.com/user/flashiinet" target="_blank" title="Our YouTube page where stuff barely ever gets uploaded, mainly used to archive community creations">YouTube</a></li>
<li><a href="https://steamcommunity.com/groups/flashiinet" target="_blank" title="Our Steam group, play games with other members on the site">Steam</a></li>
<li><a href="https://github.com/flashii" target="_blank" title="Our GitHub organisation">GitHub</a></li>
</ul>
<ul class="ftsection">
<li class="fthead">Information</li>
<li><a href="{{ urls.format('SITE_FAQ') }}" title="Questions that get Asked Frequently but not actually">FAQ</a></li>
<li><a href="{{ urls.format('INFO_PAGE', ['rules']) }}" title="Some Rules and Information kind of summing up the ToS">Rules</a></li>
<li><a href="//fiistat.us" target="_blank" title="Check the status on our Servers and related services">Server Status</a></li>
<li><a href="{{ urls.format('INFO_PAGE', ['terms']) }}" title="Our Terms of Service">Terms of Service</a></li>
</ul>
</div>
</div>
</div>
2015-12-27 04:37:57 +00:00
{% if sakura.dev.showChangelog and php.self == '/index.php' and stats %}
2015-10-14 14:14:30 +00:00
<script type="text/javascript" src="https://sakura.flash.moe/?get={{ sakura.versionInfo.version|slice(0, 4) }}-{{ sakura.versionInfo.version|slice(4, 2) }}-{{ sakura.versionInfo.version|slice(6, 2) }}&amp;variable=true"></script>
<script type="text/javascript">
// Column colours for actions
var changelogColours = [
'inherit', // Unknown
'#2A2', // Add
'#2AA', // Update
'#2AA', // Fix
'#A22', // Remove
'#62C', // Export
'#C44' // Revert
];
2015-10-14 14:14:30 +00:00
window.addEventListener("load", function() {
// Check if the changelog variable is an object
if(typeof changelog === 'object') {
// Grab the index panel
var indexPanel = document.getElementById('indexPanel');
// Create the head container
var changelogTitle = document.createElement('div');
changelogTitle.className = 'head';
changelogTitle.style.marginBottom = '1px';
// Create a link
var changelogLink = document.createElement('a');
changelogLink.className = 'underline';
changelogLink.target = '_blank';
changelogLink.href = 'https://sakura.flash.moe/#r{{ sakura.versionInfo.version }}';
// Create the text container
var changelogTitleText = document.createTextNode('Changelog');
// Append everything
changelogLink.appendChild(changelogTitleText);
changelogTitle.appendChild(changelogLink);
indexPanel.appendChild(changelogTitle);
// Create changelog table
var changelogTable = document.createElement('table');
changelogTable.className = 'panelTable';
2015-10-14 14:14:30 +00:00
// Create and append all changelog entries
for (var i in changelog) {
// Create elements
var changelogRow = document.createElement('tr');
var changelogColumnAction = document.createElement('td');
var changelogColumnMessage = document.createElement('td');
// Set data
changelogColumnAction.appendChild(document.createTextNode(changelog[i]['change_action']['action_name']));
changelogColumnAction.style.background = changelogColours[changelog[i]['change_action']['action_id']];
changelogColumnMessage.appendChild(document.createTextNode(changelog[i]['change_message']));
// Append
changelogRow.appendChild(changelogColumnAction);
changelogRow.appendChild(changelogColumnMessage);
changelogTable.appendChild(changelogRow);
2015-10-14 14:14:30 +00:00
}
// Append it to indexPanel
indexPanel.appendChild(changelogTable);
2015-10-14 14:14:30 +00:00
}
});
</script>
{% endif %}
</body>
</html>