getting somewhere
This commit is contained in:
parent
48a34095e1
commit
ce06bc9d68
24 changed files with 220 additions and 436 deletions
|
@ -1,24 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Holds the notifications section controller.
|
||||
* @package Sakura
|
||||
*/
|
||||
|
||||
namespace Sakura\Controllers\Settings;
|
||||
|
||||
/**
|
||||
* Notification settings.
|
||||
* @package Sakura
|
||||
* @author Julian van de Groep <me@flash.moe>
|
||||
*/
|
||||
class NotificationsController extends Controller
|
||||
{
|
||||
/**
|
||||
* Get the notification history.
|
||||
* @return string
|
||||
*/
|
||||
public function history()
|
||||
{
|
||||
return view('settings/notifications/history');
|
||||
}
|
||||
}
|
34
resources/assets/less/yuuno/bem/friend-box.less
Normal file
34
resources/assets/less/yuuno/bem/friend-box.less
Normal file
|
@ -0,0 +1,34 @@
|
|||
.friend-box {
|
||||
display: inline-block;
|
||||
color: #000;
|
||||
border: 1px solid #9475B2;
|
||||
text-align: center;
|
||||
width: 200px;
|
||||
margin: 4px 0;
|
||||
border-radius: 3px;
|
||||
box-shadow: inset 0 0 1px #9475B2;
|
||||
background: #E4CFFF;
|
||||
text-decoration: none !important;
|
||||
transition: background .2s, box-shadow .2s;
|
||||
|
||||
&:hover {
|
||||
background: #C2AFFE;
|
||||
box-shadow: inset 0 0 2px #9475B2;
|
||||
}
|
||||
|
||||
&:active {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
&__name {
|
||||
font-size: 1.2em;
|
||||
line-height: 1.5em;
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
|
||||
&__avatar {
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
|
@ -23,6 +23,19 @@
|
|||
background: linear-gradient(0deg, #A586C3, #D3BFFF);
|
||||
}
|
||||
|
||||
&--danger {
|
||||
background: repeating-linear-gradient(-45deg, #B33, #B33 10px, #B00 10px, #B00 20px);
|
||||
color: #fff;
|
||||
border: 1px solid #C00;
|
||||
box-shadow: 0 0 3px #C00, inset 0 0 3px #C00;
|
||||
|
||||
&:hover,
|
||||
&:active {
|
||||
color: #fff !important;
|
||||
background: repeating-linear-gradient(-45deg, #B00, #B00 10px, #B33 10px, #B33 20px) !important;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: #306;
|
||||
background: linear-gradient(0deg, #9475B2 30%, #C2AFFE 70%);
|
||||
|
|
61
resources/assets/less/yuuno/bem/settings.less
Normal file
61
resources/assets/less/yuuno/bem/settings.less
Normal file
|
@ -0,0 +1,61 @@
|
|||
.settings {
|
||||
&--left {
|
||||
width: 850px;
|
||||
}
|
||||
|
||||
&--right {
|
||||
width: 174px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
&__navigation {
|
||||
&-header {
|
||||
background: #C2AFFE;
|
||||
padding: 4px;
|
||||
margin: -1px -2px;
|
||||
font-weight: 700;
|
||||
display: block;
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
&-link {
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
line-height: 25px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
}
|
||||
|
||||
&__explanation {
|
||||
font-size: 11px;
|
||||
line-height: 18px;
|
||||
padding: 7px;
|
||||
border-bottom: 1px solid #C2AFFE;
|
||||
margin-bottom: 7px;
|
||||
}
|
||||
|
||||
&__table {
|
||||
width: 100%;
|
||||
border-spacing: 0;
|
||||
|
||||
&-head {
|
||||
font-size: 17px;
|
||||
background: #C2AFFE;
|
||||
padding: 4px;
|
||||
margin: -1px -2px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
&-column {
|
||||
border-top: 1px solid #C2AFFE;
|
||||
}
|
||||
|
||||
&-row {
|
||||
text-align: center;
|
||||
|
||||
&--current {
|
||||
background: #B39EED;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
16
resources/assets/less/yuuno/bem/sidepanel-table.less
Normal file
16
resources/assets/less/yuuno/bem/sidepanel-table.less
Normal file
|
@ -0,0 +1,16 @@
|
|||
.sidepanel-table {
|
||||
width: 100%;
|
||||
font-size: .8em;
|
||||
line-height: 1.5em;
|
||||
border-spacing: 1px;
|
||||
|
||||
&__head {
|
||||
background: #9475B2;
|
||||
color: #306;
|
||||
}
|
||||
|
||||
&__column {
|
||||
padding: 0 2px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
|
@ -1,222 +1,6 @@
|
|||
/*
|
||||
* Friends section
|
||||
*/
|
||||
.profile-friends {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.profile-friends > div:not(:last-child) {
|
||||
display: inline-block;
|
||||
border: 1px solid #9475B2;
|
||||
text-align: center;
|
||||
width: 200px;
|
||||
margin: 4px 0;
|
||||
border-radius: 3px;
|
||||
box-shadow: inset 0 0 1px #9475B2;
|
||||
background: #E4CFFF;
|
||||
transition: background .2s, box-shadow .2s;
|
||||
}
|
||||
|
||||
.profile-friends > div:not(:last-child):hover {
|
||||
background: #C2AFFE;
|
||||
box-shadow: inset 0 0 2px #9475B2;
|
||||
}
|
||||
|
||||
.profile-friends > div > .friends-list-data {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.profile-friends > div > .friends-list-data > .friends-list-name {
|
||||
font-size: 1.2em;
|
||||
line-height: 1.5em;
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
|
||||
/*
|
||||
* Panel table
|
||||
*/
|
||||
.panelTable {
|
||||
width: 100%;
|
||||
font-size: .8em;
|
||||
line-height: 1.5em;
|
||||
border-spacing: 1px;
|
||||
}
|
||||
|
||||
.panelTable th {
|
||||
background: #9475B2;
|
||||
color: #306;
|
||||
}
|
||||
|
||||
.panelTable td:first-child {
|
||||
padding: 0 2px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.panelTable .warning td {
|
||||
background: #A22;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.panelTable .silence td {
|
||||
background: #A22;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.panelTable .restriction td {
|
||||
background: #822;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.panelTable .ban td {
|
||||
background: #444;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.panelTable .abyss td {
|
||||
background: #888;
|
||||
}
|
||||
|
||||
/*
|
||||
* Settings page styling
|
||||
*/
|
||||
.settings ul > li {
|
||||
margin-left: 2em;
|
||||
list-style: square;
|
||||
}
|
||||
.settings .content-left {
|
||||
width: 850px;
|
||||
}
|
||||
.settings .content-right {
|
||||
width: 174px;
|
||||
text-align: right;
|
||||
}
|
||||
.settings .right-menu-nav > div {
|
||||
background: #C2AFFE;
|
||||
padding: 4px;
|
||||
margin: -1px -2px;
|
||||
font-weight: 700;
|
||||
display: block;
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
.settings .right-menu-nav > a {
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
line-height: 25px;
|
||||
color: #22E;
|
||||
text-decoration: none;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.settings .right-menu-nav > a:hover {
|
||||
color: #22E;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.settings .right-menu-nav > a:active {
|
||||
color: #E22;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.settings .settings-explanation {
|
||||
font-size: 11px;
|
||||
line-height: 18px;
|
||||
padding: 7px;
|
||||
border-bottom: 1px solid #C2AFFE;
|
||||
margin-bottom: 7px;
|
||||
}
|
||||
|
||||
.settings .settings-table {
|
||||
width: 100%;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
.settings .settings-table tr > th {
|
||||
font-size: 17px;
|
||||
background: #C2AFFE;
|
||||
padding: 4px;
|
||||
margin: -1px -2px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.settings .settings-table tr > td {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.settings .settings-table > tbody > tr:not(:last-child) > td {
|
||||
border-bottom: 1px solid #C2AFFE;
|
||||
}
|
||||
|
||||
.settings .settings-table tr.current-session > td {
|
||||
background: #B39EED;
|
||||
}
|
||||
|
||||
.settings .profile-field {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.settings .profile-save {
|
||||
text-align: center;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.settings .background-frame {
|
||||
max-width: 600px;
|
||||
max-height: 400px;
|
||||
border: 3px solid #EEE;
|
||||
background: #EEE;
|
||||
box-shadow: 0 3px 7px #888;
|
||||
border-radius: 3px;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.settings form {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.settings .notification-history > a {
|
||||
border: 1px solid #507;
|
||||
margin: 5px;
|
||||
background: rgba(113, 74, 150, .3);
|
||||
display: block;
|
||||
}
|
||||
|
||||
.settings .notification-history > a > .notif-hist-icon {
|
||||
float: left;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
text-align: center;
|
||||
background: rgba(0, 0, 0, .5);
|
||||
display: block;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.settings .notification-history > a > .notif-hist-icon > .font-icon {
|
||||
margin: .34em 0;
|
||||
}
|
||||
|
||||
.settings .notification-history > a > .notif-hist-content > .notif-hist-time {
|
||||
font-style: italic;
|
||||
text-align: right;
|
||||
float: right;
|
||||
margin-right: 6px;
|
||||
font-size: .8em;
|
||||
}
|
||||
|
||||
.settings .notification-history > a > .notif-hist-content > .notif-hist-inside {
|
||||
float: left;
|
||||
margin-left: 2px;
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
.settings .notification-history > a > .notif-hist-content > .notif-hist-inside > .notif-hist-title {
|
||||
font-family: "Open Sans", sans-serif;
|
||||
font-weight: 300;
|
||||
font-size: 1.7em;
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
.settings .friends-list {
|
||||
text-align: center;
|
||||
}
|
||||
|
@ -324,7 +108,6 @@
|
|||
}
|
||||
|
||||
@media (max-width: 1064px) {
|
||||
|
||||
.settings .friends-list > div:not(:last-child) {
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
@ -333,11 +116,9 @@
|
|||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.settings .friends-list > div > .friends-list-actions,
|
||||
.settings .friends-list > form > .friends-list-actions {
|
||||
.settings .friends-list .friends-list-actions {
|
||||
display: block;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -376,7 +157,6 @@
|
|||
}
|
||||
|
||||
@media (min-width: 1064px) {
|
||||
|
||||
.support .featureBox.final {
|
||||
width: 818px;
|
||||
}
|
||||
|
@ -384,11 +164,9 @@
|
|||
.support .featureBox.final .featureBoxDesc {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media (max-width: 840px) {
|
||||
|
||||
.support .featureBox,
|
||||
.support .featureBox.final {
|
||||
width: 380px;
|
||||
|
@ -401,7 +179,6 @@
|
|||
.support .featureBox .right {
|
||||
display: none;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.support .featureBoxIcon.right {
|
||||
|
@ -437,46 +214,6 @@
|
|||
margin: 0 1px;
|
||||
}
|
||||
|
||||
.support table {
|
||||
width: 100%;
|
||||
border-spacing: 0;
|
||||
margin: 3px auto;
|
||||
}
|
||||
|
||||
.support table td,
|
||||
.support table th {
|
||||
padding: 4px 8px;
|
||||
}
|
||||
|
||||
.support table td {
|
||||
padding: 4px 8px;
|
||||
background: #C2AFFE;
|
||||
}
|
||||
|
||||
.support table th:nth-child(1) {
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.support table th:nth-child(2) {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.support table td:nth-child(2) {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.support table th:nth-child(3) {
|
||||
width: 65%;
|
||||
}
|
||||
|
||||
.support thead th {
|
||||
background: linear-gradient(0deg, #C2AFFE, transparent);
|
||||
}
|
||||
|
||||
.support tfoot th {
|
||||
background: linear-gradient(180deg, #C2AFFE, transparent);
|
||||
}
|
||||
|
||||
/*
|
||||
* Forum Styling
|
||||
*/
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
@import "bem/dialogue";
|
||||
@import "bem/dropdown";
|
||||
@import "bem/footer";
|
||||
@import "bem/friend-box";
|
||||
@import "bem/header";
|
||||
@import "bem/header-login";
|
||||
@import "bem/input";
|
||||
|
@ -24,6 +25,8 @@
|
|||
@import "bem/members";
|
||||
@import "bem/news";
|
||||
@import "bem/profile";
|
||||
@import "bem/settings";
|
||||
@import "bem/sidepanel-table";
|
||||
@import "bem/uploader";
|
||||
@import "bem/user";
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace Sakura
|
|||
public static Build(target: HTMLElement)
|
||||
{
|
||||
this.Client = new AJAX;
|
||||
this.Element = <HTMLDivElement>DOM.Create('table', 'changelog panelTable');
|
||||
this.Element = <HTMLDivElement>DOM.Create('table', 'changelog sidepanel-table');
|
||||
|
||||
this.Element.style.borderSpacing = '0 1px';
|
||||
|
||||
|
@ -55,7 +55,7 @@ namespace Sakura
|
|||
private static Add(changelog: IChangelogDate)
|
||||
{
|
||||
var header: HTMLTableRowElement = <HTMLTableRowElement>DOM.Create('tr', 'changelog__row changelog__row--header'),
|
||||
headerInner: HTMLTableHeaderCellElement = <HTMLTableHeaderCellElement>DOM.Create('th', 'changelog__header');
|
||||
headerInner: HTMLTableHeaderCellElement = <HTMLTableHeaderCellElement>DOM.Create('th', 'changelog__header sidepanel-table__head');
|
||||
|
||||
headerInner.innerText = changelog.date;
|
||||
headerInner.style.fontSize = '1.2em';
|
||||
|
@ -68,8 +68,8 @@ namespace Sakura
|
|||
{
|
||||
var change: IChangelogChange = changelog.changes[_i],
|
||||
row: HTMLTableRowElement = <HTMLTableRowElement>DOM.Create('tr', 'changelog__row'),
|
||||
action: HTMLTableCellElement = <HTMLTableCellElement>DOM.Create('td', 'changelog__column'),
|
||||
message: HTMLTableCellElement = <HTMLTableCellElement>DOM.Create('td', 'changelog__column');
|
||||
action: HTMLTableCellElement = <HTMLTableCellElement>DOM.Create('td', 'changelog__column sidepanel-table__column'),
|
||||
message: HTMLTableCellElement = <HTMLTableCellElement>DOM.Create('td', 'changelog__column sidepanel-table__column');
|
||||
|
||||
action.innerText = change.action.name;
|
||||
action.style.backgroundColor = this.Colours[change.action.id];
|
||||
|
@ -77,6 +77,7 @@ namespace Sakura
|
|||
|
||||
message.innerText = change.message;
|
||||
message.style.borderBottom = '1px solid ' + this.Colours[change.action.id];
|
||||
message.style.textAlign = 'left';
|
||||
|
||||
DOM.Append(row, action);
|
||||
DOM.Append(row, message);
|
||||
|
|
|
@ -18,9 +18,20 @@
|
|||
<div class="content__header content__header--alt">Online Users</div>
|
||||
{% if stats.onlineUsers %}
|
||||
All active users in the past 2 minutes
|
||||
<table class="panelTable">
|
||||
<table class="sidepanel-table">
|
||||
{% for amount,onlineUser in stats.onlineUsers %}
|
||||
<tr><td style="text-align: left;"><a href="{{ route('user.profile', onlineUser.id) }}" style="font-weight: bold; color: {{ onlineUser.colour }};">{{ onlineUser.username }}</a></td><td style="text-align: right;"><time class="time-ago" datetime="{{ onlineUser.lastOnline|date('r') }}">{{ onlineUser.lastOnline|date(config('general.date_format')) }}</time></td></tr>
|
||||
<tr>
|
||||
<td class="sidepanel-table__column" style="text-align: left;">
|
||||
<a href="{{ route('user.profile', onlineUser.id) }}" style="font-weight: bold; color: {{ onlineUser.colour }};">
|
||||
{{ onlineUser.username }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="sidepanel-table__column" style="text-align: right;">
|
||||
<time class="time-ago" datetime="{{ onlineUser.lastOnline|date('r') }}">
|
||||
{{ onlineUser.lastOnline|date(config('general.date_format')) }}
|
||||
</time>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
|
|
|
@ -7,36 +7,40 @@
|
|||
<div class="content--right">
|
||||
<div id="forumIndexPopularTopics">
|
||||
<div class="content__header content__header--alt">Popular topics</div>
|
||||
<table class="panelTable" style="border-spacing: 0;">
|
||||
<table class="sidepanel-table" style="border-spacing: 0;">
|
||||
<tr>
|
||||
<th>Title</th>
|
||||
<th>Last reply</th>
|
||||
<th class="sidepanel-table__head">Title</th>
|
||||
<th class="sidepanel-table__head">Last reply</th>
|
||||
</tr>
|
||||
{% for _t in activeTopics %}
|
||||
<tr {% if _t.unread(user.id) %}style="font-weight: bold;"{% endif %}>
|
||||
<td style="text-align: left; border-bottom: 1px solid #9475b2;">
|
||||
<td class="sidepanel-table__column" style="text-align: left; border-bottom: 1px solid #9475b2;">
|
||||
<a href="{{ route('forums.topic', _t.id) }}">{{ _t.title }}</a>
|
||||
</td>
|
||||
<td style="text-align: right; border-bottom: 1px solid #9475b2;"><time class="time-ago" datetime="{{ _t.lastPost.time|date('r') }}">{{ _t.lastPost.time|date(config('general.date_format')) }}</time></td>
|
||||
<td class="sidepanel-table__column" style="text-align: right; border-bottom: 1px solid #9475b2;"><time class="time-ago" datetime="{{ _t.lastPost.time|date('r') }}">{{ _t.lastPost.time|date(config('general.date_format')) }}</time></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
<div id="forumIndexNewPosts">
|
||||
<div class="content__header content__header--alt">Latest posts</div>
|
||||
<table class="panelTable" style="border-spacing: 0;">
|
||||
<table class="sidepanel-table" style="border-spacing: 0;">
|
||||
<tr>
|
||||
<th>Title & user</th>
|
||||
<th>Posted</th>
|
||||
<th class="sidepanel-table__head">Title & user</th>
|
||||
<th class="sidepanel-table__head">Posted</th>
|
||||
</tr>
|
||||
{% for _p in latestPosts %}
|
||||
<tr {% if _p.unread(user.id) %}style="font-weight: bold;"{% endif %}>
|
||||
<td style="text-align: left; border-bottom: 1px solid #9475b2;">
|
||||
<td class="sidepanel-table__column" style="text-align: left; border-bottom: 1px solid #9475b2;">
|
||||
<a href="{{ route('forums.post', _p.id) }}">{{ _p.subject }}</a>
|
||||
by
|
||||
<a href="{{ route('user.profile', _p.poster.id) }}"><span style="color: {{ _p.poster.colour }};">{{ _p.poster.username }}</span></a>
|
||||
</td>
|
||||
<td style="text-align: right; border-bottom: 1px solid #9475b2;"><time class="time-ago" datetime="{{ _p.time|date('r') }}">{{ _p.time|date(config('general.date_format')) }}</time></td>
|
||||
<td class="sidepanel-table__column" style="text-align: right; border-bottom: 1px solid #9475b2;">
|
||||
<time class="time-ago" datetime="{{ _p.time|date('r') }}">
|
||||
{{ _p.time|date(config('general.date_format')) }}
|
||||
</time>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
|
|
@ -8,18 +8,18 @@
|
|||
<div class="content__header content__header--alt">
|
||||
Navigation
|
||||
</div>
|
||||
<div class="right-menu-nav">
|
||||
<div class="settings__navigation">
|
||||
{% for name, links in navigation %}
|
||||
<div>{{ name }}</div>
|
||||
<div class="settings__navigation-header">{{ name }}</div>
|
||||
{% for name,link in links %}
|
||||
<a href="{{ link }}">{{ name }}</a>
|
||||
<a href="{{ link }}" class="settings__navigation-link">{{ name }}</a>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="content--left">
|
||||
<div class="content__header">{{ title }}</div>
|
||||
<div class="settings-explanation">{{ block('description') }}</div>
|
||||
<div class="settings__explanation">{{ block('description') }}</div>
|
||||
{{ block('manageContent') }}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
<div class="content__header content__header--alt">
|
||||
Frequently Asked Questions
|
||||
</div>
|
||||
<div class="right-menu-nav">
|
||||
{% for question in page.questions %}
|
||||
<a href="#{{ question.faq_shorthand }}">{{ question.faq_question }}</a>
|
||||
{% endfor %}
|
||||
<div class="settings__navigation">
|
||||
{% for question in page.questions %}
|
||||
<a href="#{{ question.faq_shorthand }}" class="settings__navigation-link">{{ question.faq_question }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="content--left">
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
<div class="profile__friends">
|
||||
{% if friends|length > 0 %}
|
||||
{% for friend in friends[get.page|default(1) - 1] %}
|
||||
<div class="friend-container" id="friendslist-friend-{{ friend.id }}">
|
||||
<a class="friends-list-data" href="{{ route('user.profile', friend.id) }}">
|
||||
<img src="{{ route('user.avatar', friend.id) }}" alt="{{ friend.username }}" class="friends-list-avatar avatar avatar--border" style="width: 150px; height: 150px;">
|
||||
<div class="friends-list-name" style="color: {{ friend.colour }};">{{ friend.username }}</div>
|
||||
</a>
|
||||
</div>
|
||||
<a class="friend-box" id="friendslist-friend-{{ friend.id }}" href="{{ route('user.profile', friend.id) }}">
|
||||
<div class="avatar avatar--border friend-box__avatar" style="background-image: url('{{ route('user.avatar', friend.id) }}')"></div>
|
||||
<div class="friend-box__name" style="color: {{ friend.colour }}">
|
||||
{{ friend.username }}
|
||||
</div>
|
||||
</a>
|
||||
{% endfor %}
|
||||
<div class="clear"></div>
|
||||
{% else %}
|
||||
|
|
|
@ -28,9 +28,7 @@
|
|||
<div><h2>Password</h2></div>
|
||||
<div><input type="password" name="password" placeholder="Must be at least decently strong, size doesn't matter" class="input__text"></div>
|
||||
</div>
|
||||
<div class="profile-save">
|
||||
<button value="{{ session_id() }}" name="session" class="input__button">Save</button>
|
||||
<button type="reset" class="input__button">Reset</button>
|
||||
</div>
|
||||
<button value="{{ session_id() }}" name="session" class="input__button">Save</button>
|
||||
<button type="reset" class="input__button">Reset</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
|
|
@ -141,9 +141,7 @@
|
|||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="profile-save">
|
||||
<button name="session" value="{{ session_id() }}" class="input__button">Save</button>
|
||||
<button type="reset" class="input__button">Reset</button>
|
||||
</div>
|
||||
<button name="session" value="{{ session_id() }}" class="input__button">Save</button>
|
||||
<button type="reset" class="input__button">Reset</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
|
|
@ -10,12 +10,12 @@
|
|||
<div class="bbcode" id="settingsPreview" style="max-height: 500px; overflow-y: auto; background: #C2AEEE; box-shadow: inset 0 0 1em 1em #D3BFFF;">{{ user.signature()|raw|nl2br }}</div>
|
||||
<hr>
|
||||
<form enctype="multipart/form-data" method="post" action="{{ route('settings.account.signature') }}">
|
||||
<div><textarea name="signature" id="settingsEditor" class="input__text" style="height: 400px;">{{ user.signature }}</textarea></div>
|
||||
<div class="profile-save">
|
||||
<button value="{{ session_id() }}" name="session" class="input__button">Save</button>
|
||||
<button type="reset" class="input__button">Reset</button>
|
||||
<button type="button" class="input__button" onclick="settingsPreview();">Preview</button>
|
||||
<div>
|
||||
<textarea name="signature" id="settingsEditor" class="input__text" style="height: 400px;">{{ user.signature }}</textarea>
|
||||
</div>
|
||||
<button value="{{ session_id() }}" name="session" class="input__button">Save</button>
|
||||
<button type="reset" class="input__button">Reset</button>
|
||||
<button type="button" class="input__button" onclick="settingsPreview();">Preview</button>
|
||||
</form>
|
||||
{% include 'settings/account/_preview.twig' %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -10,12 +10,12 @@
|
|||
<div class="bbcode" id="settingsPreview" style="max-height: 500px; overflow-y: auto; background: #C2AEEE; box-shadow: inset 0 0 1em 1em #D3BFFF;">{{ user.userPage()|raw|nl2br }}</div>
|
||||
<hr>
|
||||
<form enctype="multipart/form-data" method="post" action="{{ route('settings.account.userpage') }}">
|
||||
<div><textarea name="userpage" id="settingsEditor" class="input__text" style="height: 400px;">{% if user.page %}{{ user.page }}{% else %}[header]Welcome to my userpage![/header]{% endif %}</textarea></div>
|
||||
<div class="profile-save">
|
||||
<button value="{{ session_id() }}" name="session" class="input__button">Save</button>
|
||||
<button type="reset" class="input__button">Reset</button>
|
||||
<button type="button" class="input__button" onclick="settingsPreview();">Preview</button>
|
||||
<div>
|
||||
<textarea name="userpage" id="settingsEditor" class="input__text" style="height: 400px;">{% if user.page %}{{ user.page }}{% else %}[header]Welcome to my userpage![/header]{% endif %}</textarea>
|
||||
</div>
|
||||
<button value="{{ session_id() }}" name="session" class="input__button">Save</button>
|
||||
<button type="reset" class="input__button">Reset</button>
|
||||
<button type="button" class="input__button" onclick="settingsPreview();">Preview</button>
|
||||
</form>
|
||||
{% include 'settings/account/_preview.twig' %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
<div><h2>Enter your password to continue</h2></div>
|
||||
<div><input type="password" name="password" class="input__text"></div>
|
||||
</div>
|
||||
<div class="profile-save">
|
||||
<button 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, inset 0 0 3px #C00;" name="session" value="{{ session_id() }}" class="input__button">I understand, deactivate my account</button>
|
||||
<div style="text-align: center; margin: 2em;">
|
||||
<button name="session" value="{{ session_id() }}" class="input__button input__button--danger">I understand, deactivate my account</button>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
|
|
@ -9,29 +9,34 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block settingsContent %}
|
||||
<table class="settings-table">
|
||||
<thead>
|
||||
<tr><th style="width: 100px;">IP</th><th>Useragent</th><th>Country</th><th style="width: 120px;">Login time</th><th></th></tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr><th>IP</th><th>Useragent</th><th>Country</th><th>Login time</th><th></th></tr>
|
||||
</tfoot>
|
||||
<table class="settings__table">
|
||||
{% for elem in ['thead', 'tfoot'] %}
|
||||
<{{ elem }}>
|
||||
<tr>
|
||||
<th class="settings__table-head" style="width: 100px;">IP</th>
|
||||
<th class="settings__table-head">Useragent</th>
|
||||
<th class="settings__table-head">Country</th>
|
||||
<th class="settings__table-head" style="width: 120px;">Login time</th>
|
||||
<th class="settings__table-head" style="width: 90px;"></th>
|
||||
</tr>
|
||||
</{{ elem }}>
|
||||
{% endfor %}
|
||||
<tbody>
|
||||
{% for usession in sessions %}
|
||||
<tr {% if usession.id == active %} class="current-session"{% endif %}>
|
||||
<td>
|
||||
<tr class="settings__table-row {% if usession.id == active %}settings__table-row--current{% endif %}">
|
||||
<td class="settings__table-column">
|
||||
{{ usession.ip }}
|
||||
</td>
|
||||
<td>
|
||||
<td class="settings__table-column">
|
||||
{{ usession.agent }}
|
||||
</td>
|
||||
<td>
|
||||
<td class="settings__table-column">
|
||||
<img src="/images/flags/{{ usession.country|lower }}.png" alt="{{ usession.country }}"> {{ usession.country(true) }}
|
||||
</td>
|
||||
<td>
|
||||
<td class="settings__table-column">
|
||||
<time class="time-ago" datetime="{{ usession.start|date('r') }}">{{ usession.start|date(config('general.date_format')) }}</time>
|
||||
</td>
|
||||
<td style="width: 90px;">
|
||||
<td class="settings__table-column">
|
||||
<form method="post" action="{{ route('settings.advanced.sessions') }}">
|
||||
<input type="hidden" name="id" value="{{ usession.id }}">
|
||||
<button class="input__button" name="session" value="{{ session_id() }}">Kill</button>
|
||||
|
@ -41,10 +46,8 @@
|
|||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="profile-save">
|
||||
<form method="post" action="{{ route('settings.advanced.sessions') }}">
|
||||
<input type="hidden" name="all" value="1">
|
||||
<button class="input__button" name="session" value="{{ session_id() }}">Kill all active sessions</button>
|
||||
</form>
|
||||
</div>
|
||||
<form method="post" action="{{ route('settings.advanced.sessions') }}">
|
||||
<input type="hidden" name="all" value="1">
|
||||
<button class="input__button" name="session" value="{{ session_id() }}">Kill all active sessions</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
|
|
@ -48,22 +48,22 @@
|
|||
|
||||
{% block content %}
|
||||
<div class="content settings">
|
||||
<div class="content--right">
|
||||
<div class="content--right settings--right">
|
||||
<div class="content__header content__header--alt">
|
||||
Navigation
|
||||
</div>
|
||||
<div class="right-menu-nav">
|
||||
<div class="settings__navigation">
|
||||
{% for name, links in navigation %}
|
||||
<div>{{ name }}</div>
|
||||
{% for name, link in links %}
|
||||
<a href="{{ link }}">{{ name }}</a>
|
||||
<div class="settings__navigation-header">{{ name }}</div>
|
||||
{% for name,link in links %}
|
||||
<a href="{{ link }}" class="settings__navigation-link">{{ name }}</a>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="content--left">
|
||||
<div class="content--left settings--left">
|
||||
<div class="content__header">{{ title }}</div>
|
||||
<div class="settings-explanation">{{ block('description') }}</div>
|
||||
<div class="settings__explanation">{{ block('description') }}</div>
|
||||
{{ block('settingsContent') }}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
|
|
|
@ -1,59 +0,0 @@
|
|||
{% extends 'settings/notifications/master.twig' %}
|
||||
|
||||
{% set mode = 'History' %}
|
||||
|
||||
{% block description %}
|
||||
<p>The history of notifications that have been sent to you.</p>
|
||||
{% endblock %}
|
||||
|
||||
{% set alerts = user.notifications(0, false)|batch(10) %}
|
||||
|
||||
{% set paginationPages = alerts %}
|
||||
{% set paginationUrl %}{{ route('settings.notifications.history') }}{% endset %}
|
||||
|
||||
{% block css %}
|
||||
<style type="text/css">
|
||||
.pagination {
|
||||
float: right;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block settingsContent %}
|
||||
{% if alerts %}
|
||||
<div class="notification-history">
|
||||
{% for alert in alerts[get.page|default(1) - 1] %}
|
||||
<a id="notif-hist-{{ alert.id }}" class="{% if alert.read %}read{% endif %}"{% if alert.link %} href="{{ alert.link }}"{% endif %}>
|
||||
<div class="notif-hist-icon">
|
||||
{% if 'FONT:' in alert.image %}
|
||||
<div class="font-icon fa {{ alert.image|replace({'FONT:': ''}) }} fa-4x"></div>
|
||||
{% else %}
|
||||
<img src="{{ alert.image }}" alt="Notification">
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="notif-hist-content">
|
||||
<div class="notif-hist-inside">
|
||||
<div class="notif-hist-title">
|
||||
{{ alert.title }}
|
||||
</div>
|
||||
<div class="notif-hist-text">
|
||||
{{ alert.title }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="notif-hist-time">
|
||||
<time class="time-ago" datetime="{{ alert.time|date('r') }}">{{ alert.time|date(config('general.date_format')) }}</time>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if alerts|length > 1 %}
|
||||
<div>
|
||||
{% include 'elements/pagination.twig' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<h1 style="margin: 2em auto; text-align: center;">You don't have any notifications in your history!</h1>
|
||||
{% endif %}
|
||||
{% endblock %}
|
|
@ -1,3 +0,0 @@
|
|||
{% extends 'settings/master.twig' %}
|
||||
|
||||
{% set category = 'Notifications' %}
|
|
@ -239,7 +239,7 @@
|
|||
{% if user.id == profile.id %}
|
||||
<a class="profile__interactions-item fa fa-pencil-square-o" title="Edit your profile" href="{{ route('settings.account.profile') }}"></a>
|
||||
{% else %}
|
||||
{% if user.isFriends(profile.id) != 0 %}<a class="fa fa-{% if user.isFriends(profile.id) == 2 %}heart{% else %}star{% endif %}" title="You are friends"></a>{% endif %}
|
||||
{% if user.isFriends(profile.id) != 0 %}<a class="profile__interactions-item fa fa-{% if user.isFriends(profile.id) == 2 %}heart{% else %}star{% endif %}" title="You are friends"></a>{% endif %}
|
||||
<a class="profile__interactions-item fa fa-user-{% if user.isFriends(profile.id) == 0 %}plus{% else %}times{% endif %}" title="{% if user.isFriends(profile.id) == 0 %}Add {{ profile.username }} as a friend{% else %}Remove friend{% endif %}" href="javascript:void(0);" onclick="Sakura.Friend.{% if user.isFriends(profile.id) == 0 %}Add({{ profile.id }}){% else %}Remove({{ profile.id }}){% endif %}"></a>
|
||||
<a class="profile__interactions-item fa fa-exclamation-circle" title="Report {{ profile.username }}" href="{{ route('user.report', profile.id) }}"></a>
|
||||
{% endif %}
|
||||
|
|
|
@ -225,15 +225,6 @@ Router::group(['before' => 'maintenance'], function () {
|
|||
Router::get('/requests', 'Settings.FriendsController@requests', 'settings.friends.requests');
|
||||
});
|
||||
|
||||
// Notifications section
|
||||
Router::group(['prefix' => 'notifications'], function () {
|
||||
Router::get('/', function () {
|
||||
redirect(route('settings.account.history'));
|
||||
});
|
||||
|
||||
Router::get('/history', 'Settings.NotificationsController@history', 'settings.notifications.history');
|
||||
});
|
||||
|
||||
// Advanced section
|
||||
Router::group(['prefix' => 'advanced'], function () {
|
||||
Router::get('/', function () {
|
||||
|
|
Reference in a new issue