MediaWiki:Common.js: Difference between revisions

From Disaster Risk Gateway
Trying new footer
Tags: Mobile edit Mobile web edit
Trying new footer
Tags: Mobile edit Mobile web edit
Line 1: Line 1:
mw.loader.using('mediawiki.util').then(function () {
mw.loader.using('mediawiki.util').then(function () {
     function insertFooter() {
     function insertFooter() {
         const $footer = $('#footer');
         var $icons = $('#footer-icons');
         if (!$footer.length) return setTimeout(insertFooter, 100); // Retry until footer is available
         if (!$icons.length) return setTimeout(insertFooter, 100);
 
         $icons.before(`
         $footer.append(`
             <div id="drg-footer">
             <div id="drg-footer">
                 <div class="drg-columns">
                 <div class="drg-columns">
Line 14: Line 13:
                         <a href="/index.php?title=Main_Page&mobileaction=toggle_view_mobile">Mobile View</a>
                         <a href="/index.php?title=Main_Page&mobileaction=toggle_view_mobile">Mobile View</a>
                     </div>
                     </div>
                     <div class="drg-divider"></div>
                     <div class="drg-divider"></div>
                     <div class="drg-column drg-column-center">
                     <div class="drg-column drg-column-center">
                         <div class="drg-eu-flag">
                         <img class="drg-eu-flag" src="/index.php?title=Special:FilePath/Normal-reproduction-high-resolution_2.jpg" alt="EU logo">
                            <img src="/index.php?title=Special:FilePath/Normal-reproduction-high-resolution_2.jpg" alt="EU logo">
                        </div>
                         <div class="drg-eu-text">
                         <div class="drg-eu-text">
                             MYRIAD-EU project has received funding from the European Union’s Horizon 2020 Research and Innovation Programme under Grant Agreement No. 101003276.
                             MYRIAD-EU project has received funding from the European Union’s Horizon 2020 Research and Innovation Programme under Grant Agreement No. 101003276.
                         </div>
                         </div>
                     </div>
                     </div>
                     <div class="drg-divider"></div>
                     <div class="drg-divider"></div>
                     <div class="drg-column drg-column-right">
                     <div class="drg-column drg-column-right">
                         <a href="https://www.myriadproject.eu" target="_blank" rel="noopener">MYRIAD-EU</a>
                         <a href="https://www.myriadproject.eu" target="_blank" rel="noopener">MYRIAD-EU</a>
Line 34: Line 27:
                     </div>
                     </div>
                 </div>
                 </div>
                 <div class="drg-disclaimer">
                 <div class="drg-disclaimer">
                     This site is hosted by the British Geological Survey but responsibility for the content of the site lies with the MYRIAD-EU project, not with the British Geological Survey.
                     This site is hosted by the British Geological Survey but responsibility for the content of the site lies with the MYRIAD-EU project, not with the British Geological Survey. Questions, suggestions, or comments regarding the contents of this site should be directed to <a href="mailto:DisasterRiskGateway@bgs.ac.uk">DisasterRiskGateway@bgs.ac.uk</a>.
                    Questions, suggestions, or comments regarding the contents of this site should be directed to
                    <a href="mailto:DisasterRiskGateway@bgs.ac.uk">DisasterRiskGateway@bgs.ac.uk</a>.
                 </div>
                 </div>
             </div>
             </div>
         `);
         `);
     }
     }
     insertFooter();
     insertFooter();
});
});

Revision as of 14:17, 23 May 2025

mw.loader.using('mediawiki.util').then(function () {
    function insertFooter() {
        var $icons = $('#footer-icons');
        if (!$icons.length) return setTimeout(insertFooter, 100);
        $icons.before(`
            <div id="drg-footer">
                <div class="drg-columns">
                    <div class="drg-column drg-column-left">
                        <a href="/index.php/Disaster_Risk_Gateway">About</a>
                        <a href="/index.php/Disaster_Risk_Gateway:Privacy_Notice">Privacy Notice</a>
                        <a href="/index.php/Disaster_Risk_Gateway:Terms_of_Use">Terms of Use</a>
                        <a href="/index.php/Contact">Contact Us</a>
                        <a href="/index.php?title=Main_Page&mobileaction=toggle_view_mobile">Mobile View</a>
                    </div>
                    <div class="drg-divider"></div>
                    <div class="drg-column drg-column-center">
                        <img class="drg-eu-flag" src="/index.php?title=Special:FilePath/Normal-reproduction-high-resolution_2.jpg" alt="EU logo">
                        <div class="drg-eu-text">
                            MYRIAD-EU project has received funding from the European Union’s Horizon 2020 Research and Innovation Programme under Grant Agreement No. 101003276.
                        </div>
                    </div>
                    <div class="drg-divider"></div>
                    <div class="drg-column drg-column-right">
                        <a href="https://www.myriadproject.eu" target="_blank" rel="noopener">MYRIAD-EU</a>
                        <a href="https://be.linkedin.com/company/myriad-eu-project?trk=public_post_feed-actor-name" target="_blank" rel="noopener">LinkedIn</a>
                        <a href="#" target="_blank" rel="noopener">MYRIAD-EU dashboard</a>
                    </div>
                </div>
                <div class="drg-disclaimer">
                    This site is hosted by the British Geological Survey but responsibility for the content of the site lies with the MYRIAD-EU project, not with the British Geological Survey. Questions, suggestions, or comments regarding the contents of this site should be directed to <a href="mailto:DisasterRiskGateway@bgs.ac.uk">DisasterRiskGateway@bgs.ac.uk</a>.
                </div>
            </div>
        `);
    }
    insertFooter();
});