Ahora construiremos la pantalla en la que el email ha sido enviado reutilizando el código. Como recomendación, empieza creando la versión responsive del proyecto.
<div class="Login">
<div class="form-container">
<img src="./assets/logos/logo_yard_sale.svg" alt="logo" class="logo" />
<h1 class="title">Email has been sent</h1>
<p class="subtitle">
Please ckeck your inbox for instructions on how to reset the password
</p>
<div class="email-image">
<img src="./assets/icons/email.svg" alt="email" />
</div>
<button class="primary-button login-button">Login</button>
<p class="resend">
<span>Didn't receive the email?</span><a href="/">Resend</a>
</p>
</div>
</div>
:root {
--white: #fff;
--black: #000;
--very-light-pink: #c7c7c7;
--text-input-field: #f7f7f7;
--hospital-green: #acd9b2;
--sm: 14px;
--md: 16px;
--lg: 18px;
}
body {
margin: 0;
font-family: "Quicksand", sans-serif;
}
.Login {
width: 100%;
height: 100vh;
display: grid;
place-items: center;
}
.form-container {
display: grid;
grid-template-rows: auto 1fr;
width: 300px;
justify-items: center;
}
.logo {
width: 150px;
margin-bottom: 48px;
justify-self: center;
display: none;
}
.title {
font-size: var(--lg);
font-weight: 700;
margin-bottom: 12px;
text-align: center;
}
.subtitle {
color: var(--very-light-pink);
font-size: var(--md);
font-weight: 500;
margin-top: 0;
margin-bottom: 32px;
text-align: center;
}
.email-image {
width: 132px;
height: 132px;
border-radius: 50%;
background-color: var(--text-input-field);
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 24px;
}
.email-image img {
width: 80px;
}
.resend {
font-size: var(--sm);
}
.resend span {
color: var(--very-light-pink);
}
.resend a {
color: var(--hospital-green);
text-decoration: none;
}
.primary-button {
background-color: var(--hospital-green);
border-radius: 8px;
border: none;
color: var(--white);
width: 100%;
cursor: pointer;
font-size: var(--md);
font-weight: bold;
height: 50px;
}
.login-button {
margin-top: 12px;
margin-bottom: 30px;
}
@media (max-width: 640px) {
.logo {
display: block;
}
}
Nuestro proyecto es responsive, es decir, se adapta a diferentes tamaños de pantalla. Para lograrlo implementamos media queries.
@media (max-width: 640px)