Restyled container titles.

This commit is contained in:
flash 2018-10-22 21:53:21 +02:00
parent 5b7bd50193
commit c25c2d76ed
75 changed files with 213 additions and 274 deletions

View file

@ -31,7 +31,6 @@
&__date { &__date {
display: block; display: block;
background-image: linear-gradient(0deg, var(--accent-colour), transparent); background-image: linear-gradient(0deg, var(--accent-colour), transparent);
color: var(--text-colour-header);
font-weight: 700; font-weight: 700;
margin-bottom: 1px; margin-bottom: 1px;
text-decoration: none; text-decoration: none;

View file

@ -1,7 +1,11 @@
.container { .container {
background-color: #111; // todo: make this now bad
box-shadow: 0 1px 2px #111; background-image:
text-shadow: 0 1px 4px #111; linear-gradient(0deg, var(--background-colour-translucent), var(--background-colour-translucent)),
linear-gradient(0deg, var(--accent-colour), var(--accent-colour));
box-shadow: 0 1px 2px #000A;
text-shadow: 0 1px 4px #000;
// should this exist? // should this exist?
&--hidden { // __title should always be the first element of a container &--hidden { // __title should always be the first element of a container
@ -16,17 +20,13 @@
&__title { &__title {
display: block; display: block;
text-decoration: none;
background-image: linear-gradient(0deg, transparent, var(--accent-colour));
color: #fff;
font-size: 1.5em;
line-height: 1.5em;
padding: 8px 10px;
word-wrap: break-word;
overflow: hidden; overflow: hidden;
&--link:hover { &__text {
text-decoration: underline; font-size: 1.5em;
line-height: 1.5em;
padding: 8px 10px;
word-wrap: break-word;
} }
&__link { &__link {
@ -34,9 +34,21 @@
text-decoration: none; text-decoration: none;
&:hover { &:hover {
text-decoration: underline; color: var(--accent-colour);
} }
} }
&__background {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
mask-image: linear-gradient(0deg, transparent 10%, var(--background-colour) 100%);
background: url('/clouds.png') fixed;
background-color: var(--accent-colour);
background-blend-mode: multiply;
}
} }
&__content { // only use this for text going forward, just throw your child container in directly after __title &__content { // only use this for text going forward, just throw your child container in directly after __title

View file

@ -1,5 +1,5 @@
.footer { .footer {
background: linear-gradient(0deg, var(--gradient-start), transparent) repeat-x; background: linear-gradient(0deg, var(--accent-colour), transparent) repeat-x;
flex: 0 0 auto; flex: 0 0 auto;
text-align: center; text-align: center;
font-size: .9em; font-size: .9em;

View file

@ -1,5 +1,5 @@
.forum__pagination { .forum__pagination {
margin: 2px 0; margin: 2px 0;
box-shadow: 0 1px 2px var(--accent-colour); box-shadow: 0 1px 2px var(--accent-colour);
background-color: var(--background-colour); background-color: var(--accent-colour);
} }

View file

@ -1,6 +1,6 @@
.header { .header {
flex: 0 0 auto; flex: 0 0 auto;
background: linear-gradient(0deg, transparent, var(--gradient-start)) repeat-x; background: linear-gradient(0deg, transparent, var(--accent-colour)) repeat-x;
&__wrapper { &__wrapper {
margin: 0 auto; margin: 0 auto;
@ -64,7 +64,6 @@
&__menu { &__menu {
flex: 1 1 auto; flex: 1 1 auto;
margin: 0 6px; margin: 0 6px;
font-family: @mio-font-heading;
list-style: none; list-style: none;
display: flex; display: flex;
@ -84,7 +83,7 @@
@media (max-width: @site-mobile-width) { @media (max-width: @site-mobile-width) {
width: 100%; width: 100%;
background: var(--gradient-start); background: var(--accent-colour);
&__item:not(:last-child) { &__item:not(:last-child) {
border-bottom: 1px solid var(--accent-colour); border-bottom: 1px solid var(--accent-colour);
@ -105,7 +104,7 @@
transition: background-color .2s; transition: background-color .2s;
&:hover { &:hover {
background-color: var(--gradient-start); background-color: var(--accent-colour);
.header__submenu { .header__submenu {
transform: scaleY(1); transform: scaleY(1);
@ -143,7 +142,7 @@
position: absolute; // floating position: absolute; // floating
transform: scaleY(0); transform: scaleY(0);
transform-origin: center top 0; transform-origin: center top 0;
background: var(--gradient-start); background: var(--accent-colour);
overflow: hidden; overflow: hidden;
z-index: 100; z-index: 100;
text-align: left; text-align: left;
@ -177,7 +176,7 @@
@media (max-width: @site-mobile-width) { @media (max-width: @site-mobile-width) {
display: none; display: none;
width: 100%; width: 100%;
background: var(--gradient-start); background: var(--accent-colour);
font-size: 1.1em; font-size: 1.1em;
&-toggle:checked ~ .header__user { &-toggle:checked ~ .header__user {
@ -215,7 +214,6 @@
text-shadow: 0 0 5px var(--user-colour); text-shadow: 0 0 5px var(--user-colour);
font-size: 1.4em; font-size: 1.4em;
line-height: 1.4em; line-height: 1.4em;
font-family: @mio-font-heading;
text-decoration: none; text-decoration: none;
display: block; display: block;
text-align: right; text-align: right;

View file

@ -66,7 +66,7 @@
} }
&--selected { &--selected {
background-color: var(--background-colour); background-color: var(--accent-colour);
top: -1px; top: -1px;
@media (max-width: @mio-navigation-mobile) { @media (max-width: @mio-navigation-mobile) {
@ -95,7 +95,6 @@
@media (max-width: @mio-navigation-mobile) { @media (max-width: @mio-navigation-mobile) {
padding: 10px 15px; padding: 10px 15px;
color: var(--text-colour-header);
font-size: 1.5em; font-size: 1.5em;
} }

View file

@ -5,7 +5,7 @@
border: 1px solid var(--accent-colour); border: 1px solid var(--accent-colour);
&__wrapper { &__wrapper {
background-color: var(--background-colour); background-color: var(--accent-colour);
margin: 2px 0; margin: 2px 0;
box-shadow: 0 1px 2px var(--accent-colour); box-shadow: 0 1px 2px var(--accent-colour);
} }
@ -17,7 +17,6 @@
&__option { &__option {
background: var(--accent-colour); background: var(--accent-colour);
color: var(--text-colour-header);
height: 20px; height: 20px;
min-width: 20px; min-width: 20px;

View file

@ -13,7 +13,6 @@
line-height: 1.4em; line-height: 1.4em;
border-bottom: 1px solid var(--accent-colour); border-bottom: 1px solid var(--accent-colour);
padding-bottom: 1px; padding-bottom: 1px;
font-family: @mio-font-heading;
&:not(:first-child) { &:not(:first-child) {
margin-top: 4px; margin-top: 4px;

View file

@ -86,7 +86,7 @@
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;
padding: 20px; padding: 20px;
background-image: linear-gradient(0deg, rgba(0, 0, 0, .9), transparent); background-image: linear-gradient(0deg, var(--background-colour-translucent), transparent);
&__content { &__content {
margin: 5px 10px; margin: 5px 10px;
@ -95,7 +95,7 @@
&__relation { &__relation {
font-variant: all-small-caps; font-variant: all-small-caps;
background: rgba(0, 0, 0, 0.5); background: var(--background-colour-translucent);
border-radius: 2px; border-radius: 2px;
line-height: 1.2em; line-height: 1.2em;
padding: 1px 5px 4px; padding: 1px 5px 4px;
@ -105,7 +105,7 @@
&__options { &__options {
min-height: 62px; min-height: 62px;
background-color: rgba(0, 0, 0, .9); background-color: var(--background-colour-translucent);
padding: 0 20px; padding: 0 20px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;

View file

@ -45,11 +45,9 @@
&__title { &__title {
background-color: var(--accent-colour); background-color: var(--accent-colour);
color: var(--text-colour-header);
font-size: 1.1em; font-size: 1.1em;
font-weight: 700; font-weight: 700;
padding: 3px; padding: 3px;
font-family: @mio-font-heading;
} }
&__input { &__input {

View file

@ -25,11 +25,10 @@
&__name { &__name {
background-color: var(--accent-colour); background-color: var(--accent-colour);
color: var(--text-colour-header);
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
padding: 0 4px; padding: 0 4px;
border-bottom: 1px solid var(--text-colour-header); border-bottom: 1px solid var(--accent-colour);
} }
&__buttons { &__buttons {
@ -43,7 +42,6 @@
cursor: pointer; cursor: pointer;
font-family: inherit; font-family: inherit;
background-color: var(--accent-colour); background-color: var(--accent-colour);
color: var(--text-colour-header);
font-weight: 700; font-weight: 700;
border-radius: 0; border-radius: 0;

View file

@ -1,28 +1,19 @@
@mio-font-heading: Verdana, 'Dejavu Sans', Arial, Helvetica, sans-serif;
@mio-font-regular: Tahoma, Geneva, 'Dejavu Sans', Arial, Helvetica, sans-serif; @mio-font-regular: Tahoma, Geneva, 'Dejavu Sans', Arial, Helvetica, sans-serif;
@mio-font-mono: Consolas, 'Liberation Mono', Menlo, Courier, monospace; @mio-font-mono: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
@site-max-width: 1200px;
@site-mobile-width: 800px; @site-mobile-width: 800px;
@default-accent-colour: #9475b2;
@default-background-colour: #fbeeff;
@default-text-colour: #000;
@default-header-text-colour: #306;
@default-gradient-start: #c2affe;
:root { :root {
--site-max-width: @site-max-width; --site-max-width: 1200px;
--site-background-meta: no-repeat center / cover fixed;
--site-background-image: initial; --background-image: initial;
--background-colour: #111;
--background-colour-translucent: #111E;
--text-colour: #fff;
--text-colour-inverted: #000;
--user-colour: inherit; --user-colour: inherit;
--accent-colour: @default-accent-colour; --accent-colour: #9475b2;
--text-colour: @default-text-colour;
--text-colour-inverted: color(#fff - @default-text-colour);
--text-colour-header: @default-header-text-colour;
--background-colour: @default-background-colour;
--background-colour-translucent: fade(@default-background-colour, 90%);
--gradient-start: @default-gradient-start; // deprecate this in favour of --accent-colour at some point
} }
* { * {
@ -42,8 +33,7 @@ body {
.main { .main {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background: var(--site-background-meta); background-image: var(--background-image);
background-image: var(--site-background-image);
background-color: var(--background-colour); background-color: var(--background-colour);
font: 12px/20px @mio-font-regular; font: 12px/20px @mio-font-regular;
color: var(--text-colour); color: var(--text-colour);
@ -55,23 +45,6 @@ body {
flex: 1 0 auto; flex: 1 0 auto;
} }
&--default {
--site-background-meta: repeat;
--site-background-image: url('https://mikoto.misaka.nl/i/cloudss.png');
background-blend-mode: multiply;
--accent-colour: #452c4c;
--text-colour: #fff;
--text-colour-inverted: #000;
background-color: var(--accent-colour);
--gradient-start: var(--accent-colour);
}
&--legacy {
--background-colour: #fbeeff;
--accent-colour: #9475b2;
}
&--bg-blend { &--bg-blend {
background-blend-mode: multiply; background-blend-mode: multiply;
} }

View file

@ -5,8 +5,6 @@ $misuzuBypassLockdown = $authMode === 'login' || $authMode === 'get_user';
require_once '../misuzu.php'; require_once '../misuzu.php';
use_legacy_style();
$usernameValidationErrors = [ $usernameValidationErrors = [
'trim' => 'Your username may not start or end with spaces!', 'trim' => 'Your username may not start or end with spaces!',
'short' => sprintf('Your username is too short, it has to be at least %d characters!', MSZ_USERNAME_MIN_LENGTH), 'short' => sprintf('Your username is too short, it has to be at least %d characters!', MSZ_USERNAME_MIN_LENGTH),

View file

@ -1,8 +1,6 @@
<?php <?php
require_once '../misuzu.php'; require_once '../misuzu.php';
use_legacy_style();
$changelogOffset = max((int)($_GET['o'] ?? 0), 0); $changelogOffset = max((int)($_GET['o'] ?? 0), 0);
$changelogRange = 30; $changelogRange = 30;

View file

@ -1,8 +1,6 @@
<?php <?php
require_once '../misuzu.php'; require_once '../misuzu.php';
use_legacy_style();
// basing whether or not this is an xhr request on whether a referrer header is present // basing whether or not this is an xhr request on whether a referrer header is present
// this page is never directy accessed, under normal circumstances // this page is never directy accessed, under normal circumstances
$redirect = !empty($_SERVER['HTTP_REFERER']) && empty($_SERVER['HTTP_X_MISUZU_XHR']) ? $_SERVER['HTTP_REFERER'] : ''; $redirect = !empty($_SERVER['HTTP_REFERER']) && empty($_SERVER['HTTP_X_MISUZU_XHR']) ? $_SERVER['HTTP_REFERER'] : '';

BIN
public/images/clouds.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 393 KiB

View file

@ -1,8 +1,6 @@
<?php <?php
require_once '../misuzu.php'; require_once '../misuzu.php';
use_legacy_style();
if (config_get_default(false, 'Site', 'embed_linked_data')) { if (config_get_default(false, 'Site', 'embed_linked_data')) {
tpl_var('linked_data', [ tpl_var('linked_data', [
'name' => config_get('Site', 'name'), 'name' => config_get('Site', 'name'),

View file

@ -1,8 +1,6 @@
<?php <?php
require_once '../misuzu.php'; require_once '../misuzu.php';
use_legacy_style();
$pathInfo = $_SERVER['PATH_INFO'] ?? ''; $pathInfo = $_SERVER['PATH_INFO'] ?? '';
if (empty($pathInfo) || $pathInfo === '/') { if (empty($pathInfo) || $pathInfo === '/') {

View file

@ -1,8 +1,6 @@
<?php <?php
require_once '../../misuzu.php'; require_once '../../misuzu.php';
use_legacy_style();
$changelogPerms = perms_get_user(MSZ_PERMS_CHANGELOG, user_session_current('user_id', 0)); $changelogPerms = perms_get_user(MSZ_PERMS_CHANGELOG, user_session_current('user_id', 0));
$queryOffset = (int)($_GET['o'] ?? 0); $queryOffset = (int)($_GET['o'] ?? 0);

View file

@ -1,8 +1,6 @@
<?php <?php
require_once '../../misuzu.php'; require_once '../../misuzu.php';
use_legacy_style();
switch ($_GET['v'] ?? null) { switch ($_GET['v'] ?? null) {
case 'listing': case 'listing':
$forums = db_query('SELECT * FROM `msz_forum_categories`'); $forums = db_query('SELECT * FROM `msz_forum_categories`');

View file

@ -1,8 +1,6 @@
<?php <?php
require_once '../../misuzu.php'; require_once '../../misuzu.php';
use_legacy_style();
$generalPerms = perms_get_user(MSZ_PERMS_GENERAL, user_session_current('user_id', 0)); $generalPerms = perms_get_user(MSZ_PERMS_GENERAL, user_session_current('user_id', 0));
switch ($_GET['v'] ?? null) { switch ($_GET['v'] ?? null) {

View file

@ -1,8 +1,6 @@
<?php <?php
require_once '../../misuzu.php'; require_once '../../misuzu.php';
use_legacy_style();
$newsPerms = perms_get_user(MSZ_PERMS_NEWS, user_session_current('user_id', 0)); $newsPerms = perms_get_user(MSZ_PERMS_NEWS, user_session_current('user_id', 0));
switch ($_GET['v'] ?? null) { switch ($_GET['v'] ?? null) {

View file

@ -1,8 +1,6 @@
<?php <?php
require_once '../../misuzu.php'; require_once '../../misuzu.php';
use_legacy_style();
$userPerms = perms_get_user(MSZ_PERMS_USER, user_session_current('user_id', 0)); $userPerms = perms_get_user(MSZ_PERMS_USER, user_session_current('user_id', 0));
$isPostRequest = $_SERVER['REQUEST_METHOD'] === 'POST'; $isPostRequest = $_SERVER['REQUEST_METHOD'] === 'POST';
$queryQffset = (int)($_GET['o'] ?? 0); $queryQffset = (int)($_GET['o'] ?? 0);

View file

@ -1,8 +1,6 @@
<?php <?php
require_once '../misuzu.php'; require_once '../misuzu.php';
use_legacy_style();
$usersOffset = max((int)($_GET['o'] ?? 0), 0); $usersOffset = max((int)($_GET['o'] ?? 0), 0);
$usersTake = 30; $usersTake = 30;

View file

@ -1,8 +1,6 @@
<?php <?php
require_once '../misuzu.php'; require_once '../misuzu.php';
use_legacy_style();
$categoryId = isset($_GET['c']) ? (int)$_GET['c'] : null; $categoryId = isset($_GET['c']) ? (int)$_GET['c'] : null;
$postId = isset($_GET['p']) ? (int)$_GET['p'] : (isset($_GET['n']) ? (int)$_GET['n'] : null); $postId = isset($_GET['p']) ? (int)$_GET['p'] : (isset($_GET['n']) ? (int)$_GET['n'] : null);
$postsOffset = (int)($_GET['o'] ?? 0); $postsOffset = (int)($_GET['o'] ?? 0);

View file

@ -1,6 +1,4 @@
<?php <?php
require_once '../misuzu.php'; require_once '../misuzu.php';
use_legacy_style();
echo render_error(404); echo render_error(404);

View file

@ -4,8 +4,6 @@ $misuzuBypassLockdown = $mode === 'avatar';
require_once '../misuzu.php'; require_once '../misuzu.php';
use_legacy_style();
$userId = (int)($_GET['u'] ?? 0); $userId = (int)($_GET['u'] ?? 0);
switch ($mode) { switch ($mode) {

View file

@ -1,8 +1,6 @@
<?php <?php
require_once '../misuzu.php'; require_once '../misuzu.php';
use_legacy_style();
if (empty($_SERVER['HTTP_REFERER']) || !is_local_url($_SERVER['HTTP_REFERER'])) { if (empty($_SERVER['HTTP_REFERER']) || !is_local_url($_SERVER['HTTP_REFERER'])) {
header('Location: /'); header('Location: /');
return; return;

View file

@ -1,8 +1,6 @@
<?php <?php
require_once '../misuzu.php'; require_once '../misuzu.php';
use_legacy_style();
$queryOffset = (int)($_GET['o'] ?? 0); $queryOffset = (int)($_GET['o'] ?? 0);
$queryTake = 15; $queryTake = 15;

View file

@ -12,6 +12,7 @@ final class BoxTag extends BBCodeTag
function ($matches) { function ($matches) {
$randomId = 'toggle_' . bin2hex(random_bytes(8)); $randomId = 'toggle_' . bin2hex(random_bytes(8));
$title = strlen($matches[1]) ? $matches[1] : 'Spoiler'; $title = strlen($matches[1]) ? $matches[1] : 'Spoiler';
// restyle this entirely
return '<div class="container container--hidden" id="' . $randomId . '">' return '<div class="container container--hidden" id="' . $randomId . '">'
. "<div class='container__title' onclick='toggleContainer(\"{$randomId}\")'>{$title}</div>" . "<div class='container__title' onclick='toggleContainer(\"{$randomId}\")'>{$title}</div>"
. "<div class='container__content'>{$matches[2]}</div>" . "<div class='container__content'>{$matches[2]}</div>"

View file

@ -50,7 +50,10 @@ final class WhoopsReporter extends Handler
<body class="main" style="justify-content: center; --site-max-width: 400px"> <body class="main" style="justify-content: center; --site-max-width: 400px">
<div class="main__wrapper" style="flex: 0 0 auto"> <div class="main__wrapper" style="flex: 0 0 auto">
<div class="container"> <div class="container">
<div class="container__title">Something broke!</div> <div class="container__title">
<div class="container__title__background"></div>
<div class="container__title__text">Something broke!</div>
</div>
<div class="container__content"> <div class="container__content">
<p>{$text}</p> <p>{$text}</p>
</div> </div>

View file

@ -38,7 +38,7 @@
</label> </label>
{% endif %} {% endif %}
{% endif %} {% endif %}
<button class="comment__action comment__action--button comment__action--post"> <button class="input__button comment__action comment__action--button comment__action--post">
{{ reply_mode ? 'Reply' : 'Post' }} {{ reply_mode ? 'Reply' : 'Post' }}
</button> </button>
</div> </div>
@ -479,7 +479,7 @@
replyContent.appendChild(replyActions); replyContent.appendChild(replyActions);
var replyButton = document.createElement('button'); var replyButton = document.createElement('button');
replyButton.className = 'comment__action comment__action--button comment__action--post'; replyButton.className = 'input__button comment__action comment__action--button comment__action--post';
replyButton.textContent = 'Reply'; replyButton.textContent = 'Reply';
replyActions.appendChild(replyButton); replyActions.appendChild(replyButton);

View file

@ -1,4 +1,5 @@
{% extends 'auth/master.twig' %} {% extends 'auth/master.twig' %}
{% from 'macros.twig' import container_title %}
{% from 'auth/macros.twig' import auth_login %} {% from 'auth/macros.twig' import auth_login %}
{% block content %} {% block content %}
@ -13,7 +14,7 @@
<input type="hidden" name="auth[mode]" value="register"> <input type="hidden" name="auth[mode]" value="register">
{{ 'register'|csrf|raw }} {{ 'register'|csrf|raw }}
<div class="container__title">Register</div> {{ container_title('Register') }}
{% if auth_register_error is defined %} {% if auth_register_error is defined %}
<div class="warning auth__warning"> <div class="warning auth__warning">
@ -48,7 +49,7 @@
<input type="hidden" name="auth[mode]" value="forgot"> <input type="hidden" name="auth[mode]" value="forgot">
{{ 'passforgot'|csrf|raw }} {{ 'passforgot'|csrf|raw }}
<div class="container__title">Forgot password</div> {{ container_title('Forgot password') }}
{% if auth_forgot_error is defined %} {% if auth_forgot_error is defined %}
<div class="warning auth__warning"> <div class="warning auth__warning">

View file

@ -1,8 +1,9 @@
{% extends 'auth/master.twig' %} {% extends 'auth/master.twig' %}
{% from 'macros.twig' import container_title %}
{% block content %} {% block content %}
<div class="container auth"> <div class="container auth">
<div class="container__title">Unavailable</div> {{ container_title('Unavailable') }}
<div class="container__content"> <div class="container__content">
The site is currently unavailable, try again later. The site is currently unavailable, try again later.

View file

@ -1,8 +1,9 @@
{% extends 'auth/master.twig' %} {% extends 'auth/master.twig' %}
{% from 'macros.twig' import container_title %}
{% block content %} {% block content %}
<div class="container auth"> <div class="container auth">
<div class="container__title">Logout confirmation</div> {{ container_title('Logout confirmation') }}
<div class="auth__form"> <div class="auth__form">
<p class="auth__paragraph">We couldn't verify that you were actually the person attempting to log out.</p> <p class="auth__paragraph">We couldn't verify that you were actually the person attempting to log out.</p>

View file

@ -1,10 +1,12 @@
{% extends 'auth/master.twig' %} {% extends 'auth/master.twig' %}
{% from 'macros.twig' import container_title %}
{% block content %} {% block content %}
<form class="container auth" method="post" action=""> <form class="container auth" method="post" action="">
<input type="hidden" name="auth[mode]" value="reset"> <input type="hidden" name="auth[mode]" value="reset">
<input type="hidden" name="auth[user]" value="{{ reset_user.user_id }}"> <input type="hidden" name="auth[user]" value="{{ reset_user.user_id }}">
<div class="container__title">Resetting password for {{ reset_user.username }}</div>
{{ container_title('Resetting password for ' ~ reset_user.username) }}
<div class="warning auth__warning{% if auth_reset_error is not defined %} auth__warning--welcome{% endif %}"> <div class="warning auth__warning{% if auth_reset_error is not defined %} auth__warning--welcome{% endif %}">
<div class="warning__content"> <div class="warning__content">

View file

@ -1,4 +1,5 @@
{% extends 'changelog/master.twig' %} {% extends 'changelog/master.twig' %}
{% from 'macros.twig' import container_title %}
{% from '_layout/comments.twig' import comments_section %} {% from '_layout/comments.twig' import comments_section %}
{% set is_valid = change|length > 0 %} {% set is_valid = change|length > 0 %}
@ -12,9 +13,8 @@
{% block content %} {% block content %}
<div class="container"> <div class="container">
<div class="container__title"> {{ container_title(title) }}
{{ title }}
</div>
<div class="changelog__content"> <div class="changelog__content">
{% if is_valid %} {% if is_valid %}
<div class="changelog__change" id="#c{{ change.change_id }}"> <div class="changelog__change" id="#c{{ change.change_id }}">
@ -98,9 +98,7 @@
{% if comments is defined %} {% if comments is defined %}
<div class="container"> <div class="container">
<div class="container__title"> {{ container_title('Comments for ' ~ change.change_date) }}
Comments for {{ change.change_date }}
</div>
{{ comments_section(comments, comments_category, current_user|default(null), comments_perms) }} {{ comments_section(comments, comments_category, current_user|default(null), comments_perms) }}
</div> </div>
{% endif %} {% endif %}

View file

@ -1,5 +1,5 @@
{% extends 'changelog/master.twig' %} {% extends 'changelog/master.twig' %}
{% from 'macros.twig' import pagination %} {% from 'macros.twig' import pagination, container_title %}
{% from 'changelog/macros.twig' import changelog_listing %} {% from 'changelog/macros.twig' import changelog_listing %}
{% from '_layout/comments.twig' import comments_section %} {% from '_layout/comments.twig' import comments_section %}
@ -23,9 +23,8 @@
{% block content %} {% block content %}
<div class="container"> <div class="container">
<div class="container__title"> {{ container_title(title) }}
{{ title }}
</div>
<div class="changelog__content"> <div class="changelog__content">
{{ changelog_listing(changes, is_date) }} {{ changelog_listing(changes, is_date) }}
@ -40,9 +39,7 @@
{% if comments is defined %} {% if comments is defined %}
<div class="container"> <div class="container">
<div class="container__title"> {{ container_title('Comments') }}
Comments
</div>
{{ comments_section(comments, comments_category, current_user|default(null), comments_perms) }} {{ comments_section(comments, comments_category, current_user|default(null), comments_perms) }}
</div> </div>
{% endif %} {% endif %}

View file

@ -1,10 +1,9 @@
{% extends 'master.twig' %} {% extends 'master.twig' %}
{% from 'macros.twig' import container_title %}
{% block content %} {% block content %}
<div class="container"> <div class="container">
<div class="container__title"> {{ container_title((title|default(error_code|default(http_code) >= 400 ? 'Error' : 'Information')) ~ ' ' ~ (error_code|default(http_code >= 400 ? http_code : '')) ~ (error_text is defined ? ' - ' ~ error_text : '')) }}
{{ title|default(error_code|default(http_code) >= 400 ? 'Error' : 'Information') }} {{ error_code|default(http_code >= 400 ? http_code : '') }}{{ error_text is defined ? ' - ' ~ error_text : '' }}
</div>
<div class="container__content"> <div class="container__content">
{% if message is defined %} {% if message is defined %}

View file

@ -1,4 +1,5 @@
{% extends 'forum/master.twig' %} {% extends 'forum/master.twig' %}
{% from 'macros.twig' import container_title %}
{% from 'forum/macros.twig' import forum_category_listing %} {% from 'forum/macros.twig' import forum_category_listing %}
{% set title = 'Forum Listing' %} {% set title = 'Forum Listing' %}
@ -20,7 +21,7 @@
</div> </div>
{% else %} {% else %}
<div class="container"> <div class="container">
<div class="container__title">Forums</div> {{ container_title('Forums') }}
<div class="container__content"> <div class="container__content">
<p>There are no forums yet, check back later!</p> <p>There are no forums yet, check back later!</p>
</div> </div>

View file

@ -1,8 +1,9 @@
{% macro forum_category_listing(forums, title, colour) %} {% macro forum_category_listing(forums, title, colour) %}
{% from _self import forum_category_entry %} {% from _self import forum_category_entry %}
{% from 'macros.twig' import container_title %}
<div class="container forum__categories"{% if colour is not null %} style="{{ colour|html_colour('--accent-colour') }}"{% endif %}> <div class="container forum__categories"{% if colour is not null %} style="{{ colour|html_colour('--accent-colour') }}"{% endif %}>
<div class="container__title">{{ title }}</div> {{ container_title(title) }}
{% if forums|length > 0 %} {% if forums|length > 0 %}
<div class="forum__categories__list"> <div class="forum__categories__list">
@ -183,9 +184,11 @@
{% macro forum_topic_listing(topics) %} {% macro forum_topic_listing(topics) %}
{% from _self import forum_topic_entry %} {% from _self import forum_topic_entry %}
{% from 'macros.twig' import container_title %}
<div class="container forum__topics"> <div class="container forum__topics">
<div class="container__title">Topics</div> {{ container_title('Topics') }}
<div class="forum__topics__list"> <div class="forum__topics__list">
{% if topics|length > 0 %} {% if topics|length > 0 %}
{% for topic in topics %} {% for topic in topics %}
@ -331,15 +334,14 @@
{% endmacro %} {% endmacro %}
{% macro forum_posting_form(title, target_id, is_reply, element_id) %} {% macro forum_posting_form(title, target_id, is_reply, element_id) %}
{% from 'macros.twig' import container_title %}
{% set is_reply = is_reply ? true : false %} {% set is_reply = is_reply ? true : false %}
<form{% if element_id is defined %} id="{{ element_id }}"{% endif %} <form{% if element_id is defined %} id="{{ element_id }}"{% endif %}
class="container forum__posting" class="container forum__posting"
method="post" method="post"
action="/forum/posting.php"> action="/forum/posting.php">
<div class="container__title"> {{ container_title(title) }}
{{ title }}
</div>
<div class="forum__posting__content"> <div class="forum__posting__content">
<input type="hidden" name="post[{{ is_reply ? 'topic' : 'forum' }}]" value="{{ target_id }}"> <input type="hidden" name="post[{{ is_reply ? 'topic' : 'forum' }}]" value="{{ target_id }}">

View file

@ -1,4 +1,5 @@
{% extends 'home/master.twig' %} {% extends 'home/master.twig' %}
{% from 'macros.twig' import container_title %}
{% from 'news/macros.twig' import news_preview %} {% from 'news/macros.twig' import news_preview %}
{% from 'changelog/macros.twig' import changelog_listing %} {% from 'changelog/macros.twig' import changelog_listing %}
{% from 'home/macros.twig' import chat_quote_display %} {% from 'home/macros.twig' import chat_quote_display %}
@ -10,13 +11,13 @@
<div class="index__sidebar"> <div class="index__sidebar">
{% if chat_quote is defined and chat_quote is iterable and chat_quote|length > 0 %} {% if chat_quote is defined and chat_quote is iterable and chat_quote|length > 0 %}
<div class="container"> <div class="container">
<div class="container__title">Chat quote from {{ chat_quote[0].quote_timestamp|date('Y-m-d') }}</div> {{ container_title('Chat quote from ' ~ (chat_quote[0].quote_timestamp|date('Y-m-d'))) }}
{{ chat_quote_display(chat_quote) }} {{ chat_quote_display(chat_quote) }}
</div> </div>
{% endif %} {% endif %}
<div class="container"> <div class="container">
<div class="container__title">Statistics</div> {{ container_title('Statistics') }}
<div class="container__content"> <div class="container__content">
{% if users_count < 1 %} {% if users_count < 1 %}
This is a fresh installation, <a href="/auth.php?m=register" class="index__stats__emphasis index__stats__link">create an account</a>! This is a fresh installation, <a href="/auth.php?m=register" class="index__stats__emphasis index__stats__link">create an account</a>!
@ -29,7 +30,7 @@
</div> </div>
<div class="container"> <div class="container">
<div class="container__title">Online users</div> {{ container_title('Online users') }}
<div class="container__content"> <div class="container__content">
{% if online_users < 1 %} {% if online_users < 1 %}
No one was online in the last 5 minutes. No one was online in the last 5 minutes.
@ -43,7 +44,7 @@
</div> </div>
<div class="container"> <div class="container">
<a class="container__title container__title--link" href="/changelog.php">Changelog</a> {{ container_title('Changelog', '/changelog.php') }}
<div class="changelog__content"> <div class="changelog__content">
{{ changelog_listing(featured_changelog) }} {{ changelog_listing(featured_changelog) }}
</div> </div>
@ -53,7 +54,7 @@
<div class="index__main"> <div class="index__main">
{% if current_user is defined %} {% if current_user is defined %}
<div class="container"> <div class="container">
<div class="container__title">Welcome</div> {{ container_title('Welcome') }}
<div class="container__content"> <div class="container__content">
<p>You have 0 new messages because the PM system doesn't exist yet, have a nice day.</p> <p>You have 0 new messages because the PM system doesn't exist yet, have a nice day.</p>
</div> </div>

View file

@ -1,12 +1,12 @@
{% extends 'info/master.twig' %} {% extends 'info/master.twig' %}
{% from 'macros.twig' import container_title %}
{% set title = 'Info' %} {% set title = 'Info' %}
{% block content %} {% block content %}
<div class="container"> <div class="container">
<div class="container__title"> {{ container_title('Flashii Informational Pages') }}
Flashii Informational Pages
</div>
<div class="container__content"> <div class="container__content">
<p>Here's a listing of a few informational pages that'll probably come in handy during your Flashii Experience&trade;.</p> <p>Here's a listing of a few informational pages that'll probably come in handy during your Flashii Experience&trade;.</p>
<ul> <ul>

View file

@ -1,12 +1,12 @@
{% extends 'info/master.twig' %} {% extends 'info/master.twig' %}
{% from 'macros.twig' import container_title %}
{% set title = document.title %} {% set title = document.title %}
{% block content %} {% block content %}
<div class="container"> <div class="container">
<div class="container__title"> {{ container_title(document.title) }}
{{ document.title }}
</div>
<div class="container__content"> <div class="container__content">
{{ document.content|parse_text(constant('MSZ_PARSER_MARKDOWN'))|raw }} {{ document.content|parse_text(constant('MSZ_PARSER_MARKDOWN'))|raw }}
</div> </div>

View file

@ -96,3 +96,16 @@
</ul> </ul>
{% endif %} {% endif %}
{% endmacro %} {% endmacro %}
{% macro container_title(title, url) %}
{% set has_url = url is not null and url|length > 0 %}
<div class="container__title">
<div class="container__title__background"></div>
{% if has_url %}<a href="{{ url }}" class="container__title__link">{% endif %}
<div class="container__title__text">
{{ title }}
</div>
{% if has_url %}</a>{% endif %}
</div>
{% endmacro %}

View file

@ -1,17 +1,12 @@
{% extends 'manage/changelog/master.twig' %} {% extends 'manage/changelog/master.twig' %}
{% from 'macros.twig' import container_title %}
{% block manage_content %} {% block manage_content %}
<div class="container"> <div class="container">
<form action="?v=action{{ edit_action is defined ? '&a=' ~ edit_action.action_id : '' }}" method="post"> <form action="?v=action{{ edit_action is defined ? '&a=' ~ edit_action.action_id : '' }}" method="post">
{{ 'changelog_action'|csrf|raw }} {{ 'changelog_action'|csrf|raw }}
<h1 class="container__title"> {{ container_title(edit_action is defined ? 'Editing ' ~ edit_action.action_name ~ ' (' ~ edit_action.action_id ~ ')' : 'Adding a new action') }}
{% if edit_action is defined %}
Editing <span style="{{ edit_action.action_colour|html_colour }};color:var(--user-colour)">{{ edit_action.action_name }}</span> ({{ edit_action.action_id }})
{% else %}
Adding a new action
{% endif %}
</h1>
<label class="form__label"> <label class="form__label">
<div class="form__label__text">Name</div> <div class="form__label__text">Name</div>

View file

@ -1,10 +1,11 @@
{% extends 'manage/changelog/master.twig' %} {% extends 'manage/changelog/master.twig' %}
{% from 'macros.twig' import container_title %}
{% block manage_content %} {% block manage_content %}
<div class="changelog-actions-tags"> <div class="changelog-actions-tags">
{% if changelog_tags is defined %} {% if changelog_tags is defined %}
<div class="container changelog-actions-tags__panel changelog-actions-tags__panel--tags"> <div class="container changelog-actions-tags__panel changelog-actions-tags__panel--tags">
<div class="container__title">Tags</div> {{ container_title('Tags') }}
<a href="?v=tag" class="input__button">Create new tag</a> <a href="?v=tag" class="input__button">Create new tag</a>
@ -28,7 +29,8 @@
{% if changelog_actions is defined %} {% if changelog_actions is defined %}
<div class="container changelog-actions-tags__panel changelog-actions-tags__panel--actions"> <div class="container changelog-actions-tags__panel changelog-actions-tags__panel--actions">
<div class="container__title">Actions</div> {{ container_title('Actions') }}
<a href="?v=action" class="input__button">Create new action</a> <a href="?v=action" class="input__button">Create new action</a>
<div class="changelog-actions-tags__list"> <div class="changelog-actions-tags__list">

View file

@ -1,4 +1,5 @@
{% extends 'manage/changelog/master.twig' %} {% extends 'manage/changelog/master.twig' %}
{% from 'macros.twig' import container_title %}
{% if edit_change is defined %} {% if edit_change is defined %}
{% set site_link = '/changelog.php?c=' ~ edit_change.change_id %} {% set site_link = '/changelog.php?c=' ~ edit_change.change_id %}
@ -9,13 +10,7 @@
<form action="?v=change{{ edit_change is defined ? '&c=' ~ edit_change.change_id : '' }}" method="post"> <form action="?v=change{{ edit_change is defined ? '&c=' ~ edit_change.change_id : '' }}" method="post">
{{ 'changelog_add'|csrf|raw }} {{ 'changelog_add'|csrf|raw }}
<h1 class="container__title"> {{ container_title(edit_change is defined ? 'Editing #' ~ edit_change.change_id : 'Adding a new change') }}
{% if edit_change is defined %}
Editing #{{ edit_change.change_id }}
{% else %}
Adding a new change
{% endif %}
</h1>
<label class="form__label" style="width:100%"> <label class="form__label" style="width:100%">
<div class="form__label__text">Log</div> <div class="form__label__text">Log</div>
@ -64,9 +59,7 @@
</form> </form>
{% if edit_change is defined %} {% if edit_change is defined %}
<h1 class="container__title"> {{ container_title('Tags') }}
Tags
</h1>
{% if edit_change_assigned_tags|length > 0 %} {% if edit_change_assigned_tags|length > 0 %}
<form class="container" method="post" action="" style="display:inline-block"> <form class="container" method="post" action="" style="display:inline-block">

View file

@ -1,14 +1,13 @@
{% extends 'manage/changelog/master.twig' %} {% extends 'manage/changelog/master.twig' %}
{% from 'macros.twig' import pagination %} {% from 'macros.twig' import pagination, container_title %}
{% from 'changelog/macros.twig' import changelog_listing %} {% from 'changelog/macros.twig' import changelog_listing %}
{% block manage_content %} {% block manage_content %}
<a href="?v=change" class="input__button">Create new change</a> <a href="?v=change" class="input__button">Create new change</a>
<div class="container"> <div class="container">
<div class="container__title"> {{ container_title('Changelog') }}
Changelog
</div>
<div class="changelog__content"> <div class="changelog__content">
{{ changelog_listing( {{ changelog_listing(
changelog_changes, false, true, changelog_changes, false, true,

View file

@ -1,17 +1,12 @@
{% extends 'manage/changelog/master.twig' %} {% extends 'manage/changelog/master.twig' %}
{% from 'macros.twig' import container_title %}
{% block manage_content %} {% block manage_content %}
<div class="container"> <div class="container">
<form action="?v=tag{{ edit_tag is defined ? '&t=' ~ edit_tag.tag_id : '' }}" method="post"> <form action="?v=tag{{ edit_tag is defined ? '&t=' ~ edit_tag.tag_id : '' }}" method="post">
{{ 'changelog_tag'|csrf|raw }} {{ 'changelog_tag'|csrf|raw }}
<h1 class="container__title"> {{ container_title(edit_tag is defined ? 'Editing ' ~ edit_tag.tag_name ~ ' (' ~ edit_tag.tag_id ~ ')' : 'Adding a new tag') }}
{% if edit_tag is defined %}
Editing {{ edit_tag.tag_name }} ({{ edit_tag.tag_id }})
{% else %}
Adding a new tag
{% endif %}
</h1>
<label class="form__label" style="width:100%"> <label class="form__label" style="width:100%">
<div class="form__label__text">Name</div> <div class="form__label__text">Name</div>

View file

@ -1,9 +1,11 @@
{% extends 'manage/users/master.twig' %} {% extends 'manage/users/master.twig' %}
{% from 'macros.twig' import container_title %}
{% from 'manage/macros.twig' import permissions_table %} {% from 'manage/macros.twig' import permissions_table %}
{% block manage_content %} {% block manage_content %}
<div class="container"> <div class="container">
<div class="container__title">{{ forum.forum_name }}</div> {{ container_title(forum.forum_name) }}
<div class="container__content"> <div class="container__content">
<form action="" method="get"> <form action="" method="get">
<input type="hidden" name="v" value="forumperms"> <input type="hidden" name="v" value="forumperms">
@ -19,7 +21,7 @@
</div> </div>
<div class="container"> <div class="container">
<div class="container__title">Base Permissions</div> {{ container_title('Base Permissions') }}
{{ permissions_table(perms) }} {{ permissions_table(perms) }}
</div> </div>
{% endblock %} {% endblock %}

View file

@ -1,9 +1,10 @@
{% extends 'manage/users/master.twig' %} {% extends 'manage/users/master.twig' %}
{% from 'macros.twig' import container_title %}
{% from 'manage/macros.twig' import permissions_table %} {% from 'manage/macros.twig' import permissions_table %}
{% block manage_content %} {% block manage_content %}
<div class="container"> <div class="container">
<div class="container__title">{{ forum is defined ? forum.forum_name ~ ' ' : '' }}Permissions for {{ role.role_name }}</div> {{ container_title((forum is defined ? forum.forum_name ~ ' ' : '') ~ 'Permissions for ' ~ role.role_name) }}
{{ permissions_table(perms) }} {{ permissions_table(perms) }}
</div> </div>
{% endblock %} {% endblock %}

View file

@ -1,8 +1,10 @@
{% extends 'manage/general/master.twig' %} {% extends 'manage/general/master.twig' %}
{% from 'macros.twig' import container_title %}
{% block manage_content %} {% block manage_content %}
<div class="container"> <div class="container">
<div class="container__title">Overview</div> {{ container_title('Overview') }}
<div class="container__content"> <div class="container__content">
<p>Welcome to Manage, here you can manage things.</p> <p>Welcome to Manage, here you can manage things.</p>
<p>Please teach me how to give a shit about management panel. -flashwave</p> <p>Please teach me how to give a shit about management panel. -flashwave</p>

View file

@ -1,10 +1,10 @@
{% extends 'manage/general/master.twig' %} {% extends 'manage/general/master.twig' %}
{% from 'home/macros.twig' import chat_quote_display %} {% from 'home/macros.twig' import chat_quote_display %}
{% from 'macros.twig' import pagination %} {% from 'macros.twig' import pagination, container_title %}
{% block manage_content %} {% block manage_content %}
<div class="container"> <div class="container">
<div class="container__title">Quotes</div> {{ container_title('Quotes') }}
{% if current_quote is defined %} {% if current_quote is defined %}
<form method="post" action=""> <form method="post" action="">
@ -62,7 +62,7 @@
{% for parent in quote_parents %} {% for parent in quote_parents %}
<div class="container"> <div class="container">
<a href="?v=quotes&amp;s={{ parent.quote_id }}" class="container__title container__title--link">{{ parent.quote_timestamp|date('Y-m-d') }}</a> {{ container_title(parent.quote_timestamp|date('Y-m-d'), '?v=quotes&s=' ~ parent.quote_id) }}
{{ chat_quote_display([parent]) }} {{ chat_quote_display([parent]) }}
</div> </div>
{% endfor %} {% endfor %}

View file

@ -1,8 +1,9 @@
{% macro manage_navigation(nav) %} {% macro manage_navigation(nav) %}
{% from 'macros.twig' import container_title %}
{% for name, value in nav %} {% for name, value in nav %}
<div class="container manage__navigation"> <div class="container manage__navigation">
<div class="container__title">{{ name }}</div> {{ container_title(name) }}
<div class="manage__navigation__links"> <div class="manage__navigation__links">
{% for title, link in value %} {% for title, link in value %}

View file

@ -1,5 +1,7 @@
{% extends 'master.twig' %} {% extends 'master.twig' %}
{% from 'macros.twig' import container_title %}
{% from 'manage/macros.twig' import manage_navigation %} {% from 'manage/macros.twig' import manage_navigation %}
{% set title = 'Broom Closet' %} {% set title = 'Broom Closet' %}
{% block content %} {% block content %}
@ -11,7 +13,7 @@
<div class="manage__content"> <div class="manage__content">
{% block manage_content %} {% block manage_content %}
<div class="container"> <div class="container">
<div class="container__title">No brooms</div> {{ container_title('No brooms') }}
<div class="container__content"> <div class="container__content">
This broom closet is empty. This broom closet is empty.
</div> </div>

View file

@ -1,9 +1,9 @@
{% extends 'manage/news/master.twig' %} {% extends 'manage/news/master.twig' %}
{% from 'macros.twig' import pagination %} {% from 'macros.twig' import pagination, container_title %}
{% block manage_content %} {% block manage_content %}
<div class="container"> <div class="container">
<div class="container__title">Categories</div> {{ container_title('Categories') }}
<a href="?v=category" class="input__button">New Category</a> <a href="?v=category" class="input__button">New Category</a>

View file

@ -1,10 +1,11 @@
{% extends 'manage/news/master.twig' %} {% extends 'manage/news/master.twig' %}
{% from 'macros.twig' import container_title %}
{% set is_new = category|length < 1 %} {% set is_new = category|length < 1 %}
{% block manage_content %} {% block manage_content %}
<form method="post" action="" class="container"> <form method="post" action="" class="container">
<div class="container__title">{{ is_new ? 'New Category' : 'Editing ' ~ category.category_name }}</div> {{ container_title(is_new ? 'New Category' : 'Editing ' ~ category.category_name) }}
{{ 'news_category'|csrf|raw }} {{ 'news_category'|csrf|raw }}
<input type="hidden" name="category[id]" value="{{ category.category_id|default(0) }}"> <input type="hidden" name="category[id]" value="{{ category.category_id|default(0) }}">

View file

@ -1,10 +1,11 @@
{% extends 'manage/news/master.twig' %} {% extends 'manage/news/master.twig' %}
{% from 'macros.twig' import container_title %}
{% set is_new = post|length < 1 %} {% set is_new = post|length < 1 %}
{% block manage_content %} {% block manage_content %}
<form method="post" action="" class="container"> <form method="post" action="" class="container">
<div class="container__title">{{ is_new ? 'New Post' : 'Editing ' ~ post.post_title }}</div> {{ container_title(is_new ? 'New Post' : 'Editing ' ~ post.post_title) }}
{{ 'news_post'|csrf|raw }} {{ 'news_post'|csrf|raw }}
<input type="hidden" name="post[id]" value="{{ post.post_id|default(0) }}"> <input type="hidden" name="post[id]" value="{{ post.post_id|default(0) }}">

View file

@ -1,9 +1,9 @@
{% extends 'manage/news/master.twig' %} {% extends 'manage/news/master.twig' %}
{% from 'macros.twig' import pagination %} {% from 'macros.twig' import pagination, container_title %}
{% block manage_content %} {% block manage_content %}
<div class="container"> <div class="container">
<div class="container__title">News Posts</div> {{ container_title('News Posts') }}
<a href="?v=post" class="input__button">New Post</a> <a href="?v=post" class="input__button">New Post</a>

View file

@ -1,18 +1,13 @@
{% extends 'manage/users/master.twig' %} {% extends 'manage/users/master.twig' %}
{% from 'macros.twig' import container_title %}
{% from 'manage/macros.twig' import permissions_table %} {% from 'manage/macros.twig' import permissions_table %}
{% block manage_content %} {% block manage_content %}
<form action="?v=role{{ edit_role is defined ? '&r=' ~ edit_role.role_id : '' }}" method="post"> <form action="?v=role{{ edit_role is defined ? '&r=' ~ edit_role.role_id : '' }}" method="post"{% if edit_role is defined %} style="{{ edit_role.role_colour|html_colour('--accent-colour') }}"{% endif %}>
{{ 'users_role'|csrf|raw }} {{ 'users_role'|csrf|raw }}
<div class="container"> <div class="container">
<h1 class="container__title"> {{ container_title(edit_role is defined ? 'Editing ' ~ edit_role.role_name ~ ' (' ~ edit_role.role_id ~ ')' : 'Creating a new role') }}
{% if edit_role is defined %}
Editing <span style="{{ edit_role.role_colour|html_colour }}">{{ edit_role.role_name }}</span> ({{ edit_role.role_id }})
{% else %}
Creating a new Role
{% endif %}
</h1>
<label class="form__label"> <label class="form__label">
<div class="form__label__text">Role Name</div> <div class="form__label__text">Role Name</div>
@ -45,7 +40,7 @@
</div> </div>
<div class="container"> <div class="container">
<div class="container__title">Colour</div> {{ container_title('Colour') }}
<label class="form__label"> <label class="form__label">
<div class="form__label__text">Inherit Colour</div> <div class="form__label__text">Inherit Colour</div>
@ -78,7 +73,7 @@
</div> </div>
<div class="container"> <div class="container">
<div class="container__title">Additional</div> {{ container_title('Additional') }}
<label class="form__label"> <label class="form__label">
<div class="form__label__text">Description</div> <div class="form__label__text">Description</div>
@ -90,7 +85,7 @@
{% if can_manage_perms %} {% if can_manage_perms %}
<div class="container"> <div class="container">
<div class="container__title">Permissions</div> {{ container_title('Permissions') }}
{{ permissions_table(permissions) }} {{ permissions_table(permissions) }}
</div> </div>
{% endif %} {% endif %}

View file

@ -1,17 +1,16 @@
{% extends 'manage/users/master.twig' %} {% extends 'manage/users/master.twig' %}
{% from 'macros.twig' import container_title %}
{% from 'manage/macros.twig' import permissions_table %} {% from 'manage/macros.twig' import permissions_table %}
{% set site_link = '/profile.php?u=' ~ view_user.user_id %} {% set site_link = '/profile.php?u=' ~ view_user.user_id %}
{% block manage_content %} {% block manage_content %}
{% if can_manage_users %} {% if can_manage_users %}
<form method="post" enctype="multipart/form-data" action=""> <form method="post" enctype="multipart/form-data" action=""{% if view_user is defined %} style="{{ view_user.user_colour|html_colour('--accent-colour') }}"{% endif %}>
{{ 'users_edit'|csrf|raw }} {{ 'users_edit'|csrf|raw }}
<div class="container"> <div class="container">
<div class="container__title"> {{ container_title('Viewing ' ~ view_user.username ~ ' (' ~ view_user.user_id ~ ')') }}
Viewing <span style="{{ view_user.colour|html_colour }}">{{ view_user.username }}</span> ({{ view_user.user_id }})
</div>
<label class="form__label"> <label class="form__label">
<div class="form__label__text">Username</div> <div class="form__label__text">Username</div>
@ -71,7 +70,7 @@
</div> </div>
<div class="container"> <div class="container">
<div class="container__title">Avatar</div> {{ container_title('Avatar') }}
<label class="form__label"> <label class="form__label">
<div class="form__label__text">New Avatar</div> <div class="form__label__text">New Avatar</div>
@ -89,7 +88,7 @@
</div> </div>
<div class="container"> <div class="container">
<div class="container__title">Password</div> {{ container_title('Password') }}
<label class="form__label"> <label class="form__label">
<div class="form__label__text">New Password</div> <div class="form__label__text">New Password</div>
@ -107,7 +106,7 @@
</div> </div>
<div class="container"> <div class="container">
<div class="container__title">Colour</div> {{ container_title('Colour') }}
{% set colour_is_defined = view_user is defined and view_user.user_colour is not null and not view_user.user_colour|colour_get_inherit %} {% set colour_is_defined = view_user is defined and view_user.user_colour is not null and not view_user.user_colour|colour_get_inherit %}
@ -142,7 +141,7 @@
{% if can_manage_perms %} {% if can_manage_perms %}
<div class="container"> <div class="container">
<div class="container__title">Permissions</div> {{ container_title('Permissions') }}
{{ permissions_table(permissions) }} {{ permissions_table(permissions) }}
</div> </div>
{% endif %} {% endif %}
@ -154,7 +153,8 @@
{% if can_manage_users %} {% if can_manage_users %}
{% if has_roles|length > 0 %} {% if has_roles|length > 0 %}
<form method="post" action="" class="container"> <form method="post" action="" class="container">
<div class="container__title">Manage Roles</div> {{ container_title('Manage Roles') }}
<div class="container__content"> <div class="container__content">
{{ 'users_edit'|csrf|raw }} {{ 'users_edit'|csrf|raw }}
@ -179,7 +179,8 @@
{% if available_roles|length > 0 %} {% if available_roles|length > 0 %}
<form method="post" action="" class="container"> <form method="post" action="" class="container">
<div class="container__title">Add Role</div> {{ container_title('Add role') }}
<div class="container__content"> <div class="container__content">
<label class="form__label"> <label class="form__label">
<div class="form__label__text">Available Roles</div> <div class="form__label__text">Available Roles</div>

View file

@ -9,25 +9,20 @@
{% if site_background_url is defined %} {% if site_background_url is defined %}
<style> <style>
:root { :root {
--site-background-image: url('{{ site_background_url|raw }}'); --background-image: url('{{ site_background_url|raw }}');
} }
</style> </style>
{% endif %} {% endif %}
</head> </head>
<body <body
class="main {{ use_legacy_style|default(false) ? 'main--legacy' : 'main--default' }}{% if current_user.user_background_settings is defined %} {{ current_user.user_background_settings|bg_settings('main--bg-%s')|join(' ') }}{% endif %}" class="main main--default{% if current_user.user_background_settings is defined %} {{ current_user.user_background_settings|bg_settings('main--bg-%s')|join(' ') }}{% endif %}"
style="{% if global_accent_colour is defined %}{{ global_accent_colour|html_colour('--accent-colour') }}{% endif %}"> style="{% if global_accent_colour is defined %}{{ global_accent_colour|html_colour('--accent-colour') }}{% endif %}">
{% include '_layout/header.twig' %} {% include '_layout/header.twig' %}
<div class="main__wrapper"> <div class="main__wrapper">
{% block content %} {% block content %}
<div class="container"> This page has no content!
<div class="container__title">Hello!</div>
<div class="container__content">
This page has no content!
</div>
</div>
{% endblock %} {% endblock %}
</div> </div>

View file

@ -1,5 +1,5 @@
{% extends 'news/master.twig' %} {% extends 'news/master.twig' %}
{% from 'macros.twig' import pagination %} {% from 'macros.twig' import pagination, container_title %}
{% from 'news/macros.twig' import news_preview %} {% from 'news/macros.twig' import news_preview %}
{% set title = category.category_name ~ ' :: News' %} {% set title = category.category_name ~ ' :: News' %}
@ -19,9 +19,8 @@
<div class="news__sidebar"> <div class="news__sidebar">
<div class="container news__list"> <div class="container news__list">
<div class="container__title news__container__title"> {{ container_title('News » ' ~ category.category_name) }}
News » {{ category.category_name }}
</div>
<div class="container__content"> <div class="container__content">
{{ category.category_description|length > 0 ? category.category_description : '' }} {{ category.category_description|length > 0 ? category.category_description : '' }}
</div> </div>
@ -29,9 +28,8 @@
{% if featured|length > 0 %} {% if featured|length > 0 %}
<div class="container news__list"> <div class="container news__list">
<div class="container__title"> {{ container_title('Featured Posts') }}
Featured Posts
</div>
<div class="container__content"> <div class="container__content">
{% for featured_post in featured %} {% for featured_post in featured %}
<a class="news__list__item" href="/news.php?p={{ featured_post.post_id }}">{{ featured_post.post_title }}</a> <a class="news__list__item" href="/news.php?p={{ featured_post.post_id }}">{{ featured_post.post_title }}</a>

View file

@ -1,5 +1,5 @@
{% extends 'news/master.twig' %} {% extends 'news/master.twig' %}
{% from 'macros.twig' import pagination %} {% from 'macros.twig' import pagination, container_title %}
{% from 'news/macros.twig' import news_preview %} {% from 'news/macros.twig' import news_preview %}
{% set title = 'News' %} {% set title = 'News' %}
@ -16,9 +16,8 @@
<div class="news__sidebar"> <div class="news__sidebar">
<div class="container news__list"> <div class="container news__list">
<div class="container__title"> {{ container_title('Categories') }}
Categories
</div>
<div class="container__content"> <div class="container__content">
{% for category in categories %} {% for category in categories %}
<a class="news__list__item news__list__item--kvp" href="/news.php?c={{ category.category_id }}"> <a class="news__list__item news__list__item--kvp" href="/news.php?c={{ category.category_id }}">

View file

@ -1,8 +1,8 @@
{% macro news_preview(post) %} {% macro news_preview(post) %}
{% from 'macros.twig' import container_title %}
<div class="container news__preview"> <div class="container news__preview">
<a href="/news.php?p={{ post.post_id }}" class="container__title container__title--link"> {{ container_title(post.post_title, '/news.php?p=' ~ post.post_id) }}
{{ post.post_title }}
</a>
<div class="news__preview__container"> <div class="news__preview__container">
<div class="news__preview__content"> <div class="news__preview__content">

View file

@ -1,4 +1,5 @@
{% extends 'news/master.twig' %} {% extends 'news/master.twig' %}
{% from 'macros.twig' import container_title %}
{% from '_layout/comments.twig' import comments_section %} {% from '_layout/comments.twig' import comments_section %}
{% set title = post.post_title ~ ' :: News' %} {% set title = post.post_title ~ ' :: News' %}
@ -7,10 +8,7 @@
{% block content %} {% block content %}
<div class="container news__post"> <div class="container news__post">
<div class="container__title"> {{ container_title(post.post_title) }}
<a href="/news.php?c={{ post.category_id }}" class="container__title__link">{{ post.category_name }}</a> »
{{ post.post_title }}
</div>
<div class="news__post__content"> <div class="news__post__content">
<div class="news__post__text"> <div class="news__post__text">
@ -57,9 +55,7 @@
{% if comments is defined %} {% if comments is defined %}
<div class="container"> <div class="container">
<div class="container__title"> {{ container_title('Comments') }}
Comments
</div>
{{ comments_section(comments, comments_category, current_user|default(null), comments_perms) }} {{ comments_section(comments, comments_category, current_user|default(null), comments_perms) }}
</div> </div>
{% endif %} {% endif %}

View file

@ -1,4 +1,5 @@
{% extends 'settings/master.twig' %} {% extends 'settings/master.twig' %}
{% from 'macros.twig' import container_title %}
{% if user_has_background %} {% if user_has_background %}
{% set site_background_url = '/profile.php?m=background&u=' ~ settings_user_id %} {% set site_background_url = '/profile.php?m=background&u=' ~ settings_user_id %}
@ -12,7 +13,8 @@
</div>#} </div>#}
<div class="container container--translucent"> <div class="container container--translucent">
<div class="container__title">Account</div> {{ container_title('Account') }}
<form action="" method="post" class="settings__account"> <form action="" method="post" class="settings__account">
{{ 'settings'|csrf|raw }} {{ 'settings'|csrf|raw }}
@ -133,7 +135,8 @@
{% if settings_perms.edit_avatar %} {% if settings_perms.edit_avatar %}
<div class="container container--translucent"> <div class="container container--translucent">
<div class="container__title">Avatar</div> {{ container_title('Avatar') }}
<form action="" method="post" class="settings__images" enctype="multipart/form-data"> <form action="" method="post" class="settings__images" enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="{{ background.max_size }}"> <input type="hidden" name="MAX_FILE_SIZE" value="{{ background.max_size }}">
{{ 'settings'|csrf|raw }} {{ 'settings'|csrf|raw }}
@ -204,7 +207,8 @@
{% if settings_perms.edit_background %} {% if settings_perms.edit_background %}
<div class="container container--translucent"> <div class="container container--translucent">
<div class="container__title">Background</div> {{ container_title('Background') }}
<form action="" method="post" class="settings__images" enctype="multipart/form-data"> <form action="" method="post" class="settings__images" enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="{{ background.max_size }}"> <input type="hidden" name="MAX_FILE_SIZE" value="{{ background.max_size }}">
{{ 'settings'|csrf|raw }} {{ 'settings'|csrf|raw }}
@ -276,7 +280,7 @@
url = url || "/profile.php?u={{ settings_user_id }}&m=background"; url = url || "/profile.php?u={{ settings_user_id }}&m=background";
previewEl = previewEl || document.body; previewEl = previewEl || document.body;
nameEl = nameEl || document.getElementById('background-name'); nameEl = nameEl || document.getElementById('background-name');
previewEl.style.setProperty('--site-background-image', 'url(\'{0}\')'.replace('{0}', url)); previewEl.style.setProperty('--background-image', 'url(\'{0}\')'.replace('{0}', url));
nameEl.textContent = name; nameEl.textContent = name;
} }
@ -288,9 +292,7 @@
{% if settings_perms.edit_about %} {% if settings_perms.edit_about %}
<div class="container container--translucent"> <div class="container container--translucent">
<div class="container__title"> {{ container_title('About') }}
About
</div>
<form method="post" action="" enctype="multipart/form-data" class="settings__about"> <form method="post" action="" enctype="multipart/form-data" class="settings__about">
{{ 'settings'|csrf|raw }} {{ 'settings'|csrf|raw }}

View file

@ -1,5 +1,5 @@
{% extends 'settings/master.twig' %} {% extends 'settings/master.twig' %}
{% from 'macros.twig' import pagination %} {% from 'macros.twig' import pagination, container_title %}
{% set alpagination = pagination( {% set alpagination = pagination(
audit_log_count, audit_log_count,
@ -22,7 +22,7 @@
{% block settings_content %} {% block settings_content %}
<div class="container"> <div class="container">
<div class="container__title">Login History</div> {{ container_title('Login History') }}
<div class="settings__login-history"> <div class="settings__login-history">
<div class="settings__description"> <div class="settings__description">
@ -81,7 +81,7 @@
</div> </div>
<div class="container"> <div class="container">
<div class="container__title">Account Log</div> {{ container_title('Account Log') }}
<div class="settings__log"> <div class="settings__log">
<div class="settings__description"> <div class="settings__description">

View file

@ -1,5 +1,5 @@
{% extends 'master.twig' %} {% extends 'master.twig' %}
{% from 'macros.twig' import navigation %} {% from 'macros.twig' import navigation, container_title %}
{% set title = 'Settings » ' ~ settings_title %} {% set title = 'Settings » ' ~ settings_title %}
@ -9,7 +9,8 @@
{% block settings_container %} {% block settings_container %}
{% if settings_errors is defined and settings_errors|length > 0 %} {% if settings_errors is defined and settings_errors|length > 0 %}
<div class="container"> <div class="container">
<div class="container__title">Information</div> {{ container_title('Information') }}
<div class="container__content"> <div class="container__content">
<ul class="settings__errors"> <ul class="settings__errors">
{% for error in settings_errors %} {% for error in settings_errors %}
@ -22,7 +23,8 @@
{% block settings_content %} {% block settings_content %}
<div class="container"> <div class="container">
<div class="container__title">{{ title }}</div> {{ container_title(title) }}
<div class="container__content"> <div class="container__content">
This is a blank settings page. This is a blank settings page.
</div> </div>

View file

@ -1,11 +1,11 @@
{% extends 'settings/master.twig' %} {% extends 'settings/master.twig' %}
{% from 'macros.twig' import pagination %} {% from 'macros.twig' import pagination, container_title %}
{% set spagination = pagination(sessions_count, sessions_take, sessions_offset, '?m=sessions', 'settings__') %} {% set spagination = pagination(sessions_count, sessions_take, sessions_offset, '?m=sessions', 'settings__') %}
{% block settings_content %} {% block settings_content %}
<div class="container"> <div class="container">
<div class="container__title">Sessions</div> {{ container_title('Sessions') }}
<div class="settings__sessions"> <div class="settings__sessions">
<div class="settings__description"> <div class="settings__description">

View file

@ -1,5 +1,5 @@
{% extends 'user/master.twig' %} {% extends 'user/master.twig' %}
{% from 'macros.twig' import pagination %} {% from 'macros.twig' import pagination, container_title %}
{% from 'user/macros.twig' import user_card %} {% from 'user/macros.twig' import user_card %}
{% set canonical_url = '/members.php'|url_construct({ {% set canonical_url = '/members.php'|url_construct({
@ -18,10 +18,9 @@
{% set manage_link = '/manage/users.php?v=listing' %} {% set manage_link = '/manage/users.php?v=listing' %}
{% block content %} {% block content %}
<form class="container" onchange="this.submit()"> <form class="container" onchange="this.submit()" style="{{ role.role_colour|html_colour('--accent-colour') }}">
<div class="container__title"> {{ container_title('Member Listing') }}
Member Listing
</div>
<div class="userlist__selection"> <div class="userlist__selection">
<select class="input__select" name="r" <select class="input__select" name="r"
style="{{ role.role_colour|html_colour('color') }}"> style="{{ role.role_colour|html_colour('color') }}">

View file

@ -1,10 +1,12 @@
{% extends 'user/master.twig' %} {% extends 'user/master.twig' %}
{% from 'macros.twig' import container_title %}
{% set title = 'User not found!' %} {% set title = 'User not found!' %}
{% block content %} {% block content %}
<div class="container"> <div class="container">
<div class="container__title">User not found!</div> {{ container_title('User not found!') }}
<div class="container__content"> <div class="container__content">
<p>Check the url and try again.</p> <p>Check the url and try again.</p>
</div> </div>

View file

@ -1,4 +1,5 @@
{% extends 'user/master.twig' %} {% extends 'user/master.twig' %}
{% from 'macros.twig' import container_title %}
{% set image = '/profile.php?u=' ~ profile.user_id ~ '&m=avatar' %} {% set image = '/profile.php?u=' ~ profile.user_id ~ '&m=avatar' %}
{% set canonical_url = '/profile.php?u=' ~ profile.user_id %} {% set canonical_url = '/profile.php?u=' ~ profile.user_id %}
@ -119,9 +120,8 @@
</div> </div>
{% elseif is_editing ? perms.edit_profile : profile_fields|default([])|length > 0 %} {% elseif is_editing ? perms.edit_profile : profile_fields|default([])|length > 0 %}
<div class="container"> <div class="container">
<div class="container__title"> {{ container_title('Elsewhere') }}
Elsewhere
</div>
<div class="profile__accounts"> <div class="profile__accounts">
{% for name, data in profile_fields %} {% for name, data in profile_fields %}
<label class="profile__accounts__item"> <label class="profile__accounts__item">
@ -150,12 +150,10 @@
</div> </div>
<div class="profile__container__main"> <div class="profile__container__main">
{% if (is_editing and perms.edit_about) or profile.user_about_content|length > 0 %} {% if (is_editing and perms.edit_about) or profile.user_about_content|length > 0 %}
<div class="container profile__about" id="about"> <div class="container profile__about" id="about">
<div class="container__title profile__about__title"> {{ container_title('About ' ~ profile.username) }}
About {{ profile.username }}
</div>
<div class="profile__about__content{% if is_editing %} profile__about__content--edit{% endif %}"> <div class="profile__about__content{% if is_editing %} profile__about__content--edit{% endif %}">
{% if is_editing %} {% if is_editing %}
<select name="about[parser]" class="input__select profile__about__select"> <select name="about[parser]" class="input__select profile__about__select">

View file

@ -1,9 +1,4 @@
<?php <?php
function use_legacy_style(): void
{
tpl_var('use_legacy_style', true);
}
function set_cookie_m(string $name, string $value, int $expires): void function set_cookie_m(string $name, string $value, int $expires): void
{ {
setcookie( setcookie(