Last active
December 21, 2017 15:49
-
-
Save codigoconjuan/358e5406f6ba4406827cca4da0aea277 to your computer and use it in GitHub Desktop.
Gist para cambiar el Login de WordPress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function admin_styles() { | |
wp_enqueue_style( 'vegasCSS', get_template_directory_uri() . '/login/css/vegas.min.css', false ); | |
wp_enqueue_style( 'loginCSS', get_template_directory_uri() . '/login/css/loginStyles.css', false ); | |
wp_enqueue_script( 'jquery' ); | |
wp_enqueue_script( 'vegasJS', get_template_directory_uri() . '/login/js/vegas.min.js', array('jquery'), '1.0.0', true); | |
wp_enqueue_script( 'loginjs', get_template_directory_uri() . '/login/js/login.js', array('jquery'), '1.0.0', true); | |
wp_localize_script( | |
'loginjs', | |
'login_imagenes', | |
array( | |
"ruta_plantilla" => get_template_directory_uri() | |
) | |
); | |
} | |
add_action('login_enqueue_scripts', 'admin_styles', 10 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(function($) { | |
$('#login h1, #login form').wrapAll('<div class="grupo"></div>'); | |
$("body").vegas({ | |
slides: [ | |
{ src: login_imagenes.ruta_plantilla + "/login/img/1.jpg" }, | |
{ src: login_imagenes.ruta_plantilla + "/login/img/2.jpg" }, | |
{ src: login_imagenes.ruta_plantilla + "/login/img/3.jpg" } | |
], | |
overlay: login_imagenes.ruta_plantilla + "/login/img/overlays/05.png", | |
transition: ['fade', 'zoomOut', 'swirlLeft'] | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body.login { | |
background: transparent; | |
padding-top: 100px; | |
box-sizing: border-box; | |
} | |
body.login div#login { | |
background-color: rgba(0,0,0, .65); | |
padding: 40px 30px; | |
border-radius: 15px; | |
-webkit-box-shadow: -3px 7px 35px 1px rgba(0,0,0,.8); | |
box-shadow: -3px 7px 35px 1px rgba(0,0,0,.8); | |
} | |
@media screen and (min-width:768px) { | |
body.login div#login { | |
width:700px; | |
margin:auto; | |
position: absolute; | |
top:0; left:0; bottom:0; right:0; | |
height: 330px; | |
} | |
} | |
body.login div#login h1 { | |
} | |
@media screen and (min-width:768px) { | |
body.login div#login h1 { | |
display: inline-block; | |
margin-top: 110px; | |
width:50%; | |
} | |
} | |
body.login div#login h1 a { | |
background-image: url(../img/logo.png); | |
height:100px; | |
background-size: 50%; | |
width:100%; | |
margin:0; | |
} | |
body.login div#login form#loginform { | |
float: right; | |
} | |
body.login div#login form#loginform p { | |
color: #000000; | |
} | |
body.login div#login form#loginform p label { | |
color: #000000; | |
} | |
body.login div#login form#loginform input { | |
background: #ffffff; | |
border:1px solid #000000; | |
} | |
body.login div#login form#loginform input#user_login {} | |
body.login div#login form#loginform input#user_pass {} | |
body.login div#login form#loginform p.forgetmenot { | |
margin-top: 7px; | |
} | |
body.login div#login form#loginform p.forgetmenot input#rememberme {} | |
body.login div#login form#loginform p.submit {} | |
body.login div#login form#loginform p.submit input#wp-submit { | |
background-color: #000000; | |
border:none; | |
text-transform: uppercase; | |
padding: 5px 40px; | |
height:auto; | |
box-shadow: none; | |
text-shadow: none; | |
font-weight: bold; | |
} | |
body.login div#login form#loginform p.submit input#wp-submit:focus { | |
box-shadow: none; | |
} | |
body.login div#login p#nav { | |
text-align: center; | |
} | |
@media screen and (min-width:768px) { | |
body.login div#login p#nav { | |
display: inline; | |
} | |
} | |
body.login div#login p#nav a { | |
color:#ffffff; | |
} | |
body.login div#login p#backtoblog { | |
text-align: center; | |
} | |
@media screen and (min-width:768px) { | |
body.login div#login p#backtoblog { | |
display: inline; | |
float: right; | |
margin:0; | |
} | |
} | |
body.login div#login p#backtoblog a { | |
color: #ffffff; | |
} | |
#login_error { | |
width:100%; | |
position: absolute; | |
top:0; | |
left:0; | |
box-sizing: border-box; | |
} | |
.grupo { | |
margin-bottom: 20px; | |
} | |
.grupo:after { | |
visibility: hidden; | |
display: block; | |
content:""; | |
clear: both; | |
height: 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment