Commit d738af87 by Scott

Clean up login form HTML in Snow/SnowFlat

parent 0bce2c06
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
/*---[ Start: global css ]---*/ /*---[ Start: global css ]---*/
.clearfix:after, .clearfix:after,
#qa-login-group:after, .qam-login-group:after,
.qa-header:after, .qa-header:after,
.qa-main-shadow:after, .qa-main-shadow:after,
.qa-footer-bottom-group:after, .qa-footer-bottom-group:after,
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
} }
.clearfix, .clearfix,
#qa-login-group, .qam-login-group,
.qa-header, .qa-header,
.qa-main-shadow, .qa-main-shadow,
.qa-nav-footer, .qa-nav-footer,
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
} }
.clearfix, .clearfix,
#qa-login-group, .qam-login-group,
.qa-header, .qa-header,
.qa-main-shadow, .qa-main-shadow,
.qa-nav-footer, .qa-nav-footer,
...@@ -228,102 +228,45 @@ p { ...@@ -228,102 +228,45 @@ p {
margin-top: 0; margin-top: 0;
} }
/*---[ other comomn used css ]---*/
#qa-register, #qa-login {
background: #0099cc; /* Old browsers */
background: -webkit-linear-gradient(top, #0099cc 0%, #0179b5 100%); /* Chrome10+,Safari5.1+ */
background: linear-gradient(to bottom, #0099cc 0%, #0179b5 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0099cc', endColorstr='#0179b5',GradientType=0); /* IE6-8 */
border: 1px solid #004f76;
color: #fff;
font-weight: bold;
padding: 3px 10px;
border-radius: 3px;
}
#qa-register:hover, #qa-register:focus,
#qa-login:hover, #qa-login:focus {
background: #1ca0cc; /* Old browsers */
background: -webkit-linear-gradient(top, #1ca0cc 0%, #0099cc 100%); /* Chrome10+,Safari5.1+ */
background: linear-gradient(to bottom, #1ca0cc 0%, #0099cc 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#1ca0cc', endColorstr='#0099cc',GradientType=0); /* IE6-8 */
}
/*---[ Begin: login bar css ]---*/ /*---[ Begin: login bar css ]---*/
#qa-login-bar { .qam-login-bar {
background: #ddd; background: #ddd;
margin: 0; margin: 0;
height: 30px; height: 30px;
border-bottom: 1px solid #aaa; border-bottom: 1px solid #aaa;
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.15); box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.15);
} }
.qam-login-group {
#qa-login-group {
width: 980px; width: 980px;
margin: 0 auto; margin: 0 auto;
padding: 2px 10px; padding: 2px 10px;
text-align: left; text-align: left;
} }
.qam-login-form {
#qa-loginform {
float: left; float: left;
} }
.qam-login-text, .qa-search-field {
#qa-userid, #qa-password, .qa-search-field {
width: 165px; width: 165px;
margin-right: 5px; margin-right: 5px;
padding: 4px 5px; padding: 4px 5px;
} }
.qam-login-text {
#qa-userid, #qa-password {
float: left; float: left;
} }
.qam-rememberbox {
#qa-loginform #qa-rememberbox {
float: left; float: left;
padding: 7px 5px 1px; padding: 7px 5px 1px;
} }
#qam-rememberme {
#qa-loginform #qa-rememberme {
margin: 0 5px 0 0;
float: left; float: left;
margin: 0 5px 0 0;
} }
.qam-remember {
#qa-loginform #qa-remember {
display: block;
line-height: 14px;
float: left; float: left;
line-height: 14px;
} }
#qa-login, #qa-register {
height: 25px;
margin: 0 0 0 5px;
}
#qa-forgot-password {
display: inline-block;
}
#qa-forgot-password a, #qa-forgot-password a:visited {
width: 24px;
height: 24px;
line-height: 25px;
font-size: 16px;
font-weight: bold;
text-align: center;
background: #ccc;
color: #777;
display: inline-block;
box-shadow: 1px 1px 0 0 #eee;
border-top: 1px solid #aaa;
border-left: 1px solid #aaa;
}
#qa-forgot-password a:hover, #qa-forgot-password a:active {
text-decoration: none;
background: #aa0000;
color: #fff;
}
/*-- search box --*/ /*-- search box --*/
.qa-search { .qa-search {
......
...@@ -9,23 +9,21 @@ class qa_html_theme extends qa_html_theme_base ...@@ -9,23 +9,21 @@ class qa_html_theme extends qa_html_theme_base
public function nav_user_search() public function nav_user_search()
{ {
if (!qa_is_logged_in()) { if (!qa_is_logged_in()) {
$login=@$this->content['navigation']['user']['login']; if (isset($this->content['navigation']['user']['login']) && !QA_FINAL_EXTERNAL_USERS) {
$login = $this->content['navigation']['user']['login'];
if (isset($login) && !QA_FINAL_EXTERNAL_USERS) {
$this->output( $this->output(
'<!--[Begin: login form]-->', '<form class="qam-login-form" action="'.$login['url'].'" method="post">',
'<form id="qa-loginform" action="'.$login['url'].'" method="post">', '<input type="text" class="qam-login-text" name="emailhandle" placeholder="'.trim(qa_lang_html(qa_opt('allow_login_email_only') ? 'users/email_label' : 'users/email_handle_label'), ':').'">',
'<input type="text" id="qa-userid" name="emailhandle" placeholder="'.trim(qa_lang_html(qa_opt('allow_login_email_only') ? 'users/email_label' : 'users/email_handle_label'), ':').'" />', '<input type="password" class="qam-login-text" name="password" placeholder="'.trim(qa_lang_html('users/password_label'), ':').'">',
'<input type="password" id="qa-password" name="password" placeholder="'.trim(qa_lang_html('users/password_label'), ':').'" />', '<div class="qam-rememberbox"><input type="checkbox" name="remember" id="qam-rememberme" value="1">',
'<div id="qa-rememberbox"><input type="checkbox" name="remember" id="qa-rememberme" value="1"/>', '<label for="qam-rememberme" class="qam-remember">'.qa_lang_html('users/remember').'</label></div>',
'<label for="qa-rememberme" id="qa-remember">'.qa_lang_html('users/remember').'</label></div>', '<input type="hidden" name="code" value="'.qa_html(qa_get_form_security_code('login')).'">',
'<input type="hidden" name="code" value="'.qa_html(qa_get_form_security_code('login')).'"/>', '<input type="submit" value="' . qa_lang_html('users/login_button') . '" class="qa-form-tall-button qa-form-tall-button-login" name="dologin">',
'<input type="submit" value="'.$login['label'].'" id="qa-login" name="dologin" />', '</form>'
'</form>',
'<!--[End: login form]-->'
); );
unset($this->content['navigation']['user']['login']); // removes regular navigation link to log in page // remove regular navigation link to log in page
unset($this->content['navigation']['user']['login']);
} }
} }
...@@ -65,7 +63,7 @@ class qa_html_theme extends qa_html_theme_base ...@@ -65,7 +63,7 @@ class qa_html_theme extends qa_html_theme_base
// adds login bar, user navigation and search at top of page in place of custom header content // adds login bar, user navigation and search at top of page in place of custom header content
public function body_header() public function body_header()
{ {
$this->output('<div id="qa-login-bar"><div id="qa-login-group">'); $this->output('<div class="qam-login-bar"><div class="qam-login-group">');
$this->nav_user_search(); $this->nav_user_search();
$this->output('</div></div>'); $this->output('</div></div>');
} }
...@@ -119,7 +117,7 @@ class qa_html_theme extends qa_html_theme_base ...@@ -119,7 +117,7 @@ class qa_html_theme extends qa_html_theme_base
$feed=@$this->content['feed']; $feed=@$this->content['feed'];
if (!empty($feed)) if (!empty($feed))
$this->output('<a href="'.$feed['url'].'" title="'.@$feed['label'].'"><img src="'.$this->rooturl.'images/rss.jpg" alt="" width="16" height="16" border="0" class="qa-rss-icon"/></a>'); $this->output('<a href="'.$feed['url'].'" title="'.@$feed['label'].'"><img src="'.$this->rooturl.'images/rss.jpg" alt="" width="16" height="16" border="0" class="qa-rss-icon"></a>');
} }
// add view count to question list // add view count to question list
......
...@@ -711,16 +711,8 @@ blockquote p { ...@@ -711,16 +711,8 @@ blockquote p {
line-height: 1.8; line-height: 1.8;
} }
#qa-login { .qam-account-items .qa-form-tall-button-login {
background-color: #3498db;
width: 100%; width: 100%;
color: #fff;
border-color: #3498db;
}
#qa-login:hover {
background-color: #2980b9;
border-color: #2980b9;
cursor: pointer;
} }
.qa-nav-user { .qa-nav-user {
......
...@@ -51,7 +51,7 @@ class qa_html_theme extends qa_html_theme_base ...@@ -51,7 +51,7 @@ class qa_html_theme extends qa_html_theme_base
*/ */
public function head_metas() public function head_metas()
{ {
$this->output('<meta name="viewport" content="width=device-width, initial-scale=1"/>'); $this->output('<meta name="viewport" content="width=device-width, initial-scale=1">');
parent::head_metas(); parent::head_metas();
} }
...@@ -164,13 +164,13 @@ class qa_html_theme extends qa_html_theme_base ...@@ -164,13 +164,13 @@ class qa_html_theme extends qa_html_theme_base
if (isset($this->content['navigation']['user']['login']) && !QA_FINAL_EXTERNAL_USERS) { if (isset($this->content['navigation']['user']['login']) && !QA_FINAL_EXTERNAL_USERS) {
$login = $this->content['navigation']['user']['login']; $login = $this->content['navigation']['user']['login'];
$this->output( $this->output(
'<form id="qa-loginform" action="' . $login['url'] . '" method="post">', '<form action="' . $login['url'] . '" method="post">',
'<input type="text" id="qa-userid" name="emailhandle" placeholder="' . trim(qa_lang_html('users/email_handle_label'), ':') . '" />', '<input type="text" name="emailhandle" placeholder="' . trim(qa_lang_html('users/email_handle_label'), ':') . '">',
'<input type="password" id="qa-password" name="password" placeholder="' . trim(qa_lang_html('users/password_label'), ':') . '" />', '<input type="password" name="password" placeholder="' . trim(qa_lang_html('users/password_label'), ':') . '">',
'<div id="qa-rememberbox"><input type="checkbox" name="remember" id="qa-rememberme" value="1" />', '<div><input type="checkbox" name="remember" id="qam-rememberme" value="1">',
'<label for="qa-rememberme" id="qa-remember">' . qa_lang_html('users/remember') . '</label></div>', '<label for="qam-rememberme">' . qa_lang_html('users/remember') . '</label></div>',
'<input type="hidden" name="code" value="' . qa_html(qa_get_form_security_code('login')) . '" />', '<input type="hidden" name="code" value="' . qa_html(qa_get_form_security_code('login')) . '">',
'<input type="submit" value="' . $login['label'] . '" id="qa-login" name="dologin" />', '<input type="submit" value="' . $login['label'] . '" class="qa-form-tall-button qa-form-tall-button-login" name="dologin">',
'</form>' '</form>'
); );
...@@ -336,7 +336,7 @@ class qa_html_theme extends qa_html_theme_base ...@@ -336,7 +336,7 @@ class qa_html_theme extends qa_html_theme_base
$closedText = qa_lang('main/closed'); $closedText = qa_lang('main/closed');
$imgHtml = empty($q_item['closed']) $imgHtml = empty($q_item['closed'])
? '' ? ''
: '<img src="' . $this->rooturl . $this->icon_url . '/closed-q-list.png" class="qam-q-list-close-icon" alt="' . $closedText . '" title="' . $closedText . '" />'; : '<img src="' . $this->rooturl . $this->icon_url . '/closed-q-list.png" class="qam-q-list-close-icon" alt="' . $closedText . '" title="' . $closedText . '">';
$this->output( $this->output(
'<div class="qa-q-item-title">', '<div class="qa-q-item-title">',
...@@ -370,7 +370,7 @@ class qa_html_theme extends qa_html_theme_base ...@@ -370,7 +370,7 @@ class qa_html_theme extends qa_html_theme_base
$closedText = qa_lang('main/closed'); $closedText = qa_lang('main/closed');
$imgHtml = empty($q_view['closed']) $imgHtml = empty($q_view['closed'])
? '' ? ''
: '<img src="' . $this->rooturl . $this->icon_url . '/closed-q-view.png" class="qam-q-view-close-icon" alt="' . $closedText . '" width="24" height="24" title="' . $closedText . '" />'; : '<img src="' . $this->rooturl . $this->icon_url . '/closed-q-view.png" class="qam-q-view-close-icon" alt="' . $closedText . '" width="24" height="24" title="' . $closedText . '">';
if (isset($this->content['title'])) { if (isset($this->content['title'])) {
$this->output( $this->output(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment