formato
This commit is contained in:
+25
-19
@@ -1,28 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="https://unpkg.com/purecss@1.0.0/build/pure-min.css" integrity="sha384-nn4HPE8lTHyVtfCBi5yW9d20FjT8BJwUXyWZT9InLYax14RDjBj46LmSztkmNP9w" crossorigin="anonymous">
|
||||
<head>
|
||||
|
||||
<link rel="stylesheet" href="https://unpkg.com/purecss@1.0.0/build/grids-responsive-min.css">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="https://unpkg.com/purecss@1.0.0/build/pure-min.css"
|
||||
integrity="sha384-nn4HPE8lTHyVtfCBi5yW9d20FjT8BJwUXyWZT9InLYax14RDjBj46LmSztkmNP9w" crossorigin="anonymous">
|
||||
|
||||
<!--Importar Iconos -->
|
||||
<link rel="stylesheet" href="https://unpkg.com/purecss@1.0.0/build/grids-responsive-min.css">
|
||||
|
||||
|
||||
<!--Importar Iconos -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="style.css" media="screen">
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
|
||||
<title>HACKATHON REGISTRO</title>
|
||||
<link rel="shortcut icon" href="img/icono.png">
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
</html>
|
||||
<link rel="stylesheet" type="text/css" href="style.css" media="screen">
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css"
|
||||
integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
|
||||
<title>HACKATHON REGISTRO</title>
|
||||
<link rel="shortcut icon" href="img/icono.png">
|
||||
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
|
||||
Please enable it to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -227,7 +227,7 @@ export default {
|
||||
noIntegrantes: 1,
|
||||
integrantes: [],
|
||||
cargando: false,
|
||||
confirmacion: false
|
||||
confirmacion: false,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
@@ -246,7 +246,7 @@ export default {
|
||||
nombre: "",
|
||||
apellidoPa: "",
|
||||
apellidoMa: "",
|
||||
correo: ""
|
||||
correo: "",
|
||||
});
|
||||
}
|
||||
},
|
||||
@@ -303,8 +303,8 @@ export default {
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#3085d6",
|
||||
cancelButtonColor: "#d33",
|
||||
confirmButtonText: "Si"
|
||||
}).then(result => {
|
||||
confirmButtonText: "Si",
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
window.location.href =
|
||||
"https://www.acatlan.unam.mx/hackaton/index.html#head";
|
||||
@@ -323,18 +323,18 @@ export default {
|
||||
apellidoMaLider: this.apellidoMaLider,
|
||||
correoLider: this.correoLider,
|
||||
carreraLider: this.carrera,
|
||||
integrantes: this.integrantes
|
||||
integrantes: this.integrantes,
|
||||
};
|
||||
axios
|
||||
.post(`${config.api}/registro`, data)
|
||||
.then(async respose => {
|
||||
.then(async (respose) => {
|
||||
this.cargando = false;
|
||||
console.log(respose.data.msj);
|
||||
await Swal.fire("Has sido registrado", "", "success");
|
||||
window.location.href =
|
||||
"https://www.acatlan.unam.mx/hackaton/index.html#head";
|
||||
})
|
||||
.catch(async error => {
|
||||
.catch(async (error) => {
|
||||
this.cargando = false;
|
||||
console.log(error.response.data.msj);
|
||||
await Swal.fire(
|
||||
@@ -343,8 +343,8 @@ export default {
|
||||
"error"
|
||||
).then((window.location.href = "#"));
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
+175
-171
@@ -1,213 +1,217 @@
|
||||
<template>
|
||||
<section class="admin-login">
|
||||
<section class="admin-login">
|
||||
<!--Importar componente de header para login -->
|
||||
<Header />
|
||||
<div>
|
||||
<h1>Hackaton UNAM-AWS</h1>
|
||||
|
||||
<div class="conteiner ">
|
||||
|
||||
<div class="admin-campos">
|
||||
|
||||
|
||||
<i class="fa fa-user" ></i>
|
||||
<input type="email" placeholder="Usuario" v-model="usuario" @keyup.enter="entrar()">
|
||||
</div>
|
||||
|
||||
<div class="admin-campos">
|
||||
<i class="fa fa-lock"></i>
|
||||
<input type="password" placeholder="Contraseña" v-model="password" @keyup.enter="entrar()">
|
||||
</div>
|
||||
|
||||
<div class="entrar">
|
||||
|
||||
<button class="button" id="boton_entrar" v-if="validar_ambos()" @click="entrar()">Entrar</button>
|
||||
<p class="botton_falso" v-else>Entrar</p>
|
||||
</div>
|
||||
</div>
|
||||
<!--Importar componente de footer para login en esta ocacion yo no lo ocuper por eso esta comentado -->
|
||||
<!-- <Footer /> -->
|
||||
|
||||
</div>
|
||||
|
||||
<h1>Hackaton UNAM-AWS</h1>
|
||||
|
||||
</section>
|
||||
<div class="conteiner ">
|
||||
<div class="admin-campos">
|
||||
<i class="fa fa-user"></i>
|
||||
<input
|
||||
type="email"
|
||||
placeholder="Usuario"
|
||||
v-model="usuario"
|
||||
@keyup.enter="entrar()"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="admin-campos">
|
||||
<i class="fa fa-lock"></i>
|
||||
<input
|
||||
type="password"
|
||||
placeholder="Contraseña"
|
||||
v-model="password"
|
||||
@keyup.enter="entrar()"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="entrar">
|
||||
<button
|
||||
class="button"
|
||||
id="boton_entrar"
|
||||
v-if="validar_ambos()"
|
||||
@click="entrar()"
|
||||
>
|
||||
Entrar
|
||||
</button>
|
||||
<p class="botton_falso" v-else>Entrar</p>
|
||||
</div>
|
||||
</div>
|
||||
<!--Importar componente de footer para login en esta ocacion yo no lo ocuper por eso esta comentado -->
|
||||
<!-- <Footer /> -->
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios';
|
||||
import config from '../config/config.js'
|
||||
import swal from 'sweetalert';
|
||||
import Header from "./../view/headerAdmin.vue";
|
||||
|
||||
import axios from "axios";
|
||||
import config from "../config/config.js";
|
||||
import swal from "sweetalert";
|
||||
import Header from "./../view/headerAdmin.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
components: {
|
||||
//HelloWorld
|
||||
Header
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
usuario: '',
|
||||
password: '',
|
||||
error: false,
|
||||
mal: null,
|
||||
resp: null
|
||||
}
|
||||
},
|
||||
methods:
|
||||
{
|
||||
malo(){
|
||||
return this.error;
|
||||
},
|
||||
validar_ambos()
|
||||
{
|
||||
if(this.usuario!='' && this.password!='')
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
},
|
||||
entrar(){
|
||||
|
||||
const data={
|
||||
usuario: this.usuario,
|
||||
password: this.password,
|
||||
}
|
||||
|
||||
axios.post(`${config.api}/login`,data).then(async respose=>{
|
||||
|
||||
this.resp=respose.data;
|
||||
if(respose.data.err==false)
|
||||
{
|
||||
await swal(`Bienvenido ${this.usuario}`,"","success");
|
||||
|
||||
window.localStorage.setItem('id_usuario', respose.data.id_usuario);
|
||||
this.$router.push('/');
|
||||
}
|
||||
else{
|
||||
this.error=true;
|
||||
await swal(" Usuario o Contraseña incorrecta.","","error");
|
||||
}
|
||||
}).catch(err=>{
|
||||
swal(" Usuario o Contraseña incorrecta.","","error");
|
||||
this.resp=err;
|
||||
this.error=true;
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
,beforeCreate () {
|
||||
localStorage.clear();
|
||||
}
|
||||
}
|
||||
Header,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
usuario: "",
|
||||
password: "",
|
||||
error: false,
|
||||
mal: null,
|
||||
resp: null,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
malo() {
|
||||
return this.error;
|
||||
},
|
||||
validar_ambos() {
|
||||
if (this.usuario != "" && this.password != "") return true;
|
||||
else return false;
|
||||
},
|
||||
entrar() {
|
||||
const data = {
|
||||
usuario: this.usuario,
|
||||
password: this.password,
|
||||
};
|
||||
|
||||
axios
|
||||
.post(`${config.api}/login`, data)
|
||||
.then(async (respose) => {
|
||||
this.resp = respose.data;
|
||||
if (respose.data.err == false) {
|
||||
await swal(`Bienvenido ${this.usuario}`, "", "success");
|
||||
|
||||
window.localStorage.setItem("id_usuario", respose.data.id_usuario);
|
||||
this.$router.push("/");
|
||||
} else {
|
||||
this.error = true;
|
||||
await swal(" Usuario o Contraseña incorrecta.", "", "error");
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
swal(" Usuario o Contraseña incorrecta.", "", "error");
|
||||
this.resp = err;
|
||||
this.error = true;
|
||||
});
|
||||
},
|
||||
},
|
||||
beforeCreate() {
|
||||
localStorage.clear();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
<style scoped>
|
||||
<style scoped>
|
||||
.button {
|
||||
background-color: #1B3D70; /* Green */
|
||||
border: none;
|
||||
color: white;
|
||||
padding: 1rem 7rem;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
|
||||
cursor: pointer;
|
||||
font-size: 1.5rem;
|
||||
border-radius: 1rem;
|
||||
-webkit-transition-duration: 0.4s; /* Safari */
|
||||
transition-duration: 0.4s;
|
||||
box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
|
||||
background-color: #1b3d70; /* Green */
|
||||
border: none;
|
||||
color: white;
|
||||
padding: 1rem 7rem;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
|
||||
cursor: pointer;
|
||||
font-size: 1.5rem;
|
||||
border-radius: 1rem;
|
||||
-webkit-transition-duration: 0.4s; /* Safari */
|
||||
transition-duration: 0.4s;
|
||||
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
||||
}
|
||||
|
||||
.botton_falso{
|
||||
background-color: #CCC; /* Green */
|
||||
border: none;
|
||||
color: white;
|
||||
padding: 1rem 7rem;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
font-size: 1.5rem;
|
||||
border-radius: 1rem;
|
||||
-webkit-transition-duration: 0.4s; /* Safari */
|
||||
transition-duration: 0.4s;
|
||||
box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
|
||||
.botton_falso {
|
||||
background-color: #ccc; /* Green */
|
||||
border: none;
|
||||
color: white;
|
||||
padding: 1rem 7rem;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
font-size: 1.5rem;
|
||||
border-radius: 1rem;
|
||||
-webkit-transition-duration: 0.4s; /* Safari */
|
||||
transition-duration: 0.4s;
|
||||
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
||||
}
|
||||
|
||||
.button:hover {
|
||||
background-color: #bb8800; /* Green */
|
||||
color: white;
|
||||
}
|
||||
h1{
|
||||
margin-top: 2.5rem;
|
||||
margin-bottom: 3.5rem;
|
||||
font-size: 1.5rem;
|
||||
|
||||
h1 {
|
||||
margin-top: 2.5rem;
|
||||
margin-bottom: 3.5rem;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.admin-campos {
|
||||
width: 20rem;
|
||||
margin: 0 auto 1rem auto;
|
||||
position: relative;
|
||||
width: 20rem;
|
||||
margin: 0 auto 1rem auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.admin-campos input[type="email"], .admin-campos input[type="password"] {
|
||||
border-bottom: black .2rem solid;
|
||||
border-left: white;
|
||||
border-right:white;
|
||||
border-top: white;
|
||||
display: block;
|
||||
font-size: 1rem;
|
||||
margin: 0 auto 2rem auto;
|
||||
padding: 1rem 0 1rem 2rem;
|
||||
width: 85%;
|
||||
.admin-campos input[type="email"],
|
||||
.admin-campos input[type="password"] {
|
||||
border-bottom: black 0.2rem solid;
|
||||
border-left: white;
|
||||
border-right: white;
|
||||
border-top: white;
|
||||
display: block;
|
||||
font-size: 1rem;
|
||||
margin: 0 auto 2rem auto;
|
||||
padding: 1rem 0 1rem 2rem;
|
||||
width: 85%;
|
||||
}
|
||||
|
||||
.admin-campos input::placeholder, .admin-campos input::placeholder {
|
||||
color: rgb(75, 71, 71);
|
||||
.admin-campos input::placeholder,
|
||||
.admin-campos input::placeholder {
|
||||
color: rgb(75, 71, 71);
|
||||
}
|
||||
|
||||
.admin-campos i {
|
||||
color: black;
|
||||
font-size: 1.5rem;
|
||||
left: 1.75rem;
|
||||
position: absolute;
|
||||
top: .75rem;
|
||||
color: black;
|
||||
font-size: 1.5rem;
|
||||
left: 1.75rem;
|
||||
position: absolute;
|
||||
top: 0.75rem;
|
||||
}
|
||||
|
||||
.entrar {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 5rem;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 5rem;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1024px) {
|
||||
h1{
|
||||
margin-top: 3rem;
|
||||
margin-bottom: 4rem;
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
.admin-login img {
|
||||
height: 25rem;
|
||||
}
|
||||
h1 {
|
||||
margin-top: 3rem;
|
||||
margin-bottom: 4rem;
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
.admin-login img {
|
||||
height: 25rem;
|
||||
}
|
||||
|
||||
.admin-campos {
|
||||
width: 40rem;
|
||||
}
|
||||
.admin-campos {
|
||||
width: 40rem;
|
||||
}
|
||||
|
||||
.admin-campos input[type="email"], .admin-campos input[type="password"] {
|
||||
font-size: 1.5rem;
|
||||
padding: 1rem 0 1rem 4rem;
|
||||
}
|
||||
.admin-campos input[type="email"],
|
||||
.admin-campos input[type="password"] {
|
||||
font-size: 1.5rem;
|
||||
padding: 1rem 0 1rem 4rem;
|
||||
}
|
||||
|
||||
.admin-campos i {
|
||||
font-size: 2rem;
|
||||
left: 3.5rem;
|
||||
}
|
||||
.admin-campos i {
|
||||
font-size: 2rem;
|
||||
left: 3.5rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div >
|
||||
<div>
|
||||
<div class="pure-g header">
|
||||
<div class="pure-u-1 pure-u-sm-1 pure-u-md-1 pure-u-lg-1 pure-u-xl-1">
|
||||
<div class="logo_unam">
|
||||
@@ -11,7 +11,6 @@
|
||||
</div>
|
||||
|
||||
<!-- div banner -->
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -20,8 +19,6 @@ export default {};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
|
||||
.header {
|
||||
width: 100%;
|
||||
max-height: 260px;
|
||||
@@ -52,7 +49,6 @@ export default {};
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
|
||||
@media screen and (max-width: 767px) {
|
||||
.footer img {
|
||||
width: 40px !important;
|
||||
@@ -62,5 +58,4 @@ export default {};
|
||||
font-size: 12px !important;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user