]> git.mxchange.org Git - friendica.git/commitdiff
visual notice when user is remote user or visitor
authorrabuzarus <>
Wed, 20 Apr 2016 16:03:22 +0000 (18:03 +0200)
committerrabuzarus <>
Wed, 20 Apr 2016 16:03:22 +0000 (18:03 +0200)
css/style.css
templates/nav.tpl
theme.php

index 74186dbe2838275d33fec03d8a8e5dc677f2c06b..5cd96686e0baddf3d7f054ff7aea45d23f97a1f3 100644 (file)
@@ -464,11 +464,12 @@ nav.navbar a {
     width: 32px;
     border-radius: 3px;
 }
+/* The Top Nav Bar user menu */
 #topbar-first .account .user-title {
     text-align: right
 }
 #topbar-first .account .user-title span {
-    color: #d7d7d7
+    color: $nav_icon_color;
 }
 #topbar-first .account #main-menu .nav-notify {
     position: absolute;
@@ -481,11 +482,24 @@ nav.navbar a {
     background-color: $nav_bg;
     color: $nav_icon_color;
 }
+#myNavmenu li.nav-sitename {
+    font-weight: bold;
+}
 #topbar-first .dropdown.account>a,
 #topbar-first .dropdown.account.open>a,
 #topbar-first .dropdown.account>a:hover,
 #topbar-first .dropdown.account.open>a:hover {
-    background-color: $nav_bg
+    background-color: $nav_bg;
+}
+#topbar-first .dropdown.account li#nav-sitename {
+    padding-left: 15px;
+    padding-right: 15px;
+    font-weight: bold;
+    word-break: break-word;
+}
+#topbar-first .dropdown.account li#nav-sitename:hover {
+    border: none;
+    background-color: $nav_bg;
 }
 /* Nav Search */
 #topbar-first #search-box .navbar-form {
index 46f08809ad275d4bd7d27545ab611563702c306c..02788527151235767ba548368ae4061897518e5d 100644 (file)
                                        <li id="nav-user-linkmenu" class="dropdown account nav-menu hidden-xs">
                                                <a href="#" id="main-menu" class="dropdown-toggle nav-avatar " data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                                                        <div class="user-title pull-left hidden-xs hidden-sm hidden-md">
-                                                               <strong>{{$nav.userinfo.name}}</strong>
+                                                               <strong>{{$nav.userinfo.name}}</strong><br>
+                                                               {{if $nav.remote}}<span class="trunctate">{{$nav.remote}}</span>{{/if}}
                                                                <span id="intro-update" class="nav-intro-badge badge nav-notify"></span>
                                                        </div>
 
 
                                                {{* The list of available usermenu links *}}
                                                <ul id="nav-user-menu" class="dropdown-menu pull-right menu-popup" role="menu" aria-labelledby="main-menu">
+                                                       {{if $nav.remote}}{{if $nav.sitename}}
+                                                       <li id="nav-sitename" role="menuitem">{{$nav.sitename}}</li>
+                                                       <li class="divider"></li>
+                                                       {{/if}}{{/if}}
                                                        {{foreach $nav.usermenu as $usermenu}}
                                                        <li role="menuitem"><a class="{{$usermenu.2}}" href="{{$usermenu.0}}" title="{{$usermenu.3}}">{{$usermenu.1}}</a></li>
                                                        {{/foreach}}
                                                        <li class="divider"></li>
                                                        {{if $nav.apps}}
                                                        <li role="menuitem"><a id="nav-apps-link" class="nav-link {{$nav.apps.2}} {{$sel.manage}}" href="{{$nav.apps.0}}" title="{{$nav.apps.3}}" ><i class="fa fa-puzzle-piece fa-fw"></i> {{$nav.apps.1}}</a>
-                                                       {{/if}}
                                                        <li class="divider"></li>
+                                                       {{/if}}
                                                        {{if $nav.help}}
                                                        <li role="menuitem"><a id="nav-help-link" class="nav-link {{$nav.help.2}}" target="friendica-help" href="{{$nav.help.0}}" title="{{$nav.help.3}}" ><i class="fa fa-question-circle fa-fw"></i> {{$nav.help.3}}</a></li>
                                                        {{/if}}
                        <div id="myNavmenu" class="navmenu navmenu-default navmenu-fixed-right offcanvas">
                                <div class="nav-container">
                                        <div class="list-group">
-                                               <li class="list-group-item"><img src="{{$nav.userinfo.icon}}" alt="{{$nav.userinfo.name}}" style="max-width:15px; max-height:15px; min-width:15px; min-height:15px; width:15px; height:15px;"> {{$nav.userinfo.name}}</li>
+                                               {{if $nav.remote}}{{if $nav.sitename}}
+                                               <li class="nav-sitename list-group-item" role="menuitem">{{$nav.sitename}}</li>
+                                               {{/if}}{{/if}}
+                                               <li class="list-group-item"><img src="{{$nav.userinfo.icon}}" alt="{{$nav.userinfo.name}}" style="max-width:15px; max-height:15px; min-width:15px; min-height:15px; width:15px; height:15px;"> {{$nav.userinfo.name}}{{if $nav.remote}} ({{$nav.remote}}){{/if}}</li>
                                                {{foreach $nav.usermenu as $usermenu}}
                                                <a class="{{$usermenu.2}} list-group-item" href="{{$usermenu.0}}" title="{{$usermenu.3}}">{{$usermenu.1}}</a>
                                                {{/foreach}}
index c0fd9b99f11d401016a588e5f026442b6da8c147..2fed9fdfa3addccaaefc9feb1707abc859836dbd 100644 (file)
--- a/theme.php
+++ b/theme.php
@@ -158,13 +158,13 @@ function frio_remote_nav($a,&$nav) {
 
        } elseif(!local_user() && remote_user()) {
                $r = q("SELECT `name`, `nick`, `micro` AS `photo` FROM `contact` WHERE `id` = %d", intval(remote_user()));
-               $nav['remote'] = 1;
+               $nav['remote'] = t("Remote");
 
        } elseif(get_my_url ()) {
                $r = q("SELECT `name`, `nick`, `photo` FROM `gcontact`
                                WHERE `addr` = '%s' AND `network` = 'dfrn'",
                        dbesc($webbie));
-               $nav['remote'] = 1;
+               $nav['remote'] = t("Visitor");
        }
 
        if(count($r)){
@@ -190,5 +190,6 @@ function frio_remote_nav($a,&$nav) {
                $nav['messages'] = array($server_url . '/message', t('Messages'), "", t('Private mail'));
                $nav['settings'] = array($server_url . '/settings', t('Settings'),"", t('Account settings'));
                $nav['contacts'] = array($server_url . '/contacts', t('Contacts'),"", t('Manage/edit friends and contacts'));
+               $nav['sitename'] = $a->config['sitename'];
        }
 }