Skip to content

Commit

Permalink
Changement typo + login page light
Browse files Browse the repository at this point in the history
  • Loading branch information
yannkozon committed Jan 14, 2018
1 parent 7e59e3b commit 7fbae35
Show file tree
Hide file tree
Showing 40 changed files with 117 additions and 162 deletions.
3 changes: 2 additions & 1 deletion add-oembed-wrapper.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php
defined('ABSPATH') or die();

/*
MU Plugin: add-oembed-wrapper
Description: Add oembed wrapper
Author: Yann Kozon
Author URI: http://www.yannkozon.com
Author URI: https://www.yannkozon.com
*/

function mu_add_oembed_wrapper( $html, $url, $attr, $post_id ) {
Expand Down
18 changes: 3 additions & 15 deletions custom-login-page.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<?php
defined('ABSPATH') or die();

/*
MU Plugin: custom-login-page
Description: Custom login page
Author: Yann Kozon
Author URI: http://www.yannkozon.com
Author URI: https://www.yannkozon.com
*/

define( 'MU_CLP_BACKGROUND', null );

function mu_clp_login_headerurl() {
return home_url();
}
Expand All @@ -20,21 +19,10 @@ function mu_clp_login_headertitle() {
add_filter( 'login_headertitle', 'mu_clp_login_headertitle' );

function clp_login_message() {
return '<h2 class="login-title">' . __( 'Backstage', 'mu-custom-login-page' ) . '</h2>';
return '<h2 class="login-title">' . __( 'Administration', 'mu-custom-login-page' ) . '</h2>';
}
add_filter( 'login_message', 'clp_login_message' );

function mu_clp_login_body_class( $classes ) {
if( MU_CLP_BACKGROUND == null ) {
$classes[] = 'clp-background-' . rand( 1, 5 );
} else {
$classes[] = 'clp-background-' . MU_CLP_BACKGROUND;
}

return $classes;
}
add_filter( 'login_body_class', 'mu_clp_login_body_class' );

function mu_clp_login_head() {
// Remove error shake effect
remove_action( 'login_head', 'wp_shake_js', 12 );
Expand Down
2 changes: 1 addition & 1 deletion custom-login-page/css/login.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified custom-login-page/images/large/clp-background-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified custom-login-page/images/large/clp-background-2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified custom-login-page/images/large/clp-background-3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified custom-login-page/images/large/clp-background-4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified custom-login-page/images/large/clp-background-5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion custom-login-page/images/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified custom-login-page/images/medium/clp-background-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified custom-login-page/images/medium/clp-background-2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified custom-login-page/images/medium/clp-background-3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified custom-login-page/images/medium/clp-background-4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified custom-login-page/images/medium/clp-background-5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified custom-login-page/images/small/clp-background-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified custom-login-page/images/small/clp-background-2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified custom-login-page/images/small/clp-background-3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified custom-login-page/images/small/clp-background-4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
185 changes: 62 additions & 123 deletions custom-login-page/scss/login.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
$color : #1D2226;
$colorDark : #000;
$color : #384d72;
$colorDark : #2c3c59;

html, body {
background : #efefef;
min-height : 100%;
height : 100%;
}
Expand All @@ -10,177 +11,115 @@ body.login {
height:auto;

* {
box-sizing:border-box;
}

&.clp-background-1 {
// Photo by Matthew Wiebe - https://unsplash.com/matthewwiebe
background:$color url(../images/medium/clp-background-1.jpg) center center/cover;

@media screen and (min-width: 1680px) {
background:$color url(../images/large/clp-background-1.jpg) center center/cover;
}

@media screen and (max-width: 768px) {
background:$color url(../images/small/clp-background-1.jpg) center center/cover;
}
}
&.clp-background-2 {
// Photo by Burak Kebapci - https://www.pexels.com/u/weekendplayer
background:$color url(../images/clp-background-2.jpg) center center/cover;

@media screen and (min-width: 1680px) {
background:$color url(../images/large/clp-background-2.jpg) center center/cover;
}

@media screen and (max-width: 768px) {
background:$color url(../images/small/clp-background-2.jpg) center center/cover;
}
}
&.clp-background-3 {
// Photo by Fritz Bielmeier - https://unsplash.com/fritzbielmeier
background:$color url(../images/clp-background-3.jpg) center center/cover;

@media screen and (min-width: 1680px) {
background:$color url(../images/large/clp-background-3.jpg) center center/cover;
}

@media screen and (max-width: 768px) {
background:$color url(../images/small/clp-background-3.jpg) center center/cover;
}
}
&.clp-background-4 {
// Photo by Jay Mantri - http://jaymantri.com/post/104375101928/download
background:$color url(../images/clp-background-4.jpg) center center/cover;

@media screen and (min-width: 1680px) {
background:$color url(../images/large/clp-background-4.jpg) center center/cover;
}

@media screen and (max-width: 768px) {
background:$color url(../images/small/clp-background-4.jpg) center center/cover;
}
}
&.clp-background-5 {
// Photo by Caleb Morris - http://www.caleb-morris.com/
background:$color url(../images/clp-background-5.jpg) center center/cover;

@media screen and (min-width: 1680px) {
background:$color url(../images/large/clp-background-5.jpg) center center/cover;
}

@media screen and (max-width: 992px) {
background:$color url(../images/small/clp-background-5.jpg) center center/cover;
}
box-sizing : border-box;
}

#login {
perspective:65.0rem;
position:relative;
max-width:22.0rem;
padding:5% 0;
width:100%;
perspective : 65.0rem;
position : relative;
max-width : 22.0rem;
padding : 5% 0;
width : 100%;
}

h1 {
box-sizing:border-box;
padding:1.0rem;
background-color:$color;
transition:all .4s;
transform-origin:0 100%;
box-sizing : border-box;
padding : 1.0rem;
background : $color;
transition : transform .4s;
transform-origin : 0 100%;

a {
background:url(../images/logo.svg) center center/contain no-repeat;
margin:0 auto;
width:100%;
height:5.0rem;
transition:all .4s;
background : url(../images/logo.svg) center center/contain no-repeat;
margin : 0 auto;
width : 100%;
height : 4.0rem;
}

&:hover {
transform:rotateX(-25deg);
transform : rotateX(-25deg);
}
}

form {
margin:0;
box-shadow:none;
padding:1.5rem;
margin : 0;
box-shadow : none;
padding : 1.5rem;
}

a, #nav a {
color:$color;
text-decoration:underline;
color : $color;
text-decoration : underline;

&:hover, &:focus {
color:$colorDark;
color : $colorDark;
}

&:focus {
box-shadow:none;
outline:thin dotted #000;
box-shadow : none;
outline : thin dotted $color;
}
}

label {
font-size:.9rem;
font-size : .9rem;
}

input[type=text], input[type=password] {
text-shadow:none;
box-shadow:none;
border-radius:0;
font-size:1.0rem;
padding:.6rem;
text-shadow : none;
box-shadow : none;
border-radius : 0;
font-size : 1.0rem;
padding : .6rem;

&:focus {
box-shadow:none;
border-color:$color;
box-shadow : none;
border-color : $color;
}
}

.login-title {
padding:1.5rem 0 1.0rem 0;
background-color:white;
text-align:center;
font-weight:normal;
font-size:2.0rem;
padding : 1.5rem 0 1.0rem 0;
background : white;
text-align : center;
font-weight : normal;
font-size : 2.0rem;
}

#login_error {
margin:0;
padding:1.5rem 1.5rem 0 1.5rem;
border:0;
box-shadow:none;
margin : 0;
padding : 1.5rem 1.5rem 0 1.5rem;
border : 0;
box-shadow : none;
}

#wp-submit {
background-color:$color;
text-shadow:none;
box-shadow:none;
border-radius:0;
float:none;
border:0;
padding:.6rem 2.5rem;
height:auto;
font-size:1.0rem;
width:100%;
transition:all .4s;
background : $color;
text-shadow : none;
box-shadow : none;
border-radius : 0;
float : none;
border : 0;
padding : .6rem 2.5rem;
height : auto;
font-size : 1.0rem;
width : 100%;
transition : background .4s;

&:hover, &:focus {
background-color:$colorDark;
background : $colorDark;
}
}

#nav, &.mobile #login #nav {
margin:0;
padding:0 2.0rem 2.0rem 2.0rem;
background:white;
font:.9rem;
text-align:center;
margin : 0;
padding : 0 2.0rem 2.0rem 2.0rem;
background : white;
font : .9rem;
text-align : center;
}

#backtoblog, p.forgetmenot, .message {
display:none;
display : none;
}
}
3 changes: 2 additions & 1 deletion disable-autosave.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php
defined('ABSPATH') or die();

/*
MU Plugin: disable-autosave
Description: Disable autosave
Author: Yann Kozon
Author URI: http://www.yannkozon.com
Author URI: https://www.yannkozon.com
*/

function mu_disable_autosave() {
Expand Down
3 changes: 2 additions & 1 deletion disable-feed.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php
defined('ABSPATH') or die();

/*
MU Plugin: disable-feed
Description: Disable feed - RSS, Atom...
Author: Yann Kozon
Author URI: http://www.yannkozon.com
Author URI: https://www.yannkozon.com
*/

function mu_disable_feed() {
Expand Down
3 changes: 2 additions & 1 deletion disable-rest-api.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php
defined('ABSPATH') or die();

/*
MU Plugin: disable-rest-api
Description: Disable rest api
Author: Yann Kozon
Author URI: http://www.yannkozon.com
Author URI: https://www.yannkozon.com
*/

function mu_disable_rest_api( ) {
Expand Down
3 changes: 2 additions & 1 deletion hide-admin-bar.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php
defined('ABSPATH') or die();

/*
MU Plugin: hide-admin-bar
Description: Hide admin bar
Author: Yann Kozon
Author URI: http://www.yannkozon.com
Author URI: https://www.yannkozon.com
*/

add_filter( 'show_admin_bar', '__return_false' );
3 changes: 2 additions & 1 deletion remove-default-widgets.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php
defined('ABSPATH') or die();

/*
MU Plugin: remove-default-widgets
Description: Remove default widgets
Author: Yann Kozon
Author URI: http://www.yannkozon.com
Author URI: https://www.yannkozon.com
*/

function mu_remove_default_widgets() {
Expand Down
3 changes: 2 additions & 1 deletion remove-emoji-support.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php
defined('ABSPATH') or die();

/*
MU Plugin: remove-emoji-support
Description: Remove emoji support
Author: Yann Kozon
Author URI: http://www.yannkozon.com
Author URI: https://www.yannkozon.com
*/

remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
Expand Down
Loading

0 comments on commit 7fbae35

Please sign in to comment.