]> git.mxchange.org Git - friendica.git/commitdiff
Frio: Enable stiky aside only on desktop-size windows.
authorfabrixxm <fabrix.xm@gmail.com>
Thu, 27 Apr 2017 06:39:35 +0000 (08:39 +0200)
committerfabrixxm <fabrix.xm@gmail.com>
Thu, 27 Apr 2017 06:39:35 +0000 (08:39 +0200)
"Hack" to fix the "scroll back to top" problem with
chrome-based browsers, sticky-kit and off-canvas aside

view/theme/frio/css/style.css
view/theme/frio/js/theme.js

index 678bb91b168c2ee1b5b30935e8b2b6b53e0cbfb8..937e55042a73c86c0f1f6894cb7f456621496d8f 100644 (file)
@@ -126,9 +126,6 @@ code {
     aside.canvas-slid::before {
         opacity: 1;
     }
-    aside + div {
-        display:none!important;
-    }
 
 }
 /*
index 7412df9b8ea8cce9e089d341912db11619d8dfb0..62c45b3da2ca97cfc481271549c5370d5f679c87 100644 (file)
@@ -317,17 +317,19 @@ $(document).ready(function(){
        });
 
        /*
-        * Sticky aside on page scroll
+        * Sticky aside on page scroll, only on desktop
         */
-       $("aside").stick_in_parent({
-               offset_top: 100, // px, header + tab bar + spacing
-               recalc_every: 10
-       });
-       // recalculate sticky aside on clicks.
-       // this handle height changes on expanding submenus
-       $("aside").on("click", function(){
-               $(document.body).trigger("sticky_kit:recalc");
-       });
+       if ($(window).width() > 976) {
+               $("aside").stick_in_parent({
+                       offset_top: 100, // px, header + tab bar + spacing
+                       recalc_every: 10
+               });
+               // recalculate sticky aside on clicks.
+               // this handle height changes on expanding submenus
+               $("aside").on("click", function(){
+                       $(document.body).trigger("sticky_kit:recalc");
+               });
+       }
 });
 
 function openClose(theID) {