aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
Diffstat (limited to 'view')
-rw-r--r--view/js/main.js2
-rw-r--r--view/php/default.php2
-rw-r--r--view/php/theme_init.php1
-rw-r--r--view/theme/redbasic/js/redbasic.js17
4 files changed, 21 insertions, 1 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 3981d4266..6d68a5108 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -666,6 +666,8 @@ function updateConvItems(mode,data) {
$('.item_' + bParam_mid.substring(0,32)).addClass('item-highlight');
}
+ $(document.body).trigger("sticky_kit:recalc");
+
}
function collapseHeight() {
diff --git a/view/php/default.php b/view/php/default.php
index f5be4fa35..839a36b5b 100644
--- a/view/php/default.php
+++ b/view/php/default.php
@@ -10,7 +10,7 @@
<header><?php if(x($page,'header')) echo $page['header']; ?></header>
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"><?php if(x($page,'nav')) echo $page['nav']; ?></nav>
<main>
- <aside id="region_1"><?php if(x($page,'aside')) echo $page['aside']; ?></aside>
+ <aside id="region_1"><div id="left_aside_wrapper"><?php if(x($page,'aside')) echo $page['aside']; ?></div></aside>
<section id="region_2"><?php if(x($page,'content')) echo $page['content']; ?>
<div id="page-footer"></div>
<div id="pause"></div>
diff --git a/view/php/theme_init.php b/view/php/theme_init.php
index 46aadaa7d..1fb07ae4f 100644
--- a/view/php/theme_init.php
+++ b/view/php/theme_init.php
@@ -26,6 +26,7 @@ head_add_js('library/jquery-textcomplete/jquery.textcomplete.js');
//head_add_js('library/colorbox/jquery.colorbox.js');
head_add_js('library/jquery.timeago.js');
head_add_js('library/readmore.js/readmore.js');
+head_add_js('library/sticky-kit/sticky-kit.min.js');
//head_add_js('library/jquery_ac/friendica.complete.js');
//head_add_js('library/tiptip/jquery.tipTip.minified.js');
head_add_js('library/jgrowl/jquery.jgrowl_minimized.js');
diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js
index c5f74db3f..c3c2c7e3f 100644
--- a/view/theme/redbasic/js/redbasic.js
+++ b/view/theme/redbasic/js/redbasic.js
@@ -16,6 +16,23 @@ $(document).ready(function() {
}
$('#css3-calc').remove(); // Remove the test element
+ if($(window).outerWidth() > 767) {
+ $('#left_aside_wrapper').stick_in_parent({
+ offset_top: $('nav').outerHeight(true)
+ });
+ }
+
+ $(window).resize(function() {
+ if($(window).outerWidth() > 767) {
+ $('#left_aside_wrapper').stick_in_parent({
+ offset_top: $('nav').outerHeight(true)
+ });
+ }
+ else {
+ $('#left_aside_wrapper').trigger("sticky_kit:detach");
+ }
+ });
+
$('#expand-aside').click(function() {
$('#expand-aside-icon').toggleClass('fa-arrow-circle-right').toggleClass('fa-arrow-circle-left');
$('main').toggleClass('region_1-on');