MediaWiki:Common.js: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
| Line 104: | Line 104: | ||
/* Botões Flutuantes: | /* Botões Flutuantes: Voltar ao Topo (Esquerda) + Website (Direita) */ | ||
var floatingNav = $('<div id="atronia-floating-nav" style="display:none; position:fixed; bottom:40px; right:40px; display:flex; gap:12px; z-index:9999; align-items:center;"></div>'); | var floatingNav = $('<div id="atronia-floating-nav" style="display:none; position:fixed; bottom:40px; right:40px; display:flex; gap:12px; z-index:9999; align-items:center;"></div>'); | ||
// 1. Botão do Website | // 1. Botão de Topo (Agora configurado para aparecer primeiro na fila) | ||
var backToTop = $('<div id="back-to-top" style="width:50px; height:50px; background-color:#BFFF00; color:#000000; border-radius:50%; text-align:center; line-height:50px; font-size:24px; cursor:pointer; box-shadow:0 4px 12px rgba(0,0,0,0.3); transition:all 0.3s ease;">↑</div>'); | |||
// 2. Botão do Website | |||
var siteBtn = $('<a href="https://atronia.eu/" target="_blank" style="text-decoration:none;">' + | var siteBtn = $('<a href="https://atronia.eu/" target="_blank" style="text-decoration:none;">' + | ||
'<div style="height:50px; padding:0 25px; background-color:#BFFF00; color:#000000; border-radius:25px; line-height:50px; font-weight:bold; font-size:14px; box-shadow:0 4px 12px rgba(0,0,0,0.3); cursor:pointer; transition:all 0.3s ease; font-family:\'Rubik\', sans-serif;">' + | '<div style="height:50px; padding:0 25px; background-color:#BFFF00; color:#000000; border-radius:25px; line-height:50px; font-weight:bold; font-size:14px; box-shadow:0 4px 12px rgba(0,0,0,0.3); cursor:pointer; transition:all 0.3s ease; font-family:\'Rubik\', sans-serif;">' + | ||
| Line 115: | Line 117: | ||
'</a>'); | '</a>'); | ||
// | // Montagem: Primeiro o backToTop, depois o siteBtn | ||
floatingNav.append(backToTop).append(siteBtn); | |||
floatingNav.append( | |||
$('body').append(floatingNav); | $('body').append(floatingNav); | ||
// Lógica de Scroll | // Lógica de Scroll | ||
$(window).scroll(function() { | $(window).scroll(function() { | ||
if ($(window).scrollTop() > 300) { | if ($(window).scrollTop() > 300) { | ||
| Line 131: | Line 130: | ||
}); | }); | ||
// Ação de Clique | // Ação de Clique | ||
backToTop.click(function() { | backToTop.click(function() { | ||
$('html, body').animate({scrollTop: 0}, 600); | $('html, body').animate({scrollTop: 0}, 600); | ||
}); | }); | ||
// Efeito de Hover | // Efeito de Hover | ||
$('#atronia-floating-nav > a > div, #back-to-top').hover( | $('#atronia-floating-nav > a > div, #back-to-top').hover( | ||
function() { | function() { | ||