forked from GNUsocial/gnu-social
[Cover] Added cover css, changed cover settings route name
This commit is contained in:
parent
4f69686968
commit
0d18615fd8
@ -37,8 +37,7 @@ class Cover extends Module
|
|||||||
*/
|
*/
|
||||||
public function onAddRoute(RouteLoader $r): bool
|
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']);
|
$r->connect('cover', '/cover', [Controller\Cover::class, 'cover']);
|
||||||
return Event::next;
|
return Event::next;
|
||||||
}
|
}
|
||||||
@ -53,7 +52,7 @@ class Cover extends Module
|
|||||||
public function onStartTwigPopulateVars(array &$vars): bool
|
public function onStartTwigPopulateVars(array &$vars): bool
|
||||||
{
|
{
|
||||||
$vars['profile_tabs'] = [['title' => 'Cover',
|
$vars['profile_tabs'] = [['title' => 'Cover',
|
||||||
'href' => 'settings_cover',
|
'route' => 'settings_profile_cover',
|
||||||
]];
|
]];
|
||||||
|
|
||||||
if (Common::user() != null) {
|
if (Common::user() != null) {
|
||||||
@ -80,7 +79,7 @@ class Cover extends Module
|
|||||||
*/
|
*/
|
||||||
public function onStartShowStyles(array &$styles): bool
|
public function onStartShowStyles(array &$styles): bool
|
||||||
{
|
{
|
||||||
//$styles[] = 'voer/poll.css';
|
$styles[] = 'cover/cover.css';
|
||||||
return Event::next;
|
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);
|
margin-bottom: var(--unit-size);
|
||||||
vertical-align: middle;
|
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 {
|
.icon-avatar {
|
||||||
order: 1;
|
order: 1;
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
<nav class='set-nav'>
|
<nav class='set-nav'>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<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>
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ path('settings_account') }}" class='hover-effect {{ active('settings_account') }}'>Account</a>
|
<a href="{{ path('settings_account') }}" class='hover-effect {{ active('settings_account') }}'>Account</a>
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
</li>
|
</li>
|
||||||
{% for tab in profile_tabs %}
|
{% for tab in profile_tabs %}
|
||||||
<li>
|
<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>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
Loading…
Reference in New Issue
Block a user