From db710cd2dfc67f4bb4c6dfde5ff62cf0a11d9f08 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 1 Feb 2017 14:45:52 -0800 Subject: fix a few style issues with nav login panel --- boot.php | 3 ++- include/nav.php | 2 +- view/theme/redbasic/css/style.css | 16 ++++++++++------ view/tpl/login.tpl | 4 ++++ view/tpl/nav.tpl | 8 -------- view/tpl/remote_login.tpl | 2 +- 6 files changed, 18 insertions(+), 17 deletions(-) diff --git a/boot.php b/boot.php index 0eae8b3ed..5fe42a03f 100755 --- a/boot.php +++ b/boot.php @@ -1694,7 +1694,7 @@ function fix_system_urls($oldurl, $newurl) { // link. This will most always depend on the value of App::$config['system']['register_policy']. // returns the complete html for inserting into the page -function login($register = false, $form_id = 'main-login', $hiddens=false) { +function login($register = false, $form_id = 'main-login', $hiddens=false, $login_page = true) { $o = ''; $reg = false; $reglink = get_config('system', 'register_link'); @@ -1720,6 +1720,7 @@ function login($register = false, $form_id = 'main-login', $hiddens=false) { $o .= replace_macros($tpl,array( '$dest_url' => $dest_url, + '$login_page' => $login_page, '$logout' => t('Logout'), '$login' => t('Login'), '$form_id' => $form_id, diff --git a/include/nav.php b/include/nav.php index 25f2a1df4..7d6877600 100644 --- a/include/nav.php +++ b/include/nav.php @@ -112,7 +112,7 @@ EOT; } else { if(! get_account_id()) { - $nav['login'] = login(); + $nav['login'] = login(true,'main-login',false,false); $nav['loginmenu'][] = Array('login',t('Login'),'',t('Sign in'),'login_nav_btn'); } else diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index cd222e06d..77b969712 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -2106,16 +2106,20 @@ dl.bb-dl > dd > li { text-align: center; } -.rmagic-button { - padding-top: 10px; - margin-left: 10px; - margin-bottom: 10px; -} - #nav-login { display: none; width: 200px; border: 1px solid #ccc; border-radius: $radiuspx; +} + +.login-dropdown-menu { + padding: 8px; + background-color: #eee; +} + +.rmagic-button { + margin: 15px 0 5px; + } \ No newline at end of file diff --git a/view/tpl/login.tpl b/view/tpl/login.tpl index d56c8f272..1c2841adf 100755 --- a/view/tpl/login.tpl +++ b/view/tpl/login.tpl @@ -1,4 +1,6 @@ +{{if $login_page}}
+{{/if}}
@@ -17,5 +19,7 @@ {{/foreach}} +{{if $login_page}}
+{{/if}} \ No newline at end of file diff --git a/view/tpl/nav.tpl b/view/tpl/nav.tpl index 86f9d5cf9..bda833b94 100755 --- a/view/tpl/nav.tpl +++ b/view/tpl/nav.tpl @@ -160,16 +160,8 @@ - {{/if}} {{if $nav.register}} diff --git a/view/tpl/remote_login.tpl b/view/tpl/remote_login.tpl index 1d11fb712..e6d387265 100644 --- a/view/tpl/remote_login.tpl +++ b/view/tpl/remote_login.tpl @@ -1 +1 @@ -{{$title}} +{{$title}} -- cgit v1.2.3