sidebar pushed to bottom on small screens.
authorrsiddharth <rsd@gnu.org>
Tue, 23 Feb 2016 08:44:14 +0000 (03:44 -0500)
committerrsiddharth <rsd@gnu.org>
Tue, 23 Feb 2016 08:44:14 +0000 (03:44 -0500)
On screens < 768px, the nav links, 'become fsf member' link, 'recent
updates' block are moved to the bottom.

2016/includes/common_js.html

index 7713338523e2fb5fb988fb0a426178a41a1bfe36..a04c03393d64fdf25cc9c92c39b965414991d0b1 100755 (executable)
@@ -21,4 +21,17 @@ function logoTextStack() {
     }
 }
 </script>
+<script>
+ $(document).ready(lp_sidebar_place);
+ $(window).resize(lp_sidebar_place);
+
+ function lp_sidebar_place() {
+     screen_size = $(window).width();
 
+     if(screenSize <= 767) {
+         $("#lp-nav").insertAfter("#lp-content");
+     } else {
+         $("#lp-nav").insertBefore("#lp-content");
+     }
+ }
+</script>