Skip to content

Commit

Permalink
Styling updates for v3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Guy Primavera committed Oct 3, 2020
2 parents d12b3ac + 3c4bc71 commit 2395f6e
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 43 deletions.
6 changes: 3 additions & 3 deletions admin/adminBar/adminBarIcon.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Add icon in place of admin bar
function aquila_adminbar_icon() {
if ( is_admin_bar_showing() ) {
if ($GLOBALS['aquilaShowFullAdminbar']) {
if ( isset( $GLOBALS['aquilaShowFullAdminbar'] ) && $GLOBALS['aquilaShowFullAdminbar'] ) {
echo '<style>
.aquilaFront #wpadminbar {
display: block;
Expand All @@ -18,7 +18,7 @@ function aquila_adminbar_icon() {
// Add body class
function aquila_adminbar_open_class( $classes ) {
if ( is_admin_bar_showing() ) {
if ($GLOBALS['aquilaShowFullAdminbar']) {
if ( isset( $GLOBALS['aquilaShowFullAdminbar'] ) && isset( $GLOBALS['aquilaShowFullAdminbar'] ) ) {
$classes[] = 'aquilaOpenBar';
} else {
$classes[] = 'aquilaClosedBar';
Expand All @@ -30,4 +30,4 @@ function aquila_adminbar_open_class( $classes ) {
}
add_filter('body_class', 'aquila_adminbar_open_class');

?>
?>
30 changes: 15 additions & 15 deletions admin/adminBar/adminBarLinks.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php if ( __FILE__ == $_SERVER['SCRIPT_FILENAME'] ) { exit; }

// Admin Bar links
if (!$GLOBALS['aquilaShowAdminbarLinks']) {
if ( ! isset( $GLOBALS['aquilaShowAdminbarLinks'] ) || !$GLOBALS['aquilaShowAdminbarLinks'] ) {
add_action( 'admin_bar_menu', 'aquila_admin_bar_cleanup', 200 );
function aquila_admin_bar_cleanup()
function aquila_admin_bar_cleanup()
{
global $wp_admin_bar;
global $wp_admin_bar;
if ( !is_object( $wp_admin_bar ) ) {
return;
}
Expand All @@ -18,15 +18,15 @@ function aquila_admin_bar_cleanup()
if( (!$node->parent || 'top-secondary' == $node->parent) && (!in_array($node->id, $nodesKeep)) ) {
$wp_admin_bar->remove_menu( $node->id );
//echo $node->id . '<br/>';
}
}
}
}
}

// Remove nodes
add_action( 'admin_bar_menu', 'aquila_remove_wp_logo_nodes', 999 );
function aquila_remove_wp_logo_nodes() {
global $wp_admin_bar;
global $wp_admin_bar;
$wp_admin_bar->remove_node( 'about' );
$wp_admin_bar->remove_node( 'wporg' );
$wp_admin_bar->remove_node( 'documentation' );
Expand All @@ -45,9 +45,9 @@ function aquila_wp_logo_links($admin_bar){
'title' => __( 'WordPress Lessons', 'aquila-admin-theme' ),
'href' => 'https://codex.wordpress.org/WordPress_Lessons',
'meta' => array(
'title' => __(''),
'class' => __(''),
'target' => __('_blank'),
'title' => __(''),
'class' => __(''),
'target' => __('_blank'),
),
));
$admin_bar->add_menu( array(
Expand All @@ -56,9 +56,9 @@ function aquila_wp_logo_links($admin_bar){
'title' => __( 'WordPress User Guide', 'aquila-admin-theme' ),
'href' => 'http://easywpguide.com/wordpress-manual/',
'meta' => array(
'title' => __(''),
'class' => __(''),
'target' => __('_blank'),
'title' => __(''),
'class' => __(''),
'target' => __('_blank'),
),
));
$admin_bar->add_menu( array(
Expand All @@ -67,11 +67,11 @@ function aquila_wp_logo_links($admin_bar){
'title' => __( 'Aquila Support', 'aquila-admin-theme' ),
'href' => 'https://designbymito.com/support/',
'meta' => array(
'title' => __(''),
'class' => __(''),
'target' => __('_blank'),
'title' => __(''),
'class' => __(''),
'target' => __('_blank'),
),
));
}

?>
?>
2 changes: 1 addition & 1 deletion admin/options/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function aquila_img_upload( $optionGroup, $optionName ) {
$aquilaColourSettings = get_option( 'aquilaColourSettings' );
//$aquilaPrimary = $aquilaColourSettings['aquila_primary_colour'];
//$aquilaSecondary = $aquilaColourSettings['aquila_secondary_colour'];
$aquilaMenuBack = $aquilaColourSettings['aquila_menu_back_colour'];
$aquilaMenuBack = $aquilaColourSettings['aquila_menu_back_colour'] ?? '#616161';
if ( isset ( $options[$optionName] ) ) {
$imgSrc = $options[$optionName];
} else {
Expand Down
44 changes: 35 additions & 9 deletions css/login.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
/* LESS Elements 0.9 */
@import url('https://fonts.googleapis.com/css?family=Roboto:300,400,700&subset=latin-ext');
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
src: local('Roboto Light'), local('Roboto-Light'), url(https://fonts.gstatic.com/s/roboto/v20/KFOlCnqEu92Fr1MmSU5fChc9.ttf) format('truetype');
}
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v20/KFOmCnqEu92Fr1Mu7GxP.ttf) format('truetype');
}
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
src: local('Roboto Bold'), local('Roboto-Bold'), url(https://fonts.gstatic.com/s/roboto/v20/KFOlCnqEu92Fr1MmWUlfChc9.ttf) format('truetype');
}
.fontAwesome {
font-family: "fontAwesome" !important;
}
Expand Down Expand Up @@ -186,11 +203,23 @@ body.login #login form {
display: flex;
flex-direction: column;
}
body.login #login form p {
body.login #login form p,
body.login #login form .user-pass-wrap {
width: 320px;
max-width: 100%;
display: inline-flex;
margin: 0 auto;
display: flex;
flex-direction: column;
}
body.login #login form .forgetmenot {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
body.login #login form .forgetmenot label {
width: auto;
margin: 0;
}
body.login #login form input[type=checkbox]:checked:before {
content: "\f147";
Expand Down Expand Up @@ -267,8 +296,7 @@ body.login #login form input[type=checkbox] {
height: 16px;
display: inline-block;
line-height: 1;
margin-bottom: 3px;
margin-right: 5px;
margin: 5px;
}
body.login #login form input[type=checkbox]:focus {
width: 16px;
Expand All @@ -277,10 +305,8 @@ body.login #login form label {
font-size: 14px;
text-align: center;
width: 100%;
float: left;
text-transform: uppercase;
letter-spacing: 1px;
line-height: 2;
line-height: 1.4;
margin: 10px auto;
}
body.login #login form#resetpassform {
display: flex;
Expand Down
36 changes: 23 additions & 13 deletions css/login.less
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@import "vars.less";
@import "/../icons/variables.less";
// @import "../../icons/variables.less";
@import "../icons/variables.less";

/// Login

Expand Down Expand Up @@ -44,11 +45,23 @@ body.login {
.box-shadow(none);
display: flex;
flex-direction: column;
p {
p,
.user-pass-wrap {
width: 320px;
max-width: 100%;
display: inline-flex;
margin: 0 auto;
margin: 0 auto;
display: flex;
flex-direction: column;
}
.forgetmenot {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
label {
width: auto;
margin: 0;
}
}
input[type=checkbox]:checked:before {
content: "\f147";
Expand Down Expand Up @@ -98,20 +111,17 @@ body.login {
height: 16px;
display: inline-block;
line-height: 1;
margin-bottom: 3px;
margin-right: 5px;
margin: 5px;
&:focus{
width: 16px;
}
}
label {
font-size: 14px;
.tac;
width: 100%;
float: left;
text-transform: uppercase;
letter-spacing: 1px;
line-height: 2;
font-size: 14px;
.tac;
width: 100%;
line-height: 1.4;
margin: 10px auto;
}
&#resetpassform {
display: flex;
Expand Down
4 changes: 2 additions & 2 deletions login/aquila-login-screen.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

if (!$aquilaLoginDisable) {
add_filter( 'login_headerurl', 'aquila_admin_login_logo_url' );
add_filter( 'login_headertitle', 'aquila_admin_login_logo_title' );
add_filter( 'login_headertext', 'aquila_admin_login_logo_title' );
add_action( 'login_head', 'aquila_new_logo_login', 90 );
add_action('login_head', 'colourSchemeCSS');
add_action( 'login_enqueue_scripts', 'aquila_global_load_style' );
Expand Down Expand Up @@ -39,4 +39,4 @@ function aquila_new_logo_login() {
</style>";
}

?>
?>

0 comments on commit 2395f6e

Please sign in to comment.