Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a #55

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

a #55

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
164 changes: 81 additions & 83 deletions css/index.css
Original file line number Diff line number Diff line change
@@ -1,133 +1,131 @@
.on-success {
position: absolute;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background: rgba(0, 0, 0, 0.5);
overflow: hidden;
z-index: 98;
position: absolute;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background: rgba(0, 0, 0, 0.5);
overflow: hidden;
z-index: 98;
}

.on-success div {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 90vw;
height: 90vh;
max-width: 600px;
max-height: 500px;
border-radius: 2em;
text-align: center;
background: #333333;
display: flex;
flex-flow: column wrap;
align-items: center;
justify-content: center;
z-index: 99;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 90vw;
height: 90vh;
max-width: 600px;
max-height: 500px;
border-radius: 2em;
text-align: center;
background: #333333;
display: flex;
flex-flow: column wrap;
align-items: center;
justify-content: center;
z-index: 99;
}

.on-success div h1 {
color: white;
color: white;
}

.error {
border: 2px solid red;
border: 2px solid red;
}

.errorsBlock {
font-size: 14px;
color: red;
font-size: 14px;
color: red;
}

.hiddenWindow {
display: none;
display: none;
}

form {
background-color: #efefef;
width: calc(100% - 10em);
max-width: 640px;
min-height: 500px;
padding: 3em;
flex: 0;
text-align: center;
z-index: 2;
background-color: #efefef;
width: calc(100% - 10em);
max-width: 640px;
min-height: 500px;
padding: 3em;
flex: 0;
text-align: center;
z-index: 2;
}

input,
select,
textarea {
font-family: "Montserrat", sans-serif;
font-weight: 300;
font-size: 16px;
background: inherit;
border: 2px solid black;
font-family: "Montserrat", sans-serif;
font-weight: 300;
font-size: 16px;
background: inherit;
border: 2px solid black;
}

input {
border: none;
border-bottom: 2px solid black;
padding: 0.5em;
border: none;
border-bottom: 2px solid black;
padding: 0.5em;
}

input[type='file'] {
width: 60%;
border: none;
font-family: "Montserrat", sans-serif;
font-weight: 400;
font-size: 16px;
padding: 1em 2em;
input[type="file"] {
width: 60%;
border: none;
font-family: "Montserrat", sans-serif;
font-weight: 400;
font-size: 16px;
padding: 1em 2em;
}

button {
font-family: "Montserrat", sans-serif;
font-weight: 700;
font-size: 18px;
padding: 1em 2em;
margin: 1em;
text-transform: uppercase;
border: none;
border-radius: 2em;
background: #20D7C0;
color: white;
cursor: pointer;
transition: all 0.3s ease-in-out;
font-family: "Montserrat", sans-serif;
font-weight: 700;
font-size: 18px;
padding: 1em 2em;
margin: 1em;
text-transform: uppercase;
border: none;
border-radius: 2em;
background: #20d7c0;
color: white;
cursor: pointer;
transition: all 0.3s ease-in-out;
}

button:hover {
background: black;
color: #20D7C0;
background: black;
color: #20d7c0;
}

@media all and (max-width: 640px) {
.on-success h1 {
font-size: 30px;
}
.on-success h1 {
font-size: 30px;
}

form {
font-size: 1em;
}
form {
font-size: 1em;
}

input[type=text],
textarea {
width: 50%;
}
input[type="text"],
textarea {
width: 50%;
}
}


#exito {
margin-top: 30px;
margin-top: 30px;
}

#exito strong {
display: block;
margin: 23px;
font-size: 30px;
display: block;
margin: 23px;
font-size: 30px;
}


.oculto {
display: none;
display: none;
}
35 changes: 18 additions & 17 deletions css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ a {
white-space: nowrap;
padding: 10px 15px;
}
header, footer {
header,
footer {
box-sizing: border-box;
flex: 0 1 auto;
background-color: black;
color: white;
}
header{
header {
width: 100%;
}
header ul {
Expand Down Expand Up @@ -53,8 +54,8 @@ header a {
}
header a:hover {
color: black;
border: 2px solid #CFBD6F;
background: #CFBD6F;
border: 2px solid #cfbd6f;
background: #cfbd6f;
transition: all 0.3s ease-in-out;
}
section {
Expand All @@ -66,18 +67,18 @@ section {
flex-flow: column wrap;
align-items: center;
justify-content: center;
background: url('../img/confetis.svg') no-repeat center center;
background: url("../img/confetis.svg") no-repeat center center;
}
.gift_top{
z-index: 3;
margin-bottom: -50px;
.gift_top {
z-index: 3;
margin-bottom: -50px;
}
.gift_bottom{
z-index: 1;
margin-top: -20px;
.gift_bottom {
z-index: 1;
margin-top: -20px;
}

footer{
footer {
font-family: "Montserrat", sans-serif;
text-decoration: none;
font-size: 0.9rem;
Expand All @@ -95,14 +96,14 @@ footer li {
padding: 5px;
}
footer a {
color: #CFBD6F;
color: #cfbd6f;
}
footer a:hover {
color: white;
}

@media all and (max-width: 640px) {
header h1 {
display: none;
}
}
header h1 {
display: none;
}
}
4 changes: 3 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
</p>

<ul id="errores">

</ul>

<p>
Expand Down Expand Up @@ -105,7 +106,8 @@
</ul>
</footer>

<script src="js/main-mio.js"></script>
<script src="js/main-propio.js"></script>

<script src="js/pruebas.js"></script>
</body>

Expand Down
2 changes: 2 additions & 0 deletions instrucciones/nivel1.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ Para validar nuestro formulario, vamos a tener que hacer lo siguiente:

Para validar que sólo tenga letras, podemos hacer:

/^[A-z]+$/i

`const contieneSoloLetras = /^[A-z]+$/.test(valor);`

Esto va a retornar un booleano. True si sólo contiene letras o false
Expand Down
Loading