[Cover] Added cover css, changed cover settings route name

This commit is contained in:
Daniel 2020-11-28 22:11:54 +00:00 committed by Hugo Sales
parent e2ce1a8070
commit 4949abac9d
Signed by untrusted user: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
5 changed files with 31 additions and 35 deletions

View File

@ -37,8 +37,7 @@ class Cover extends Module
*/
public function onAddRoute(RouteLoader $r): bool
{
$r->connect('settings_cover', 'settings/cover', [Controller\Cover::class, 'coversettings']);
$r->connect('settings_profile_cover', 'settings/cover', [Controller\Cover::class, 'coversettings']);
$r->connect('cover', '/cover', [Controller\Cover::class, 'cover']);
return Event::next;
}
@ -53,7 +52,7 @@ class Cover extends Module
public function onStartTwigPopulateVars(array &$vars): bool
{
$vars['profile_tabs'] = [['title' => 'Cover',
'href' => 'settings_cover',
'route' => 'settings_profile_cover',
]];
if (Common::user() != null) {
@ -80,7 +79,7 @@ class Cover extends Module
*/
public function onStartShowStyles(array &$styles): bool
{
//$styles[] = 'voer/poll.css';
$styles[] = 'cover/cover.css';
return Event::next;
}
}

View File

@ -0,0 +1,26 @@
.cover{
width: 100%;
height: 100%;
position: absolute;
top:0;
left: 0;
z-index: -1;
}
.cover-img{
width: 100%;
height: 100%;
object-fit: cover;
}
.no-cover{
width: 100%;
height: 100%;
background-color: var(--bg2);
}
.profile{
position:relative;
background-color: transparent !important;
}

View File

@ -77,35 +77,6 @@
margin-bottom: var(--unit-size);
vertical-align: middle;
}
/*teisitn*/
.cover{
width: 100%;
height: 100%;
position: absolute;
top:0;
left: 0;
z-index: -1;
}
.cover-img{
width: 100%;
height: 100%;
object-fit: cover;
}
.no-cover{
width: 100%;
height: 100%;
background-color: var(--bg2);
}
.profile{
position:relative;
background-color: transparent !important;
}
/**/
.icon-avatar {
order: 1;

View File

@ -28,7 +28,7 @@
<nav class='set-nav'>
<ul>
<li>
<a href="{{ path('settings_personal_info') }}" class='hover-effect {{ active('settings_personal_info', 'settings_avatar') }}'>Profile</a>
<a href="{{ path('settings_personal_info') }}" class='hover-effect {{ active('settings_personal_info', 'settings_avatar', 'settings_profile_') }}'>Profile</a>
</li>
<li>
<a href="{{ path('settings_account') }}" class='hover-effect {{ active('settings_account') }}'>Account</a>

View File

@ -22,7 +22,7 @@
</li>
{% for tab in profile_tabs %}
<li>
<a href="{{ path(tab['href']) }}" class='hover-effect {{ active(tab['href']) }}' >{{ tab['title'] }}</a>
<a href="{{ path(tab['route']) }}" class='hover-effect {{ active(tab['route']) }}' >{{ tab['title'] }}</a>
</li>
{% endfor %}
</ul>