Changes for page Home
From version 8.1
edited by Monika Leung
on 2026/03/09 12:36
on 2026/03/09 12:36
Change comment:
Upload new image "eantc_footer_img.png", version 1.1
To version 6.1
edited by Monika Leung
on 2026/03/06 15:55
on 2026/03/06 15:55
Change comment:
There is no comment for this version
Summary
-
Attachments (0 modified, 0 added, 1 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- eantc_footer_img.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -xwiki:XWiki.leung - Size
-
... ... @@ -1,1 +1,0 @@ 1 -382.4 KB - Content
- XWiki.JavaScriptExtension[0]
-
- Code
-
... ... @@ -10,47 +10,7 @@ 10 10 } 11 11 document.addEventListener("DOMContentLoaded", open_ext_link_in_new_tab); 12 12 13 -// For mobile eantc-nav: open dropdown on first tap, open link on second tap 14 14 require(['jquery'], function($) { 15 - function isMobile() { 16 - return window.matchMedia("(max-width: 768px)").matches; 17 - } 18 - 19 - // Open dropdown on arrow click 20 - $('#eantc-nav .dropdown-arrow').on('click', function(e) { 21 - e.preventDefault(); 22 - e.stopPropagation(); 23 - $(this).closest('.dropdown, .dropdown-submenu').toggleClass('open'); 24 - }); 25 - 26 - // First-level dropdown 27 - $('#eantc-nav .dropdown > a').on('click', function(e) { 28 - if (!isMobile()) { 29 - return; 30 - } 31 - var $parent = $(this).parent(); 32 - if (!$parent.hasClass('open')) { 33 - // First tap, open dropdown 34 - e.preventDefault(); 35 - $parent.addClass('open'); 36 - } 37 - // Second tap, allow default link navigation 38 - }); 39 - 40 - // Second-level dropdown 41 - $('#eantc-nav .dropdown-submenu > a').on('click', function(e) { 42 - if (!isMobile()) { 43 - return 44 - }; 45 - var $parent = $(this).parent(); 46 - if (!$parent.hasClass('open')) { 47 - e.preventDefault(); 48 - $parent.addClass('open'); 49 - } 50 - }); 51 -}); 52 - 53 -require(['jquery'], function($) { 54 54 jQuery(document.links).filter(function() { 55 55 return this.hostname != window.location.hostname; 56 56 }).attr('target', '_blank'); ... ... @@ -72,19 +72,3 @@ 72 72 } 73 73 }); 74 74 75 -// Display back to top button after scrolling 76 -const backToTop = document.getElementById("back-to-top"); 77 -window.addEventListener("scroll", function () { 78 - if (window.scrollY > 200) { 79 - backToTop.style.display = "block"; 80 - } else { 81 - backToTop.style.display = "none"; 82 - } 83 -}); 84 -backToTop.addEventListener("click", function () { 85 - window.scrollTo({ 86 - top: 0, 87 - behavior: "smooth" 88 - }); 89 -}); 90 -