forked from GNUsocial/gnu-social
[Cover] Added cover css, changed cover settings route name
This commit is contained in:
parent
e2ce1a8070
commit
4949abac9d
@ -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;
|
||||
}
|
||||
}
|
||||
|
26
public/assets/css/cover/cover.css
Normal file
26
public/assets/css/cover/cover.css
Normal 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;
|
||||
}
|
@ -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;
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user