Upload 71 files
Browse files- backend/routers/pages.py +0 -23
backend/routers/pages.py
CHANGED
|
@@ -88,10 +88,6 @@ async def widget_js():
|
|
| 88 |
return;
|
| 89 |
}
|
| 90 |
|
| 91 |
-
var btnText = _attr("data-button-text", "Ver en mi espacio");
|
| 92 |
-
var btnBg = _attr("data-button-color", "#0047AB");
|
| 93 |
-
var btnColor = _attr("data-button-text-color", "#ffffff");
|
| 94 |
-
|
| 95 |
// Detectar modo auto-apertura: URL contiene ?visualizador
|
| 96 |
var urlParams = new URLSearchParams(window.location.search);
|
| 97 |
var autoOpen = urlParams.has("visualizador");
|
|
@@ -99,12 +95,6 @@ async def widget_js():
|
|
| 99 |
// -- Estilos --
|
| 100 |
var style = document.createElement("style");
|
| 101 |
style.textContent = [
|
| 102 |
-
".hr-btn{display:inline-flex;align-items:center;gap:8px;padding:14px 28px;",
|
| 103 |
-
"background:" + btnBg + ";color:" + btnColor + ";border:none;border-radius:50px;",
|
| 104 |
-
"font-size:16px;font-weight:600;cursor:pointer;font-family:inherit;",
|
| 105 |
-
"box-shadow:0 4px 14px rgba(0,71,171,.35);transition:opacity .2s;}",
|
| 106 |
-
".hr-btn:hover{opacity:.85;}",
|
| 107 |
-
|
| 108 |
".hr-overlay{display:none;position:fixed;inset:0;z-index:2147483647;",
|
| 109 |
"background:rgba(0,0,0,.55);align-items:center;justify-content:center;}",
|
| 110 |
".hr-overlay.open{display:flex;animation:hrFade .2s ease;}",
|
|
@@ -179,19 +169,6 @@ async def widget_js():
|
|
| 179 |
document.body.style.overflow = "";
|
| 180 |
}
|
| 181 |
|
| 182 |
-
// -- Boton trigger (solo si existe #contenedor-saas y no es auto-apertura) --
|
| 183 |
-
if (!autoOpen) {
|
| 184 |
-
var contenedor = document.getElementById("contenedor-saas");
|
| 185 |
-
if (contenedor) {
|
| 186 |
-
var btn = document.createElement("button");
|
| 187 |
-
btn.className = "hr-btn";
|
| 188 |
-
btn.textContent = btnText;
|
| 189 |
-
contenedor.style.cssText = "display:inline-block;padding:0;margin:0;background:none;border:none;";
|
| 190 |
-
contenedor.appendChild(btn);
|
| 191 |
-
btn.addEventListener("click", openModal);
|
| 192 |
-
}
|
| 193 |
-
}
|
| 194 |
-
|
| 195 |
closeBtn.addEventListener("click", closeModal);
|
| 196 |
overlay.addEventListener("click", function(e) { if (e.target === overlay) closeModal(); });
|
| 197 |
document.addEventListener("keydown", function(e) { if (e.key === "Escape") closeModal(); });
|
|
|
|
| 88 |
return;
|
| 89 |
}
|
| 90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
// Detectar modo auto-apertura: URL contiene ?visualizador
|
| 92 |
var urlParams = new URLSearchParams(window.location.search);
|
| 93 |
var autoOpen = urlParams.has("visualizador");
|
|
|
|
| 95 |
// -- Estilos --
|
| 96 |
var style = document.createElement("style");
|
| 97 |
style.textContent = [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
".hr-overlay{display:none;position:fixed;inset:0;z-index:2147483647;",
|
| 99 |
"background:rgba(0,0,0,.55);align-items:center;justify-content:center;}",
|
| 100 |
".hr-overlay.open{display:flex;animation:hrFade .2s ease;}",
|
|
|
|
| 169 |
document.body.style.overflow = "";
|
| 170 |
}
|
| 171 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 172 |
closeBtn.addEventListener("click", closeModal);
|
| 173 |
overlay.addEventListener("click", function(e) { if (e.target === overlay) closeModal(); });
|
| 174 |
document.addEventListener("keydown", function(e) { if (e.key === "Escape") closeModal(); });
|