From ca39c2acb4487b9e992e9344e75f8eabab01363a Mon Sep 17 00:00:00 2001 From: tomtom84 Date: Wed, 11 Sep 2013 19:14:41 +0200 Subject: [PATCH] - diabook update -- adjust nav-bar, depending to userstatus --- view/theme/diabook/diabook-aerith/style.css | 16 ++++++++--- view/theme/diabook/diabook-blue/style.css | 13 +++++++-- view/theme/diabook/diabook-dark/style.css | 14 ++++++++-- view/theme/diabook/diabook-green/style.css | 15 +++++++--- view/theme/diabook/diabook-pink/style.css | 15 +++++++--- view/theme/diabook/diabook-red/style.css | 15 +++++++--- view/theme/diabook/style.css | 15 ++++++++-- view/theme/diabook/templates/nav.tpl | 4 +-- view/theme/diabook/theme.php | 31 +++++++++++++++++++-- 9 files changed, 108 insertions(+), 30 deletions(-) diff --git a/view/theme/diabook/diabook-aerith/style.css b/view/theme/diabook/diabook-aerith/style.css index fbebf6a75e..8c5296c0b4 100644 --- a/view/theme/diabook/diabook-aerith/style.css +++ b/view/theme/diabook/diabook-aerith/style.css @@ -873,12 +873,14 @@ nav .nav-notify { nav .nav-notify.show { display: block; } + nav #nav-help-link, nav #nav-search-link, nav #nav-directory-link, nav #nav-apps-link, nav #nav-site-linkmenu, nav #nav-home-link, +nav #nav-login-link, nav #nav-user-linkmenu { float: right; @@ -886,18 +888,23 @@ nav #nav-user-linkmenu nav #nav-user-linkmenu{ margin-right: 0px; } -nav #nav-home-link, #nav-directory-link, #nav-apps-link{ +nav #nav-home-link, #nav-directory-link, #nav-login-link, #nav-apps-link{ margin-left: 0px; margin-right: 0px; font-weight: bold; margin: 3px 5px; - font-size: 14px; } nav #nav-directory-link{ - margin-right: 0px; + margin-right: 10px; } + +li#nav-site-linkmenu.nav-menu-icon{ + display: none; +} + nav #nav-home-link{ - margin-left: 0px; + margin-left: 0px; + display: none; } nav #nav-help-link .menu-popup, nav #nav-search-link .menu-popup, @@ -908,6 +915,7 @@ nav #nav-site-linkmenu .menu-popup { left: auto; } + nav #nav-messages-linkmenu.on .icon.messages, nav #nav-messages-linkmenu.selected .icon.messages{ background-image: url("../../../view/theme/diabook/diabook-aerith/icons/messages.png"); } diff --git a/view/theme/diabook/diabook-blue/style.css b/view/theme/diabook/diabook-blue/style.css index d6d6a85db3..6c8cb34aaa 100644 --- a/view/theme/diabook/diabook-blue/style.css +++ b/view/theme/diabook/diabook-blue/style.css @@ -852,6 +852,7 @@ nav #nav-directory-link, nav #nav-apps-link, nav #nav-site-linkmenu, nav #nav-home-link, +nav #nav-login-link, nav #nav-user-linkmenu { float: right; @@ -859,17 +860,23 @@ nav #nav-user-linkmenu nav #nav-user-linkmenu{ margin-right: 0px; } -nav #nav-home-link, #nav-directory-link, #nav-apps-link{ +nav #nav-home-link, #nav-directory-link, #nav-login-link, #nav-apps-link{ margin-left: 0px; margin-right: 0px; font-weight: bold; margin: 3px 5px; } nav #nav-directory-link{ - margin-right: 0px; + margin-right: 10px; } + +li#nav-site-linkmenu.nav-menu-icon{ + display: none; +} + nav #nav-home-link{ - margin-left: 0px; + margin-left: 0px; + display: none; } nav #nav-help-link .menu-popup, nav #nav-search-link .menu-popup, diff --git a/view/theme/diabook/diabook-dark/style.css b/view/theme/diabook/diabook-dark/style.css index b7ff104af6..3b28af1fb3 100644 --- a/view/theme/diabook/diabook-dark/style.css +++ b/view/theme/diabook/diabook-dark/style.css @@ -859,6 +859,7 @@ nav #nav-directory-link, nav #nav-apps-link, nav #nav-site-linkmenu, nav #nav-home-link, +nav #nav-login-link, nav #nav-user-linkmenu { float: right; @@ -866,17 +867,23 @@ nav #nav-user-linkmenu nav #nav-user-linkmenu{ margin-right: 0px; } -nav #nav-home-link, #nav-directory-link, #nav-apps-link{ +nav #nav-home-link, #nav-directory-link, #nav-login-link, #nav-apps-link{ margin-left: 0px; margin-right: 0px; font-weight: bold; margin: 3px 5px; } nav #nav-directory-link{ - margin-right: 0px; + margin-right: 10px; } + +li#nav-site-linkmenu.nav-menu-icon{ + display: none; +} + nav #nav-home-link{ - margin-left: 0px; + margin-left: 0px; + display: none; } nav #nav-help-link .menu-popup, nav #nav-search-link .menu-popup, @@ -887,6 +894,7 @@ nav #nav-site-linkmenu .menu-popup { left: auto; } + nav #nav-messages-linkmenu.on .icon.messages, nav #nav-messages-linkmenu.selected .icon.messages{ background-image: url("../../../view/theme/diabook/diabook-dark/icons/messages2.png"); } diff --git a/view/theme/diabook/diabook-green/style.css b/view/theme/diabook/diabook-green/style.css index 05244c1ae3..63f8624091 100644 --- a/view/theme/diabook/diabook-green/style.css +++ b/view/theme/diabook/diabook-green/style.css @@ -859,6 +859,7 @@ nav #nav-directory-link, nav #nav-apps-link, nav #nav-site-linkmenu, nav #nav-home-link, +nav #nav-login-link, nav #nav-user-linkmenu { float: right; @@ -866,18 +867,23 @@ nav #nav-user-linkmenu nav #nav-user-linkmenu{ margin-right: 0px; } -nav #nav-home-link, #nav-directory-link, #nav-apps-link{ +nav #nav-home-link, #nav-directory-link, #nav-login-link, #nav-apps-link{ margin-left: 0px; margin-right: 0px; font-weight: bold; margin: 3px 5px; - font-size: 14px; } nav #nav-directory-link{ - margin-right: 0px; + margin-right: 10px; } + +li#nav-site-linkmenu.nav-menu-icon{ + display: none; +} + nav #nav-home-link{ - margin-left: 0px; + margin-left: 0px; + display: none; } nav #nav-help-link .menu-popup, nav #nav-search-link .menu-popup, @@ -888,6 +894,7 @@ nav #nav-site-linkmenu .menu-popup { left: auto; } + nav #nav-messages-linkmenu.on .icon.messages, nav #nav-messages-linkmenu.selected .icon.messages{ background-image: url("../../../view/theme/diabook/diabook-green/icons/messages.png"); } diff --git a/view/theme/diabook/diabook-pink/style.css b/view/theme/diabook/diabook-pink/style.css index fbabb08daa..3db561725b 100644 --- a/view/theme/diabook/diabook-pink/style.css +++ b/view/theme/diabook/diabook-pink/style.css @@ -858,6 +858,7 @@ nav #nav-directory-link, nav #nav-apps-link, nav #nav-site-linkmenu, nav #nav-home-link, +nav #nav-login-link, nav #nav-user-linkmenu { float: right; @@ -865,18 +866,23 @@ nav #nav-user-linkmenu nav #nav-user-linkmenu{ margin-right: 0px; } -nav #nav-home-link, #nav-directory-link, #nav-apps-link{ +nav #nav-home-link, #nav-directory-link, #nav-login-link, #nav-apps-link{ margin-left: 0px; margin-right: 0px; font-weight: bold; margin: 3px 5px; - font-size: 14px; } nav #nav-directory-link{ - margin-right: 0px; + margin-right: 10px; } + +li#nav-site-linkmenu.nav-menu-icon{ + display: none; +} + nav #nav-home-link{ - margin-left: 0px; + margin-left: 0px; + display: none; } nav #nav-help-link .menu-popup, nav #nav-search-link .menu-popup, @@ -887,6 +893,7 @@ nav #nav-site-linkmenu .menu-popup { left: auto; } + nav #nav-messages-linkmenu.on .icon.messages, nav #nav-messages-linkmenu.selected .icon.messages{ background-image: url("../../../view/theme/diabook/diabook-pink/icons/messages.png"); } diff --git a/view/theme/diabook/diabook-red/style.css b/view/theme/diabook/diabook-red/style.css index b04c43efe4..0e4c65b020 100644 --- a/view/theme/diabook/diabook-red/style.css +++ b/view/theme/diabook/diabook-red/style.css @@ -876,6 +876,7 @@ nav #nav-directory-link, nav #nav-apps-link, nav #nav-site-linkmenu, nav #nav-home-link, +nav #nav-login-link, nav #nav-user-linkmenu { float: right; @@ -883,18 +884,23 @@ nav #nav-user-linkmenu nav #nav-user-linkmenu{ margin-right: 0px; } -nav #nav-home-link, #nav-directory-link, #nav-apps-link{ +nav #nav-home-link, #nav-directory-link, #nav-login-link, #nav-apps-link{ margin-left: 0px; margin-right: 0px; font-weight: bold; margin: 3px 5px; - font-size: 15px; } nav #nav-directory-link{ - margin-right: 0px; + margin-right: 10px; } + +li#nav-site-linkmenu.nav-menu-icon{ + display: none; +} + nav #nav-home-link{ - margin-left: 0px; + margin-left: 0px; + display: none; } nav #nav-help-link .menu-popup, nav #nav-search-link .menu-popup, @@ -905,6 +911,7 @@ nav #nav-site-linkmenu .menu-popup { left: auto; } + nav #nav-messages-linkmenu.on .icon.messages, nav #nav-messages-linkmenu.selected .icon.messages{ background-image: url("../../../view/theme/diabook/diabook-red/icons/messages2.png"); } diff --git a/view/theme/diabook/style.css b/view/theme/diabook/style.css index f9b92a7616..c87f51d1a4 100644 --- a/view/theme/diabook/style.css +++ b/view/theme/diabook/style.css @@ -845,6 +845,7 @@ nav #nav-directory-link, nav #nav-apps-link, nav #nav-site-linkmenu, nav #nav-home-link, +nav #nav-login-link, nav #nav-user-linkmenu { float: right; @@ -852,17 +853,23 @@ nav #nav-user-linkmenu nav #nav-user-linkmenu{ margin-right: 0px; } -nav #nav-home-link, #nav-directory-link, #nav-apps-link{ +nav #nav-home-link, #nav-directory-link, #nav-login-link, #nav-apps-link{ margin-left: 0px; margin-right: 0px; font-weight: bold; margin: 3px 5px; } nav #nav-directory-link{ - margin-right: 0px; + margin-right: 10px; } + +li#nav-site-linkmenu.nav-menu-icon{ + display: none; +} + nav #nav-home-link{ - margin-left: 0px; + margin-left: 0px; + display: none; } nav #nav-help-link .menu-popup, nav #nav-search-link .menu-popup, @@ -873,6 +880,8 @@ nav #nav-site-linkmenu .menu-popup { left: auto; } + + nav #nav-messages-linkmenu.on .icon.messages, nav #nav-messages-linkmenu.selected .icon.messages{ background-image: url("../../../view/theme/diabook/icons/messages2.png"); } diff --git a/view/theme/diabook/templates/nav.tpl b/view/theme/diabook/templates/nav.tpl index 45dc476141..037edbfda7 100644 --- a/view/theme/diabook/templates/nav.tpl +++ b/view/theme/diabook/templates/nav.tpl @@ -106,7 +106,7 @@ {{if $nav.home}} {{/if}} @@ -127,7 +127,7 @@ {{/if}} {{if $nav.login}} -
  • {{/if}} diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index b5fd4cc438..d3620177ec 100644 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -3,7 +3,7 @@ /* * Name: Diabook * Description: Diabook: report bugs and request here: http://pad.toktan.org/p/diabook or http://bugs.friendica.com/view_all_bug_page.php - * Version: (Version: 1.027) + * Version: (Version: 1.028) * Author: */ @@ -26,7 +26,7 @@ function diabook_init(&$a) { set_template_engine($a, 'smarty3'); //print diabook-version for debugging -$diabook_version = "Diabook (Version: 1.027)"; +$diabook_version = "Diabook (Version: 1.028)"; $a->page['htmlhead'] .= sprintf('', $diabook_version); //init css on network and profilepages @@ -36,6 +36,31 @@ $cssFile = null; load_config("diabook"); load_pconfig(local_user(), "diabook"); + +// adjust nav-bar, depending state of user +if (local_user() ) { + $a->page['htmlhead'] .= ' + '; + } + +if ($a->argv[0] == "profile" && $a->argv[1] != $a->user['nickname'] ) { + $a->page['htmlhead'] .= ' + '; + } + + //get statuses of boxes at right-hand-column $close_pages = get_diabook_config( "close_pages", 1 ); $close_profiles = get_diabook_config( "close_profiles", 0 ); @@ -76,7 +101,7 @@ if ($color=="dark") $color_path = "/diabook-dark/"; $(document).ready(function() { $("span.group_unselected").attr("style","display: none;"); $("span.group_selected").attr("style","display: none;"); - $("input.unticked.action").attr("style","float: left; margin-top: 5px;"); + $("input.unticked.action").attr("style","float: left; margin-top: 5px;-moz-appearance: none;"); $("li.menu-profile-list").attr("style","min-height: 22px;"); }); ';