<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>CodePen - Sign In / Sign Up form</title>
<link rel="stylesheet" href="./style.css">
</head>
<body>
<!-- partial:index.partial.html -->
<!--
Hello! Thank you for stopping by!
Don't forget to follow me on:
Dribbble: https://dribbble.com/gardiandesign and
LinkedIn: https://www.linkedin.com/in/darjan-gardinovacki-602252132/
Cheers, Darjan!
-->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css" integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay" crossorigin="anonymous">
<body>
<div class="container_SignUp">
<!-- Sign In - Hero Image -->
<div class="heroSignInBackground">
<div class="heroSignInBackgroundOverlay">
<div class="containerHeroSignIn">
<div class="signInContent">
<h1>Hello friend, welcome!</h1>
<hr>
<p>Login your details to start<br>your journey.</p>
</div>
<div class="heroSignInButton">
<button class="buttonHeroSignIn" onclick="signIn()">SIGN IN</button>
</div>
</div>
</div>
</div>
<!-- Sign Up - Form -->
<div class="containerSignUp">
<div class="socialIcons">
<h1>Create Account</h1>
<a href="#" class="social"><i class="fab fa-facebook-f"></i></a>
<a href="#" class="social"><i class="fab fa-google-plus-g"></i></a>
<a href="#" class="social"><i class="fab fa-linkedin-in"></i></a>
</div>
<div class="containerFormSignUp">
<form action="#">
<span class ="title">or use your email for registration:</span>
<input type="text" placeholder="Name" />
<input type="email" placeholder="Email" />
<input type="password" placeholder="Password" />
</form>
</div>
<div class="formSignUpButton">
<button class="buttonFormSignUp">SIGN UP</button>
</div>
</div>
</div>
<div class="container_SignIn" id="container_SignIn">
<!-- Sign In - Form -->
<div class="containerSignIn">
<div class="socialIcons">
<h1>Sign In</h1>
<a href="#" class="social"><i class="fab fa-facebook-f"></i></a>
<a href="#" class="social"><i class="fab fa-google-plus-g"></i></a>
<a href="#" class="social"><i class="fab fa-linkedin-in"></i></a>
</div>
<div class="containerFormSignIn">
<form action="#">
<span class ="title">or use your email account:</span>
<input type="email" placeholder="Email" />
<input type="password" placeholder="Password" />
<a href="#">forgot your password?</a>
</form>
</div>
<div class="formSignInButton">
<button class="buttonFormSignIn">SIGN IN</button>
</div>
</div>
<!-- Sign Up - Hero Image -->
<div class="heroSignUpBackground" id="containerHeroSignUp">
<div class="heroSignUpBackgroundOverlay">
<div class="containerHeroSignUp">
<div class="signUpContent">
<h1>Not a member?</h1>
<hr>
<p>Enter your personal details<br>and start your journey.</p>
</div>
<div class="heroSignUpButton" onclick="signUp()">
<button class="buttonHeroSignUp">SIGN UP</button>
</div>
</div>
</div>
</div>
</div>
<footer>
<p>Design & Code by<a href="https://www.gardiandesign.com" target="_blank">Darjan Gardinovacki</a>- 2019</p>
</footer>
<script src="script.js"></script>
</body>
<!-- partial -->
<script src="./script.js"></script>
</body>
</html>
/***************************************************************************
* *
* Hello! Thank you for stopping by! *
* Don't forget to follow me on: *
* Dribbble: https://dribbble.com/gardiandesign *
* LinkedIn: https://www.linkedin.com/in/darjan-gardinovacki-602252132/ *
* Cheers, Darjan! *
* *
***************************************************************************/
@import url('https://fonts.googleapis.com/css?family=Roboto&display=swap');
@import url('https://fonts.googleapis.com/css?family=Noto+Serif&display=swap');
* {
box-sizing: border-box;
}
/*====================================
GLOBAL ELEMENTS
====================================*/
body {
font-family: 'Roboto', sans-serif;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100vh;
background: #E3E3E3;
}
footer {
background-color: black;
bottom: 0;
position: fixed;
left: 0;
right: 0;
text-align: center;
z-index: 999;
}
footer p {
color: #dd8d38;
font-size: 12px;
}
h1 {
font-family: 'Noto Serif', serif;
font-size: 26px;
letter-spacing: 1px;
}
p {
font-size: 14px;
text-align: center;
color: rgb(200, 200, 200);
}
hr {
display: block;
height: 3px;
border: 0;
border-top: 3px solid #dd8d38;
margin: 0px 0px 135px 0px;
padding: 0;
width: 50px;
}
.title {
color: rgb(200, 200, 200);
font-size: 16px;
}
a {
padding: 10px;
text-align: center;
text-decoration: none;
color: rgb(200, 200, 200);
}
.socialIcons {
margin: 30px 0;
text-align: center;
color: #dd8d38;
}
.socialIcons a {
border: 1px solid #dd8d38;
color: #dd8d38;
border-radius: 15%;
display: inline-flex;
justify-content: center;
align-items: center;
margin: 0 5px;
height: 30px;
width: 30px;
text-decoration: none;
}
.socialIcons a:hover {
background-color: #dd8d38;
color: white;
transition: all .5s ease-out;
}
/*====================================
SIGN IN - HERO IMAGE
====================================*/
.container_SignUp {
border-radius: 25px 0px 25px 25px;
display: grid;
grid-template-columns: 1fr 1.6fr;
background: white;
box-shadow: 0px 0px 38px 22px rgba(0,0,0,0.14);
position: absolute;
overflow: hidden;
width: 650px;
max-width: 100%;
height: 450px;
z-index: 1;
}
.heroSignInBackground {
background: url("https://images.unsplash.com/photo-1523567830207-96731740fa71?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=634&q=80");
background-size: cover;
}
.heroSignInBackgroundOverlay {
background: rgba(0, 0, 0, 0.5);
}
.containerHeroSignIn {
display: grid;
grid-template-rows: 80% 20%;
}
.signInContent {
padding: 30px;
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
height: 360px;
text-align: center;
color: white;
margin: 0px;
}
.heroSignInButton {
display: flex;
height: 90px;
flex-direction: column;
justify-content: center;
align-items: center;
}
.buttonHeroSignIn {
font-size: 14px;
border: 2px solid white;
border-radius: 50px;
width: 150px;
height: 40px;
background: linear-gradient(to right, #dd8d38 50%, white 50%);
background-size: 200% 100%;
background-position: right top;
transition: all .3s ease-out;
color: #dd8d38;
}
.buttonHeroSignIn:hover {
cursor: pointer;
color: white;
background-position: left bottom;
}
.buttonHeroSignIn:focus {
outline: none;
}
/*====================================
SIGN UP FORM
====================================*/
.containerSignUp {
display: grid;
grid-template-rows: 30% 50% 20%;
}
.containerFormSignUp {
color: rgb(200, 200, 200);
}
.title {
padding: 20px 0px 10px 0px;
text-align: center;
}
form {
background-color: #ffffff;
display: flex;
flex-direction: column;
padding: 0 50px;
height: 100%;
}
input {
width: 100%;
outline: 0;
border-width: 0px 0px 1px 0px;
border-color: rgb(200, 200, 200);
padding: 20px 10px;
}
input:focus {
border-color: #dd8d38;
}
textarea:focus, input:focus {
color: black;
border-width: 0px 0px 1px 5px;
}
input, select, textarea {
color: #dd8d38;
}
input:focus + label, input:active + label {
color: rgb(200, 200, 200);
}
.formSignUpButton {
display: flex;
height: 100%;
flex-direction: column;
justify-content: center;
align-items: center;
}
.buttonFormSignUp {
font-size: 14px;
border: 2px solid #dd8d38;
color: white;
border-radius: 50px;
width: 150px;
height: 40px;
background: linear-gradient(to right, white 50%, #dd8d38 50%);
background-size: 200% 100%;
background-position: right top;
transition: all .3s ease-out;
}
.buttonFormSignUp:hover {
cursor: pointer;
color: #dd8d38;
background-position: left bottom;
}
.buttonFormSignUp:focus {
outline: none;
}
/*====================================
SIGN UP - HERO IMAGE
====================================*/
.container_SignIn {
border-radius: 25px 0px 25px 25px;
display: grid;
grid-template-columns: 1.6fr 1fr;
background: white;
box-shadow: 0px 0px 38px 22px rgba(0,0,0,0.14);
position: absolute;
overflow: hidden;
width: 650px;
max-width: 100%;
height: 450px;
z-index: 1;
transition: all 1s ease;
}
.myStyle {
transform: translateX(-20%);
z-index: 0;
opacity: 0;
}
.heroSignUpBackground {
background: url("https://images.unsplash.com/photo-1514933651103-005eec06c04b?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=967&q=80");
background-size: cover;
}
.heroSignUpBackgroundOverlay {
background: rgba(0, 0, 0, 0.5);
height: 100%;
width: 100%;
}
.containerHeroSignUp {
display: grid;
grid-template-rows: 80% 20%;
}
.signUpContent {
padding: 30px;
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
height: 360px;
text-align: center;
color: white;
margin: 0px;
}
.heroSignUpButton {
display: flex;
height: 90px;
flex-direction: column;
justify-content: center;
align-items: center;
}
.buttonHeroSignUp {
font-size: 14px;
border: 2px solid white;
border-radius: 50px;
width: 150px;
height: 40px;
background: linear-gradient(to right, #dd8d38 50%, white 50%);
background-size: 200% 100%;
background-position: right top;
transition: all .3s ease-out;
color: #dd8d38;
}
.buttonHeroSignUp:hover {
cursor: pointer;
color: white;
background-position: left bottom;
}
.buttonHeroSignUp:focus {
outline: none;
}
/*====================================
SIGN IN FORM
====================================*/
.containerSignIn {
display: grid;
grid-template-rows: 30% 50% 20%;
}
.containerFormSignIn {
color: rgb(200, 200, 200);
}
.title {
padding: 20px 0px 10px 0px;
text-align: center;
}
form {
background-color: #ffffff;
display: flex;
flex-direction: column;
padding: 0 50px;
height: 100%;
}
input {
width: 100%;
outline: 0;
border-width: 0px 0px 1px 0px;
border-color: rgb(200, 200, 200);
padding: 20px 10px;
}
input:focus {
border-color: #dd8d38;
}
textarea:focus, input:focus {
color: black;
border-width: 0px 0px 1px 5px;
}
input, select, textarea {
color: #dd8d38;
}
input:focus + label, input:active + label {
color: rgb(200, 200, 200);
}
.formSignInButton {
display: flex;
height: 100%;
flex-direction: column;
justify-content: center;
align-items: center;
}
.buttonFormSignIn {
font-size: 14px;
border: 2px solid #dd8d38;
color: white;
border-radius: 50px;
width: 150px;
height: 40px;
background: linear-gradient(to right, white 50%, #dd8d38 50%);
background-size: 200% 100%;
background-position: right top;
transition: all .3s ease-out;
}
.buttonFormSignIn:hover {
cursor: pointer;
color: #dd8d38;
background-position: left bottom;
}
.buttonFormSignIn:focus {
outline: none;
}
/*====================================
RESPONSIVE
====================================*/
@media screen and (max-width: 700px) {
.container_SignUp {
display: grid;
grid-template-rows: 30% 70%;
grid-template-columns: 50% 50%;
width: 320px;
max-width: 100%;
height: 550px;
}
.myStyle {
transform: translateY(-30%);
}
/*========= SIGN IN - HERO IMAGE ======*/
.heroSignInBackground {
grid-row: 1;
grid-column: 1 / span 2;
}
.heroSignInOverlay {
grid-row: 1;
grid-column: 1 / span 2;
}
.containerHeroSignIn {
display: grid;
grid-template-columns: 50% 50%;
grid-template-rows: none;
}
.signInContent {
height: auto;
padding: 11px;
}
.signInContent p {
display: none;
}
hr {
display: none;
}
.heroSignInButton {
height: auto;
}
.buttonHeroSignIn {
width: 125px;
}
/*========= SIGN UP - FORM ========*/
.containerSignUp {
grid-row: 2 / span 2;
grid-column: 1 / span 2;
}
.socialIcons {
margin: 10px;
}
.buttonFormSignUp {
width: 125px;
}
input {
padding: 10px;
}
/*========= SIGN UP - HERO IMAGE ======*/
.container_SignIn {
display: grid;
grid-template-rows: 30% 70%;
grid-template-columns: 50% 50%;
width: 320px;
max-width: 100%;
height: 550px;
}
.heroSignUpBackground {
grid-row: 1;
grid-column: 1 / span 2;
}
.heroSignUpOverlay {
grid-row: 1;
grid-column: 1 / span 2;
}
.containerHeroSignUp {
display: grid;
grid-template-columns: 50% 50%;
grid-template-rows: none;
}
.signUpContent {
height: auto;
}
.signUpContent p {
display: none;
}
hr {
display: none;
}
.heroSignUpButton {
height: auto;
}
.buttonHeroSignUp {
width: 125px;
}
/*============ SIGN IN - FORM =========*/
.containerSignIn {
grid-row: 2 / span 2;
grid-column: 1 / span 2;
}
.socialIcons {
margin: 10px;
}
.buttonFormSignIn {
width: 125px;
}
input {
padding: 10px;
}
}
/***************************************************************************
* *
* Hello! Thank you for stopping by! *
* Don't forget to follow me on: *
* Dribbble: https://dribbble.com/gardiandesign *
* LinkedIn: https://www.linkedin.com/in/darjan-gardinovacki-602252132/ *
* Cheers, Darjan! *
* *
***************************************************************************/
function signUp() {
let element = document.getElementById("container_SignIn");
element.classList.add("myStyle");
}
function signIn() {
let element = document.getElementById("container_SignIn");
element.classList.remove("myStyle");
}