Jump to content

MediaWiki:Common.js

From ATRONIA Wiki
Revision as of 16:50, 28 April 2026 by WikiManagement (talk | contribs)

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* Qualquer JavaScript aqui será carregado para todos os utilizadores. */

$(function() {
    // 1. LINKS DAS IMAGENS (Caminhos diretos da tua Wiki)
    var img = {
        instagram: "https://wiki.atronia.eu/images/b/b7/Instagram.png",
        linkedin:  "https://wiki.atronia.eu/images/9/99/Linkdin.png",
        facebook:  "https://wiki.atronia.eu/images/5/55/Facebook.png",
        centro:    "https://wiki.atronia.eu/images/thumb/c/ce/Centro.png/120px-Centro.png",
        compete:   "https://wiki.atronia.eu/images/thumb/9/92/Compete.png/120px-Compete.png",
        pessoas:   "https://wiki.atronia.eu/images/thumb/2/20/Pessoas.png/250px-Pessoas.png", // Ajustado tamanho
        prr:       "https://wiki.atronia.eu/images/thumb/4/42/Prr.png/250px-Prr.png",     // Ajustado tamanho
        igus:      "https://wiki.atronia.eu/images/3/37/Igus.png"
    };

    var footerHTML = 
    '<div id="custom-atronia-footer" style="background-color: #121e1c; color: #ffffff; padding: 60px 40px; font-family: sans-serif; clear: both;">' +
        '<div class="atronia-footer-container" style="display: flex; flex-wrap: wrap; justify-content: space-between; max-width: 1400px; margin: 0 auto;">' +
            
            // COLUNA ESQUERDA: CONTACTOS
            '<div style="flex: 2; min-width: 300px; margin-bottom: 40px;">' +
                '<h4 style="font-size: 14px; font-weight: bold; margin-bottom: 20px;">Visit but keep in mind we\'re busy</h4>' +
                '<p style="font-size: 14px; color: #ccc; line-height: 1.6;">Rua do Norte 9,<br>Ílhavo, 3830-167<br>Portugal</p>' +
                '<h4 style="font-size: 14px; font-weight: bold; margin-top: 35px; margin-bottom: 20px;">Contact Us</h4>' +
                '<p style="font-size: 14px; color: #ccc; line-height: 1.6;">+351 934 886 253<br>info@atronia.eu</p>' +
                '<div style="margin-top: 25px; display: flex; gap: 15px;">' +
                    '<a href="https://facebook.com/atroniatech" target="_blank"><img src="'+img.facebook+'" width="30" style="filter: brightness(0) invert(1);"></a>' +
                    '<a href="https://linkedin.com/company/atronia" target="_blank"><img src="'+img.linkedin+'" width="30" style="filter: brightness(0) invert(1);"></a>' +
                    '<a href="https://instagram.com/atroniatech" target="_blank"><img src="'+img.instagram+'" width="30" style="filter: brightness(0) invert(1);"></a>' +
                '</div>' +
            '</div>' +

            // COLUNAS DE LINKS
            '<div style="flex: 3; display: flex; flex-wrap: wrap; justify-content: space-between;">' +
                '<div class="atronia-col"><h4>Menu</h4><a href="https://atronia.eu/">Home</a><a href="https://atronia.eu/about-us/">About us</a><a href="https://atronia.eu/hardware/">Hardware</a><a href="https://atronia.eu/solutions/">Solutions</a></div>' +
                '<div class="atronia-col"><h4>Solutions</h4><a href="https://atronia.eu/solutions/aquaguard/">Aquaguard</a><a href="https://atronia.eu/solutions/firefly/">Firefly</a><a href="https://atronia.eu/solutions/melisafe/">Melisafe</a><a href="https://atronia.eu/solutions/prevent/">Prevent</a></div>' +
                '<div class="atronia-col"><h4>Shop</h4><a href="https://atronia.eu/product/monarch-gateway/">Monarch</a><a href="https://atronia.eu/product/atlas-sbc/">Atlas</a><a href="https://atronia.eu/product-category/probes/">Probes</a><a href="https://atronia.eu/product-category/accessories/">Accessories</a></div>' +
                '<div class="atronia-col"><h4>Support</h4><a href="https://wiki.atronia.eu/">Wiki</a></div>' +
            '</div>' +
        '</div>' +

        '<hr style="border: 0; border-top: 1px solid rgba(255,255,255,0.1); margin: 40px 0;">' +

        // LOGOS POWERED & CO-SPONSORED
        '<div style="display: flex; flex-wrap: wrap; align-items: flex-start; max-width: 1400px; margin: 0 auto; gap: 60px;">' +
            '<div>' +
                '<p style="font-size: 11px; color: #888; text-transform: uppercase; margin-bottom: 15px;">Powered by:</p>' +
                '<img src="'+img.igus+'" width="140">' +
            '</div>' +
            '<div style="flex: 1;">' +
                '<p style="font-size: 11px; color: #888; text-transform: uppercase; margin-bottom: 15px;">Co-sponsored by:</p>' +
                '<div style="display: flex; flex-wrap: wrap; gap: 20px; align-items: center; opacity: 0.9;">' +
                    '<img src="'+img.compete+'" height="40">' +
                    '<img src="'+img.centro+'" height="40">' +
                    '<img src="'+img.pessoas+'" height="40">' +
                    '<img src="'+img.prr+'" height="40">' +
                '</div>' +
            '</div>' +
        '</div>' +

        '<div style="max-width: 1400px; margin: 40px auto 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.05);">' +
            '<a href="https://atronia.eu/livro-de-reclamacoes/" style="color: #ffffff; font-weight: bold; text-decoration: underline; font-size: 13px; margin-right: 15px;">Livro de Reclamações</a>' +
            '<a href="https://atronia.eu/privacy-policy/" style="color: #ffffff; font-weight: bold; text-decoration: underline; font-size: 13px;">Privacy Policy</a>' +
            '<p style="font-size: 11px; color: #555; margin-top: 20px;">This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.</p>' +
        '</div>' +
    '</div>';

    // Injeção e Limpeza de cache
    $('#custom-atronia-footer').remove();
    $('body').append(footerHTML);
});





// 4. GOOGLE ANALYTICS (Fora do $(function) para carregar logo)
var gaScript = document.createElement('script');
gaScript.src = "https://www.googletagmanager.com/gtag/js?id=G-MX174P23PW";
gaScript.async = true;
document.head.appendChild(gaScript);
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-MX174P23PW');