<?php
// Custom login form

function novablog_login_logo() {
if ( function_exists( 'novablog_getVariable' ) ) {
if(novablog_getVariable('login_form_logo','url')){
?>
<style type="text/css">
.login h1 a {
    background-image: url(<?php echo esc_url( novablog_getVariable('login_form_logo','url'));?>)!important;
    width: 100%!important; 
    margin: 0 auto 25px!important;
    padding: 0!important;
    background-size: 100%!important;
}

body.login {
    background-image:url(<?php echo esc_url( novablog_getVariable('login_form_image_bg','url')); ?>)!important;
    background: no-repeat #fff;
    background-origin: unset!important;
    background-clip: unset!important;
    background-size: cover!important;
    background-attachment: scroll!important;
}

.login form{box-shadow:unset!important;border:1px solid #222!important}.login .message{border-left:4px solid #fff!important;background-color:#FFF!important;box-shadow:unset!important}.login form .input,.login form input[type=checkbox],.login input[type=text]{background:#fff!important}input[type=checkbox],input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=radio],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select,textarea{border-top:0!important;border-left:0!important;border-right:0!important;border-bottom:1px solid #ddd!important;box-shadow:unset!important;background-color:#FFF!important}.wp-core-ui .button-primary{text-shadow:0 0 0 #fff,0 0 0 #fff,0 0 0 #fff,0 0 0 #fff!important;background:#fff!important;border-color:#222!important;box-shadow:unset!important;color:#222!important;text-decoration:none!important;border-radius:0!important}input[type=checkbox]:focus,input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=radio]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,select:focus,textarea:focus{border-color:#ddd!important;box-shadow:unset!important}.wp-core-ui .button-primary.focus,.wp-core-ui .button-primary.hover,.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#222!important;border-color:#222!important;box-shadow:unset!important;color:#FFF!important}.login #backtoblog a:hover,.login #nav a:hover,.login h1 a:hover{color:#222!important}
    </style>
<?php }}}
add_action( 'login_enqueue_scripts', 'novablog_login_logo' );

function novablog_login_logo_url() {
    return esc_url( home_url( '/' ) );
}
add_filter( 'login_headerurl', 'novablog_login_logo_url' );

function novablog_login_logo_url_title() {
    return '';
}
add_filter( 'login_headertitle', 'novablog_login_logo_url_title' ); ?>
