<!-- [ auth-signin ] start --> <style> .auth-wrapper { position: fixed; display: flex; align-items: center; justify-content: center; overflow: hidden; min-width: 100%; min-height: 100vh; padding-bottom: 100px; background: #e9ecef; background-image: url(random:developer) !important; background-size: cover; background-attachment: fixed; background-position: center; top: 0px; } </style> <div id="layoutSidenav_content" style=" position: fixed; display: flex; align-items: center; justify-content: center; overflow: hidden; min-width: 100%; min-height: 100vh; padding-bottom: 100px; background: #e9ecef; background-image: url(random:developer) ; background-size: cover; background-attachment: fixed; background-position: center; top: 0px;"> <div class="auth-content text-center"> <div class="card"> <div class="card-body">
Bloco1
Olá, bem vindo
Logomarca
User Name
User Password
Empresa
Selecione a Empresa
Kennedy - Advogados Associados
Acessar
Mantenha-me conectado
Lembrar-me
Esqueceu sua senha ?
Tema
Theme
theme-agro-forest
theme-dark
theme-dracula
theme-light
theme-material-dark
theme-material-light
theme-monochrome-dark
theme-monochrome-light
theme-nord
theme-red-gold
theme-solarized-dark
theme-solarized-light
Não tem uma conta ?
Registrar-me
Bloco2
Powered by
Aledro
</div> </div> </div> </div> <!-- [ auth-signin ] end --> <script> const accessKey = "33M_yEntp1eqWsaaBVfyRtZtFIWVCjW8ullRXQY6Mi4"; // Substitua pela sua real chave da Unsplash const div = document.getElementById("layoutSidenav_content"); if (div) { // Verifica se a string background-image tem "random:..." const styleAttr = div.getAttribute("style") || ""; const match = styleAttr.match(/background-image:\s*url\(random:([^)]+)\)/i); if (match) { const tema = match[1].trim(); const unsplashUrl = `https://api.unsplash.com/photos/random?orientation=landscape&query=${tema}&client_id=${accessKey}`; fetch(unsplashUrl) .then(res => res.json()) .then(data => { div.style.backgroundImage = `url('${data.urls.full}')`; // Garantir que estilos complementares sejam aplicados div.style.backgroundSize = "cover"; div.style.backgroundPosition = "center"; }) .catch(err => console.error("Erro ao buscar imagem:", err)); } else { console.warn("Nenhum tema encontrado no style da div."); } } else { console.warn("Div #layoutSidenav_content não encontrada."); } </script>