smol bit of maintenance and also colours
This commit is contained in:
parent
4965ef8700
commit
7e68147716
8 changed files with 40 additions and 49 deletions
|
@ -3,6 +3,9 @@
|
|||
background-color: #fbeeff;
|
||||
margin: 2px 0;
|
||||
|
||||
.mio--dark & {
|
||||
background-color: #23172a;
|
||||
}
|
||||
|
||||
&__title {
|
||||
display: block;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
font-size: 20px;
|
||||
line-height: 1.25em;
|
||||
color: #fff;
|
||||
background: #9475b2;
|
||||
background-color: #9475b2;
|
||||
border: 1px solid #306;
|
||||
box-shadow: inset 0 0 0 1px #643b8c;
|
||||
border-radius: 2px;
|
||||
|
@ -14,6 +14,17 @@
|
|||
display: inline-block;
|
||||
text-decoration: none;
|
||||
|
||||
&--small {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
&--disabled {
|
||||
background-color: #888;
|
||||
border-color: #444;
|
||||
box-shadow: inset 0 0 0 1px #555;
|
||||
}
|
||||
|
||||
&:not(&--disabled) {
|
||||
&:focus {
|
||||
border-color: #407;
|
||||
}
|
||||
|
@ -26,8 +37,5 @@
|
|||
border-color: #306;
|
||||
background: #8364a1;
|
||||
}
|
||||
|
||||
&--small {
|
||||
font-size: 15px;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,8 +60,10 @@
|
|||
text-decoration: none;
|
||||
color: inherit;
|
||||
|
||||
&--link {
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -204,29 +204,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||
break;
|
||||
|
||||
case 'avatar':
|
||||
if (isset($_POST['import'])
|
||||
&& !File::exists($app->getStore('avatars/original')->filename($avatar_filename))) {
|
||||
if (!tmp_csrf_verify($_POST['import'])) {
|
||||
$settings_errors[] = $csrf_error_str;
|
||||
break;
|
||||
}
|
||||
|
||||
$old_avatar_url = trim(file_get_contents(
|
||||
"https://secret.flashii.net/avatar-serve.php?id={$settings_user->user_id}&r"
|
||||
));
|
||||
|
||||
if (empty($old_avatar_url)) {
|
||||
$settings_errors[] = 'No old avatar was found for you.';
|
||||
break;
|
||||
}
|
||||
|
||||
File::writeAll(
|
||||
$app->getStore('avatars/original')->filename($avatar_filename),
|
||||
file_get_contents($old_avatar_url)
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
||||
if (isset($_POST['delete'])) {
|
||||
if (!tmp_csrf_verify($_POST['delete'])) {
|
||||
$settings_errors[] = $csrf_error_str;
|
||||
|
|
|
@ -13,7 +13,9 @@
|
|||
{{ post.created_at }}
|
||||
</div>
|
||||
<a class="news__preview__user" href="/profile.php?u={{ post.user.user_id }}">
|
||||
<div class="news__preview__user__name">{{ post.user.username }}</div>
|
||||
<div class="news__preview__user__name"{% if not post.user.displayColour.inherit %} style="color:{{ post.user.displayColour }}"{% endif %}>
|
||||
{{ post.user.username }}
|
||||
</div>
|
||||
<div class="avatar news__preview__user__avatar" style="background-image:url('/profile.php?u={{ post.user.user_id }}&m=avatar')"></div>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<div class="avatar news__post__avatar" style="background-image:url('/profile.php?u={{ post.user.user_id }}&m=avatar');"></div>
|
||||
</a>
|
||||
|
||||
<a class="news__post__detail news__post__info" href="/news.php?c={{ post.category.category_id }}">
|
||||
<a class="news__post__detail news__post__info news__post__info--link" href="/news.php?c={{ post.category.category_id }}">
|
||||
<div class="news__post__info__name">
|
||||
Category
|
||||
</div>
|
||||
|
|
|
@ -21,12 +21,9 @@
|
|||
</label>
|
||||
<button class="input__button" name="upload" value="{{ csrf_token() }}">Upload</button>
|
||||
</form>
|
||||
|
||||
<form class="settings__avatar__form" method="post" action="?m=avatar">
|
||||
{% if user_has_avatar %}
|
||||
<button class="input__button" name="delete" value="{{ csrf_token() }}">Delete</button>
|
||||
{% else %}
|
||||
<button class="input__button" name="import" value="{{ csrf_token() }}">Import old avatar</button>
|
||||
{% endif %}
|
||||
<button class="input__button{% if not user_has_avatar %} input__button--disabled{% endif %}" name="delete" value="{{ csrf_token() }}"{% if not user_has_avatar %} disabled{% endif %}>Delete</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -71,11 +71,13 @@
|
|||
<div class="profile__info">
|
||||
<div class="profile__info__section">
|
||||
<div class="profile__info__block">
|
||||
{% if profile.userTitle is not empty %}
|
||||
<div class="profile__info__row">
|
||||
<div class="profile__info__column profile__info__column--user-title">
|
||||
<div class="profile__info__column profile__info__column--user-title"{% if not profile.displayColour.inherit %} style="color:{{ profile.displayColour }}"{% endif %}>
|
||||
{{ profile.userTitle }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="profile__info__row">
|
||||
<div class="profile__info__column profile__info__column--icons">
|
||||
|
@ -103,7 +105,7 @@
|
|||
Last Seen
|
||||
</div>
|
||||
<div class="profile__info__column">
|
||||
{% if profile.last_seen.timestamp + 5 >= ''|date('U') %}
|
||||
{% if profile.last_seen.addMinute.timestamp >= ''|date('U') %}
|
||||
Online now
|
||||
{% else %}
|
||||
{{ profile.last_seen.diffForHumans }}
|
||||
|
@ -140,7 +142,7 @@
|
|||
{% endspaceless %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="avatar profile__avatar" style="background-image:url('{{ image }}');"></div>
|
||||
<div class="avatar profile__avatar" style="background-image:url('{{ image }}')"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue