fixed side-info popout, wasn't functional due to other javascript
authorLaury GvR <laury@gaslightmedia.com>
Thu, 5 Nov 2015 19:32:51 +0000 (14:32 -0500)
committerLaury GvR <laury@gaslightmedia.com>
Thu, 5 Nov 2015 19:32:51 +0000 (14:32 -0500)
footer.php
js/app.js
js/custom/sticky-footer.js

index 6d7e21c..6426409 100644 (file)
     <script>
     $(document).foundation({   equalizer : { equalize_on_stack: true   } });
     
+         $(function(){
+            var animspeed = 900; // animation speed in milliseconds
+            var $blockquote = $('#extra');
+            var width = 250;
+            $("#extra").width(width);
+            var height = $blockquote.height()+30;
+            var origPageHeight = $(".inner-wrap").height();
+            $blockquote.attr('data-fullheight',height+'px');
+            $blockquote.attr('data-fullwidth',width+'px');
+            $blockquote.attr('data-miniheight','50px');
+            $blockquote.attr('data-miniwidth','50px');
+            $("#extra").height(0).width(0);
+            $("#extra").css('display','block');
+
+    //        $(function() {
+    //            $("#right-sidebar-expand").click(function(){
+    //                $("#expand").animate({height:"300px", width:"300px"});
+    //            });
+    //            $("#right-sidebar-contract").click(function(){
+    //                $("#expand").animate({height:"0px",width:"0px"});
+    //            });
+    //        });
+            $('#right-sidebar-expand').on('click', function(e){
+                if (height > $("main").height()) {
+
+                    $(".inner-wrap").height(origPageHeight + (height - $("main").height()));
+
+                 }
+                $("#extra").attr("display", "visible");
+                $("#extra").animate({
+                  'height': $("#extra").attr('data-fullheight'), 'width': $("#extra").attr('data-fullwidth')
+                }, animspeed);
+                $("#extra").css("box-shadow", "-2px 9px 7px 4px lightgrey").css("border-radius","7px 0 7px 7px");
+                $('#right-sidebar-contract').removeClass('hide');
+                $(this).addClass('hide');
+            });
+
+            $('#right-sidebar-contract').on('click', function(e){
+                $(".inner-wrap").height(origPageHeight);
+                $("#extra").animate({
+                  'height': $("#extra").attr('data-miniheight'), 'width': $("#extra").attr('data-miniwidth')
+                }, animspeed);
+                $("#extra").css("box-shadow", "0").css("border-radius","0");
+                $('#right-sidebar-expand').removeClass('hide');
+                $(this).addClass('hide');
+            });
+        });
+   
     $(function(){
         var toggleSitelist = true;
         $('#emmet').on('click',function(e) {
 //        });
     });
     
-
-    
     </script>
-  </body>
+   </body>
 </html>
index 619947a..e99c84d 100644 (file)
--- a/js/app.js
+++ b/js/app.js
@@ -34,8 +34,8 @@ $(document).ready(function () {
 //  $('#connect').css({'position' : position});
 //});
 //
-function get_footer_position() {
-    return 'fixed';
+//function get_footer_position() {
+//    return 'fixed';
 //  if ($(window).width() < 640) {
 //      $("#connect").css('padding-bottom','53px');
 //    return 'relative';
@@ -65,6 +65,6 @@ function get_footer_position() {
 //  function remove_the_arrow() {
 //      $('.sticky-footer-wrapper-class:after').css('border-width', '0');
 //  }
-}
+//}
 
 
index 63191d8..2260789 100644 (file)
@@ -14,8 +14,8 @@
 //  $('#connect').css({'position' : position});
 //});
 //
-function get_footer_position() {
-    return 'fixed';
+//function get_footer_position() {
+//    return 'fixed';
 //  if ($(window).width() < 640) {
 //      $("#connect").css('padding-bottom','53px');
 //    return 'relative';
@@ -45,6 +45,6 @@ function get_footer_position() {
 //  function remove_the_arrow() {
 //      $('.sticky-footer-wrapper-class:after').css('border-width', '0');
 //  }
-}
+//}