make the background change option more 'real world'

This commit is contained in:
flash 2016-09-10 15:47:27 +02:00
parent d3b8612a65
commit e3c317974b
4 changed files with 28 additions and 22 deletions

View file

@ -1153,6 +1153,14 @@ a.default:active {
border-right: 1px solid #B19EED; border-right: 1px solid #B19EED;
} }
/*
* Background transparency
*/
.background-transparent {
border-style: dashed;
background: fade(#D3BFFF, 50%);
}
/* /*
* News page styling * News page styling
*/ */

View file

@ -63,7 +63,7 @@
</div> </div>
<div id="contentwrapper"> <div id="contentwrapper">
<div id="notifications"></div> <div id="notifications"></div>
{% if profile is defined ? profile.background : (user.permission(constant('Sakura\\Perms\\Site::CHANGE_BACKGROUND')) and user.backgroundSitewide and user.background) %} {% if profile is defined ? profile.background : (user.permission(constant('Sakura\\Perms\\Site::CHANGE_BACKGROUND')) and (user.backgroundSitewide or showBG) and user.background) %}
<div id="userBackground" style="background-image: url('{{ route('file.background', (profile is defined ? profile : user).id) }}');"></div> <div id="userBackground" style="background-image: url('{{ route('file.background', (profile is defined ? profile : user).id) }}');"></div>
{% endif %} {% endif %}
{% if not user.isActive and server['REQUEST_URI'] != route('auth.login') %} {% if not user.isActive and server['REQUEST_URI'] != route('auth.login') %}

View file

@ -1,6 +1,7 @@
{% extends 'settings/appearance/master.twig' %} {% extends 'settings/appearance/master.twig' %}
{% set mode = 'Background' %} {% set mode = 'Background' %}
{% set showBG = true %}
{% block description %} {% block description %}
<p>Maximum image size is {{ config('file.background.max_width') }}x{{ config('file.background.max_height') }} and can't be larger than {{ config('file.background.max_file_size')|byte_symbol }}.</p> <p>Maximum image size is {{ config('file.background.max_width') }}x{{ config('file.background.max_height') }} and can't be larger than {{ config('file.background.max_file_size')|byte_symbol }}.</p>
@ -10,9 +11,6 @@
<form enctype="multipart/form-data" method="post" action="{{ route('settings.appearance.background') }}"> <form enctype="multipart/form-data" method="post" action="{{ route('settings.appearance.background') }}">
<input type="hidden" name="MAX_FILE_SIZE" value="{{ config('file.background.max_file_size') }}"> <input type="hidden" name="MAX_FILE_SIZE" value="{{ config('file.background.max_file_size') }}">
<div style="text-align: center;"> <div style="text-align: center;">
<div>
<img src="{{ route('file.background', user.id) }}" alt="Your Background" class="default-avatar-setting" style="max-width: 90%; max-height: 90%;">
</div>
<div> <div>
<input type="file" name="background"> <input type="file" name="background">
<div style="font-size: .8em;"> <div style="font-size: .8em;">

View file

@ -3,7 +3,7 @@
{% set title = category ~ ' / ' ~ mode %} {% set title = category ~ ' / ' ~ mode %}
{% block content %} {% block content %}
<div class="content settings messages"> <div class="content settings messages {% if showBG %}background-transparent{% endif %}">
<div class="content-right content-column"> <div class="content-right content-column">
<div class="head"> <div class="head">
Navigation Navigation