Add files via upload

This commit is contained in:
Fernando Méndez 2021-06-04 23:47:23 +02:00 committed by GitHub
parent 63d9c9a61d
commit c0cbc85ff9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 13 deletions

View File

@ -4,21 +4,17 @@
*/ */
function cambiarCSS(nuevo){ function cambiarCSS(nuevo){
/*
if(nuevo.includes("main.css")){ if(nuevo.includes("main.css")){
var viejo = "{$prefix}assets/css/highContrast.css"; var css = "main.css";
var oldName = "Alto Contraste";
} else { } else {
var viejo = "{$prefix}assets/css/main.css"; var css = "highContrast.css";
var oldName = "Contrast Normal";
} }
*/
var url = "../assets/php/common/changeCSS.php?css=" + nuevo; var url = "../assets/php/common/changeCSS.php?css=" + css;
$.get(url); $.get(url);
/* La idea era que cambiase todo dinámicamente sin refrescar la página */ /* La idea era que cambiase todo dinámicamente sin refrescar la página */
//document.getElementById('estilo').setAttribute('href', nuevo); document.getElementById('estilo').setAttribute('href', nuevo);
//document.getElementById('cssChange').innerHTML = oldName; //document.getElementById('cssChange').innerHTML = oldName;
//document.getElementById('cssChange').setAttribute('onClick', 'cambiarCSS('+viejo+')'); //document.getElementById('cssChange').setAttribute('onClick', 'cambiarCSS('+viejo+')');

View File

@ -1,9 +1,6 @@
<?php <?php
include('../../../assets/php/config.php'); include('../../../assets/php/config.php');
switch(true){ if($_GET["css"] === "main.css") $_SESSION["css"] = "main.css";
case strpos($_GET["css"], "main.css"): $_SESSION["css"] = "main.css"; break; else if($_GET["css"] === "highContrast.css") $_SESSION["css"] = "highContrast.css";
case strpos($_GET["css"], "highContrast.css"): $_SESSION["css"] = "highContrast.css"; break;
//default: $_SESSION["css"] = "main.css"; break;
}
?> ?>