Skip to content

Commit

Permalink
scond changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroDavidArzolaSaavedra committed Jun 4, 2023
1 parent cf2b860 commit 834e478
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 237 deletions.
2 changes: 0 additions & 2 deletions css/categoryBar.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
min-width: 17rem;
margin: 0.5rem;
color: white;

position: absolute;
}

.categoryBarComponent {
Expand Down
2 changes: 1 addition & 1 deletion css/form.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
text-align: center;
}

#container-form-first-part-event, #container-form-second-part-event,#container-form-third-part-event,#container-form-fourth-part-event,#container-form-fifth-part-event{
#container-form-first-part-event, #container-form-second-part-event{
border: 1px black solid;
display: inline-block;
border-radius: 10px;
Expand Down
40 changes: 38 additions & 2 deletions css/header.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,43 @@ button{
.header-color-options {
color: #ffae00;
}
.dropdown-toggle::after {
background-image: none !important;

.dropdown-toggle .fa-chevron-down {
display: none !important;
}
.bootstrap-select .dropdown-toggle .caret {
display:none;
}

.sticky{
position: sticky;
top: 0;
}
#header{
z-index: 100;
}

#footer{
z-index: 100;
}
.navbar-expand-lg{
border-bottom: 1px solid #ccc;
}

.col1{
width: 200px;
}
/*Movil*/
@media only screen and (max-width: 990px) {
#modo-noche, .fa-user, .fa-searchengin, .fa-comment, #bell-header, #comment, #calendar{
margin-top: 1rem;
margin-bottom: 1rem;
}
#modo-noche, .fa-searchengin, .fa-user, #bell-header, #comment, #calendar{
margin-left: 0;
}
#search-header{
display: none;
}
}

2 changes: 1 addition & 1 deletion html/eventList.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ <h1 id="header-lista-eventos-usuario"></h1>
</button>
<div id="page_element">
<table class="table table-striped table-hover table-responsive" id="table-event-list">
<thead class="bg-primary text-white encabezado-tabla" >
<thead class="bg-primary text-white">
<tr>
<th scope="col" class="hidden no-export">id</th>
<th id="nombre-tabla-evento" scope="col"></th>
Expand Down
2 changes: 1 addition & 1 deletion html/eventView.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!DOCTYPE html>
<html>
<head id>
<head>
<meta charset="UTF-8" />
<title>ULPGC EVENTS</title>
<link rel="icon" href="../images/logoUlpgc.png">
Expand Down
11 changes: 0 additions & 11 deletions html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,6 @@
<div class="col-lg-3 col-md-3 col-12 z-3 category-bar" id="categoryBar"></div>
<div class="col-lg-9 col-md-9 col-12" id="col-container">
<div class="card-cards row row-cols-1 row-cols-md-2 g-4 ml" id="card-car-index"></div>
=======
<body id="cuerpo">

<header id="header"></header>
<div class="container-fluid">
<div class="row">
<div class="col-lg-3 col-md-3 col-12" id="categoryBar"></div>
<div class="col-lg-9 col-md-9 col-12">
<div class="card-cards row row-cols-1 row-cols-md-2 g-4 ml" id="card-car-index" style=" margin:2rem;"></div>
</div>
>>>>>>> b46f0884118c1ca3309af48e798b62f4dee410b1
</div>
</div>
</div>
Expand Down
22 changes: 1 addition & 21 deletions js/categoryBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,24 +222,4 @@ function deleteFilter(){

const aplicar = document.getElementById('aplicar-filtros');
aplicar.click();
}

window.addEventListener('scroll', function(){
var object = document.getElementById('categoryBar');
var footer = document.getElementById('footer');
var pagina = document.getElementById('cuerpo');

var objectRect = object.getBoundingClientRect();
var footerRect = footer.getBoundingClientRect();

pagina.style.minHeight = objectRect.height + 500 + 'px';
console.log(objectRect.height);

if (objectRect.height <= footerRect.top) {
// Si el objeto todavía no ha alcanzado el pie de página
object.style.top = window.pageYOffset + 'px';
} else {
// Si el objeto ha alcanzado el pie de página
object.style.top = footerRect.top - objectRect.height + 'px';
}
});
}
1 change: 0 additions & 1 deletion js/events.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
function getCategoryClass(categoria) {
console.log('fdlfk')
let casteo = categoria.toString();
if(casteo.toLowerCase() === "Reunion informativa".toLowerCase()){
return "card text-white bg-primary mb-3";}
Expand Down
173 changes: 0 additions & 173 deletions js/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ import { changeInfoUserSave,changeInfoUser } from "./modificarPerfil.js";
import { loadInformationEvents } from "./showInformationEvent.js";
document.addEventListener('DOMContentLoaded', init);




function loadTemplate(fileName, id, callback) {

fetch(fileName).then((res) => {
Expand Down Expand Up @@ -533,178 +530,8 @@ if (jQuery(ocultarBtn).length) {
button.setAttribute("disabled", true);
}
});

//Botón modo oscuro
const botonModoNoche = document.getElementById('botonModoNoche');
let modoOscuro = true;
if(botonModoNoche){
botonModoNoche.addEventListener("click", async () => {
if(modoOscuro) {
console.log("holaaa");
const cuerpo = document.querySelector("#cuerpo-pagina");
const header = document.querySelector("#header");
if(header){
console.log(header);
}
header.style.backgroundColor = "#2C2C2C"
cuerpo.style.backgroundColor = "black";
const encabezado = document.querySelector(".encabezado-tabla");
//Lista eventos modo oscuro
if(encabezado){
const listaEventosTitulo = document.querySelector("#header-lista-eventos-usuario");
const nombreEvento = document.querySelector("#nombreEvento");
const fechaEvento = document.querySelector("#fechaEvento");
const tipoEvento = document.querySelector("#tipoEvento");
nombreEvento.style.color = "White";
fechaEvento.style.color = "White";
tipoEvento.style.color = "White";
encabezado.style.color = "White";
listaEventosTitulo.style.color = "white";
}
//Crear evento modo oscuro
const evento = document.querySelector("#container-form-first-part-event");
if(evento){
const crearEventoSecond = document.querySelector("#container-form-second-part-event");
const crearEventoThird = document.querySelector("#container-form-third-part-event");
const crearEventoFourth = document.querySelector("#container-form-fourth-part-event");
const crearEventoFifth = document.querySelector("#container-form-fifth-part-event");
const letrasUno = document.querySelector("#crearEventoLetrasUno");
const letrasDos = document.querySelector("#crearEventoLetrasDos");
const letrasTres = document.querySelector("#crearEventoLetrasTres");
const letrasCuatro = document.querySelector("#crearEventoLetrasCuatro");
const letrasCinco = document.querySelector("#crearEventoLetrasCinco");
const infoEventoUno = document.querySelector("#infoEventoUno");
const infoEventoDos = document.querySelector("#infoEventoDos");
const infoEventoTres = document.querySelector("#infoEventoTres");
const infoEventoCuatro = document.querySelector("#infoEventoCuatro");
const infoEventoCinco = document.querySelector("#infoEventoCinco");
infoEventoUno.style.color = "white";
infoEventoDos.style.color = "white";
infoEventoTres.style.color = "white";
infoEventoCuatro.style.color = "white";
infoEventoCinco.style.color = "white";
letrasUno.style.color = "white";
letrasDos.style.color = "white";
letrasTres.style.color = "white";
letrasCuatro.style.color = "white";
letrasCinco.style.color = "white";
evento.style.backgroundColor = "#2C2C2C";
crearEventoSecond.style.backgroundColor = "#2C2C2C";
crearEventoThird.style.backgroundColor = "#2C2C2C";
crearEventoFourth.style.backgroundColor = "#2C2C2C";
crearEventoFifth.style.backgroundColor = "#2C2C2C";
evento.style.border = "2px solid white";
crearEventoSecond.style.border = "2px solid white";
crearEventoThird.style.border = "2px solid white";
crearEventoFourth.style.border = "2px solid white";
crearEventoFifth.style.border = "2px solid white";
}

const informacionPerfil = document.querySelector(".InformacionPerfil");
if(informacionPerfil){
const botonesPerfil = document.querySelector(".BotonesPerfil");
const informacionUsuario = document.querySelector(".InformacionUsuario");
const datosUsuario= document.querySelector(".datosUsuario");
informacionPerfil.style.backgroundColor = "#2C2C2C";
botonesPerfil.style.backgroundColor = "#2C2C2C";
informacionUsuario.style.color = "white";
datosUsuario.style.color = "white";
}
//informacion evento modo oscuro
const informacionEvento = document.querySelector("#content-show-information");
if(informacionEvento){
informacionEvento.style.backgroundColor = "black";
const letrasTitulo = document.querySelector("#title_header");
const letrasInformacion = document.querySelector(".paragraph");
const informacionInscripciones = document.querySelector(".paragraph-show-information");
const inscripcion = document.querySelector(".lil_header");
inscripcion.style.color = "white";
informacionInscripciones.style.color = "white";
letrasInformacion.style.color = "white";
letrasTitulo.style.color = "white";
}
modoOscuro = false;

//volver a modo dia
} else {
const cuerpo = document.querySelector("#cuerpo-pagina");
const header = document.querySelector(".container");
if(header){
console.log(header);
}
header.style.backgroundColor = "white"
cuerpo.style.backgroundColor = "white";
const encabezado = document.querySelector(".encabezado-tabla");
//Lista eventos modo oscuro
if(encabezado){
const listaEventosTitulo = document.querySelector("#header-lista-eventos-usuario");
const nombreEvento = document.querySelector("#nombreEvento");
const fechaEvento = document.querySelector("#fechaEvento");
const tipoEvento = document.querySelector("#tipoEvento");
nombreEvento.style.color = "Black";
fechaEvento.style.color = "Black";
tipoEvento.style.color = "Black";
encabezado.style.color = "Black";
listaEventosTitulo.style.color = "Black";
}
//Crear evento modo oscuro
const evento = document.querySelector("#container-form-first-part-event");
if(evento){
const crearEventoSecond = document.querySelector("#container-form-second-part-event");
const crearEventoThird = document.querySelector("#container-form-third-part-event");
const crearEventoFourth = document.querySelector("#container-form-fourth-part-event");
const crearEventoFifth = document.querySelector("#container-form-fifth-part-event");
const letrasUno = document.querySelector("#crearEventoLetrasUno");
const letrasDos = document.querySelector("#crearEventoLetrasDos");
const letrasTres = document.querySelector("#crearEventoLetrasTres");
const letrasCuatro = document.querySelector("#crearEventoLetrasCuatro");
const letrasCinco = document.querySelector("#crearEventoLetrasCinco");
const infoEventoUno = document.querySelector("#infoEventoUno");
const infoEventoDos = document.querySelector("#infoEventoDos");
const infoEventoTres = document.querySelector("#infoEventoTres");
const infoEventoCuatro = document.querySelector("#infoEventoCuatro");
const infoEventoCinco = document.querySelector("#infoEventoCinco");
infoEventoUno.style.color = "Black";
infoEventoDos.style.color = "Black";
infoEventoTres.style.color = "Black";
infoEventoCuatro.style.color = "Black";
infoEventoCinco.style.color = "Black";
letrasUno.style.color = "Black";
letrasDos.style.color = "Black";
letrasTres.style.color = "Black";
letrasCuatro.style.color = "Black";
letrasCinco.style.color = "Black";
evento.style.backgroundColor = "white";
crearEventoSecond.style.backgroundColor = "white";
crearEventoThird.style.backgroundColor = "white";
crearEventoFourth.style.backgroundColor = "white";
crearEventoFifth.style.backgroundColor = "white";
evento.style.border = "2px solid black";
crearEventoSecond.style.border = "2px solid black";
crearEventoThird.style.border = "2px solid black";
crearEventoFourth.style.border = "2px solid black";
crearEventoFifth.style.border = "2px solid black";
}

const informacionPerfil = document.querySelector(".InformacionPerfil");
if(informacionPerfil){
const botonesPerfil = document.querySelector(".BotonesPerfil");
const informacionUsuario = document.querySelector(".InformacionUsuario");
const datosUsuario= document.querySelector(".datosUsuario");
informacionPerfil.style.backgroundColor = "white";
botonesPerfil.style.backgroundColor = "white";
informacionUsuario.style.color = "black";
datosUsuario.style.color = "black";
}
//informacion evento modo dia
const informacionEvento = document.querySelector("#content-show-information");
if(informacionEvento){
informacionEvento.style.backgroundColor = "white";
}
modoOscuro = true;
}
});
}
const lockIndex4 = document.getElementById("content-show-information");
if (lockIndex4 != undefined){
loadInformationEvents(querySnapShot.docs);
Expand Down
24 changes: 0 additions & 24 deletions js/loadListEvents.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { getDocs, getDoc, updateDoc, collection, query, deleteDoc, where, doc} from "https://www.gstatic.com/firebasejs/9.19.0/firebase-firestore.js";
import { exportCSVExcel } from "./exportXls.js"
import { db } from "./firebase.js";
import { exportCSVExcel } from "./exportXls.js"


export const loadListEvents = (ListaEventos) => {
var tableEvent = document.getElementById("table-event-list");
Expand Down Expand Up @@ -223,28 +221,6 @@ button.addEventListener("click", async function() {
exportCSVExcel(username)
});

const button = document.getElementById("excel-button");
button.addEventListener("click", async function() {
const userId = JSON.parse(localStorage.getItem("ParametrosUsuario")).uid
async function getInfoUser(userId){
try {
const q = query(collection(db, "users"), where("userId", "==", userId));
let usuarioDeLaAplicacion;
const querySnapshot = await getDocs(q);
querySnapshot.forEach((doc) => {
usuarioDeLaAplicacion = doc.data();
});
return usuarioDeLaAplicacion;
} catch (error) {
console.log("Hubo un error",error)
}
}
var user = await getInfoUser(userId)
var username = user.nombre
exportCSVExcel(username)
});



function compareDate(day,month,year){

Expand Down

0 comments on commit 834e478

Please sign in to comment.