]> git.mxchange.org Git - friendica.git/commitdiff
Normalize logout link behavior across themes
authorHypolite Petovan <hypolite@mrpetovan.com>
Tue, 11 Jun 2019 23:42:08 +0000 (19:42 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Tue, 11 Jun 2019 23:42:08 +0000 (19:42 -0400)
src/Content/Nav.php
view/theme/duepuntozero/deriv/darkzero.css
view/theme/duepuntozero/deriv/easterbunny.css
view/theme/duepuntozero/deriv/greenzero.css
view/theme/duepuntozero/deriv/purplezero.css
view/theme/duepuntozero/style.css
view/theme/frio/theme.php
view/theme/vier/style.css
view/theme/vier/templates/nav.tpl

index a63244e856a7ffd0d2b0843750f72552ae7a682a..690af1935371d1cee8c0e60a4201a03d72ac6082 100644 (file)
@@ -148,9 +148,13 @@ class Nav
                $nav['usermenu'] = [];
                $userinfo = null;
 
-               if (local_user()) {
+               if (local_user() || remote_user()) {
                        $nav['logout'] = ['logout', L10n::t('Logout'), '', L10n::t('End this session')];
+               } else {
+                       $nav['login'] = ['login', L10n::t('Login'), ($a->module == 'login' ? 'selected' : ''), L10n::t('Sign in')];
+               }
 
+               if (local_user()) {
                        // user menu
                        $nav['usermenu'][] = ['profile/' . $a->user['nickname'], L10n::t('Status'), '', L10n::t('Your posts and conversations')];
                        $nav['usermenu'][] = ['profile/' . $a->user['nickname'] . '?tab=profile', L10n::t('Profile'), '', L10n::t('Your profile page')];
@@ -165,8 +169,6 @@ class Nav
                                'icon' => (DBA::isResult($contact) ? $a->removeBaseURL($contact['micro']) : 'images/person-48.jpg'),
                                'name' => $a->user['username'],
                        ];
-               } else {
-                       $nav['login'] = ['login', L10n::t('Login'), ($a->module == 'login' ? 'selected' : ''), L10n::t('Sign in')];
                }
 
                // "Home" should also take you home from an authenticated remote profile connection
index 3b6fa92e3b27d25849e8806550949613fc17be93..60e2d9c456f53eeb2f32fd431c277c8ca6bcca4a 100644 (file)
@@ -50,9 +50,10 @@ nav #banner #logo-text a { color: #ffffff; }
 .photo-album-image-wrapper .caption { background-color: rgba(51, 51, 51, 0.8); color: #FFFFFF; }
 
 .nav-selected.nav-link { color: #ffffff!important; border-bottom: 0px}
-.nav-commlink, .nav-login-link {background-color: #b7bab3;}
+.nav-commlink, .nav-login-link, .nav-logout-link {background-color: #b7bab3;}
 .nav-commlink:link, .nav-commlink:visited,
-.nav-login-link:link, .nav-login-link:visited{
+.nav-login-link:link, .nav-login-link:visited,
+.nav-logout-link:link, .nav-logout-link:visited {
        color: #ffffff;
 }
 
index 34bf58f46055d73cce868b300f82dd5337a97e33..4542c285a9908bd82583ea04b8695108a1a30565 100644 (file)
@@ -33,7 +33,7 @@ aside {       background-image: url('imgeasterbunny/border.jpg'); }
 div.wall-item-content-wrapper.shiny {  background-image: url('imgeasterbunny/shiny.png'); }
 
 
-.nav-commlink, .nav-login-link {
+.nav-commlink, .nav-login-link, .nav-logout-link {
        background-color: #aed3b2;
 
 }
index d446a616111490c9c8633f22636db7206aaaffa4..315e8dc6a02c0e3a4e3688b5d807c1f15656115f 100644 (file)
@@ -4,9 +4,10 @@ a:link, a:visited { color: #549f4f; text-decoration: none; }
 a:hover {text-decoration: underline; }
 
 .nav-selected.nav-link { color: #549f4f!important; border-bottom: 0px}
-.nav-commlink, .nav-login-link {background-color: #aed3b2;}
+.nav-commlink, .nav-login-link, .nav-logout-link {background-color: #aed3b2;}
 .nav-commlink:link, .nav-commlink:visited,
-.nav-login-link:link, .nav-login-link:visited{
+.nav-login-link:link, .nav-login-link:visited,
+.nav-logout-link:link, .nav-logout-link:visited{
        color: #ffffff;
 }
 
index 29718576830f88094a2aaebc5d6055192e4e090d..6426bb9257a798950969af4d1b1677ecb779e8a3 100644 (file)
@@ -10,7 +10,7 @@ section {     background-image: url('imgpurplezero/border.jpg'); }
 div.wall-item-content-wrapper.shiny {  background-image: url('imgpurplezero/shiny.png'); }
 
 
-.nav-commlink, .nav-login-link {
+.nav-commlink, .nav-login-link, .nav-logout-link {
        background-color: #aed3b2;
 
 }
index 7e66570ad57cddd532e82669e4c2d49197892818..412899fc77acd66fcc338b5b1dc3c82d108cfc5f 100644 (file)
@@ -159,7 +159,7 @@ nav #banner #logo-text a {
 nav #banner #logo-text a:hover { text-decoration: none; }
 
 
-.nav-commlink, .nav-login-link {
+.nav-commlink, .nav-login-link, .nav-logout-link {
        display: block;
        height: 15px;
        margin-top: 67px;
index 9434b340d219fb35e80acbd06fb62652337972d6..9c4205c886d26b260b7894047bc530bcb059c83f 100644 (file)
@@ -256,8 +256,6 @@ function frio_remote_nav($a, &$nav)
        }
 
        if (!local_user() && !empty($server_url) && !is_null($remoteUser)) {
-               $nav['logout'] = [$server_url . '/logout', L10n::t('Logout'), '', L10n::t('End this session')];
-
                // user menu
                $nav['usermenu'][] = [$server_url . '/profile/' . $remoteUser['nick'], L10n::t('Status'), '', L10n::t('Your posts and conversations')];
                $nav['usermenu'][] = [$server_url . '/profile/' . $remoteUser['nick'] . '?tab=profile', L10n::t('Profile'), '', L10n::t('Your profile page')];
index 3dc9b4649134c807db9e98655692420b9801997a..6506dadc162070b1b7c51785207ca9f0ca15c3be 100644 (file)
@@ -763,6 +763,7 @@ nav #nav-directory-link,
 nav #nav-apps-link,
 nav #nav-apps-link,
 nav #nav-login-link,
+nav #nav-logout-link,
 nav #nav-messages-linkmenu,
 nav #nav-notifications-linkmenu,
 nav #nav-site-linkmenu,
index db883433e6235a6ab2a3446d90c906a3b83bf281..f600b9f615c93cc7d00742441725198d6d67738e 100644 (file)
                                <a class="{{$nav.login.2}}" href="{{$nav.login.0}}" title="{{$nav.login.3}}" >{{$nav.login.1}}</a>
                        </li>
                {{/if}}
+               {{if $nav.logout}}
+                       <li role="menuitem" id="nav-logout-link" class="nav-menu">
+                               <a class="{{$nav.logout.2}}" href="{{$nav.logout.0}}" title="{{$nav.logout.3}}" >{{$nav.logout.1}}</a>
+                       </li>
+               {{/if}}
 
                {{if $nav.search}}
                        <li role="search" id="nav-search-box">