]> _ Git - fluidbook-html5.git/commitdiff
wip #7461 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 12 May 2025 16:03:38 +0000 (18:03 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 12 May 2025 16:03:38 +0000 (18:03 +0200)
js/libs/fluidbook/fluidbook.burger.js
js/libs/fluidbook/fluidbook.resize.js
style/burger.less

index 5b00db457ed20d9c30bb09ce5955a243dda8635d..7ba839e4e6edbefb4ffbc703fa9da79bda4478b4 100644 (file)
@@ -72,7 +72,7 @@ FluidbookBurger.prototype = {
         $('#main header').append(menuOpener);
 
         // Add holder list element for menu items
-        $("#menu").append('<ul id="menuList"' + v2 + '></ul>');
+        $("#menu").append('<div id="menuList"' + v2 + '><ul></ul></div>');
 
         // Add Search form
         var searchElement = (this.fluidbook.settings.search) ? this.getSearch() : '';
@@ -190,6 +190,7 @@ FluidbookBurger.prototype = {
             $("#menu,#menuOverlay").show();
             setTimeout(function () {
                 $("#menu").addClass('open');
+                this.fluidbook.resize.resizeMenu();
                 if (focusClose) {
                     setTimeout(function () {
                         if ($this.fluidbook.input.isUsingKeyboard()) {
@@ -205,6 +206,7 @@ FluidbookBurger.prototype = {
             $("#menuOpener").attr('aria-expanded', 'true');
         }
         this.isOpened = true;
+        this.fluidbook.resize.resizeMenu();
     },
 
     closeAll: function () {
@@ -235,11 +237,11 @@ FluidbookBurger.prototype = {
     },
 
     hideMenuItems: function () {
-        gsap.to($('#menuList > li, #shareLinks,footer#mobile-credits'), {duration: 0.1, opacity: 0, display: 'none'});
+        gsap.to($('#menuList >ul > li, #shareLinks,footer#mobile-credits'), {duration: 0.1, opacity: 0, display: 'none'});
     },
 
     showMenuItems: function () {
-        gsap.to($('#menuList > li, #shareLinks,footer#mobile-credits'), {duration: 0.3, opacity: 1, display: 'block'});
+        gsap.to($('#menuList >ul> li, #shareLinks,footer#mobile-credits'), {duration: 0.3, opacity: 1, display: 'block'});
     },
 
     openSearch: function (q, cb) {
index 337d61aed5a452719e73faa8d27d11fc6453489d..f38ccd849122b2557f8798f1a5dea002d2926947 100644 (file)
@@ -577,7 +577,9 @@ FluidbookResize.prototype = {
             return false;
         }
         this.resizeHorizontalNav();
-        if (!this.fluidbook.nav.menuIsOpen) return false;
+        if (!this.fluidbook.nav.burger.isOpened) {
+            return false;
+        }
 
         var wh = $(window).height();
         var formHeight = $('#searchForm').height();
@@ -604,6 +606,7 @@ FluidbookResize.prototype = {
 
         // Max-height for the top level of the main menu so it can scroll between the search box and sharing bar
         $('#menuList > ul').css('maxHeight', mainMenuMaxHeight);
+        console.log(mainMenuMaxHeight);
 
         // Set max-height for search results section (using CSS vh units was unreliable)
         if (this.fluidbook.search.menuSearchResults !== undefined) {
index 7896916d91181bb4bff9f90233e0618385a7f017..7d7de1b64b00d45daef28d0332845d275faecf76 100644 (file)
@@ -203,7 +203,6 @@ html.mm-opening .mm-menu.mm-opened[class*=mm-pagedim] ~ #mm-blocker {
   overflow: hidden;
   position: relative;
   height: 100%;
-  padding-top: 81px;
 
   &:before {
     height: 0; // Fix spacing with search box
@@ -214,6 +213,10 @@ html.mm-opening .mm-menu.mm-opened[class*=mm-pagedim] ~ #mm-blocker {
     margin-bottom: 0;
     padding-top: 20px;
     padding-bottom: 20px;
+
+    .ps__rail-y {
+      top: 60px !important;
+    }
   }
 
   .svg-icon {
@@ -282,7 +285,7 @@ html.mm-opening .mm-menu.mm-opened[class*=mm-pagedim] ~ #mm-blocker {
     padding: 0 70px 0 1em;
   }
 
-  &:focus{
+  &:focus {
 
   }
 }