From a5035dee74da87a529b2de938ce10bb8bb8d8346 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Tue, 23 Aug 2016 19:13:46 -0700 Subject: several cover photo widget enhancements: - allow a click anywhere on the page to cause the photo to autoscroll - provide a logic flag to autoscroll only once - allow manual scroll back to see the cover photo afterward (tricky to handle the nav menu here) - on scroll back, the nav remains fixed at the top and the top pixels of the cover photo are covered (this was an acceptable tradeoff to gain the ability to see the photo again without causing unpredictable behaviour of the nav) - some positioning details in small screen width mode caused jot to be off screen due to insufficient top padding; a manual padding was also added as something still wasn't right even after adding the nav height - very minor nit: if screen size is reduced below 755 and then upsized again, the cover photo will not be redisplayed --- view/tpl/cover_photo_widget.tpl | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) (limited to 'view') diff --git a/view/tpl/cover_photo_widget.tpl b/view/tpl/cover_photo_widget.tpl index 4e210a300..4dfaf415b 100755 --- a/view/tpl/cover_photo_widget.tpl +++ b/view/tpl/cover_photo_widget.tpl @@ -1,9 +1,12 @@ -
+
{{$photo_html}}
-- cgit v1.2.3 From 206054678ba70fae851c40bf79871ad9a042ca2f Mon Sep 17 00:00:00 2001 From: redmatrix Date: Tue, 23 Aug 2016 20:10:56 -0700 Subject: cover photo: adjustments to display the entire photo on manual scrollback (padding added for nav height) --- view/tpl/cover_photo_widget.tpl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'view') diff --git a/view/tpl/cover_photo_widget.tpl b/view/tpl/cover_photo_widget.tpl index 4dfaf415b..91f304ccb 100755 --- a/view/tpl/cover_photo_widget.tpl +++ b/view/tpl/cover_photo_widget.tpl @@ -29,6 +29,7 @@ $('main').css('opacity', 1); $('aside').css('padding-top', aside_padding_top + 'px'); $('section').css('padding-top', section_padding_top + 'px'); + $('#cover-photo').css('padding-top', $('nav').outerHeight()); $(window).scrollTop($(window).scrollTop() - $('#cover-photo').height()) $('.navbar-fixed-top').css({ 'position' : 'fixed', 'top' : 0}); $('main').css('margin-top', ''); @@ -54,7 +55,7 @@ if(coverSlid) return; $('html, body').animate({scrollTop: Math.ceil($('#cover-photo').height()) + 'px' }); - $('#cover-photo').css({ 'position' : 'relative' , 'top' : 0 }); + $('#cover-photo').css({ 'position' : 'relative' , 'top' : $('nav').outerHeight() }); $('.navbar-fixed-top').css({ 'position' : 'fixed', 'top' : 0}); $('aside').css('padding-top', aside_padding_top + 'px'); $('section').css('padding-top', section_padding_top + 'px'); -- cgit v1.2.3 From 238621ee926e43625a8b15fb9faf996fb45149b3 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Tue, 23 Aug 2016 23:00:24 -0700 Subject: allow changing the server role - as well as configuring any of the three options during installation --- view/tpl/admin_site.tpl | 1 + view/tpl/install_settings.tpl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'view') diff --git a/view/tpl/admin_site.tpl b/view/tpl/admin_site.tpl index 6b8729ee6..d810e69f7 100755 --- a/view/tpl/admin_site.tpl +++ b/view/tpl/admin_site.tpl @@ -41,6 +41,7 @@ {{include file="field_input.tpl" field=$sitename}} + {{include file="field_select.tpl" field=$server_role}} {{include file="field_textarea.tpl" field=$banner}} {{include file="field_textarea.tpl" field=$admininfo}} {{include file="field_select.tpl" field=$language}} diff --git a/view/tpl/install_settings.tpl b/view/tpl/install_settings.tpl index 5ecd3243b..f7a0108a8 100755 --- a/view/tpl/install_settings.tpl +++ b/view/tpl/install_settings.tpl @@ -19,7 +19,7 @@ {{include file="field_input.tpl" field=$adminmail}} {{include file="field_input.tpl" field=$siteurl}} -{{include file="field_checkbox.tpl" field=$advanced}} +{{include file="field_select.tpl" field=$server_role}} {{include file="field_select_grouped.tpl" field=$timezone}} -- cgit v1.2.3 From 4c840d70a494dae62a856ed91f9039eb16bc51ee Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 24 Aug 2016 12:56:45 -0700 Subject: revert cover photo changes --- view/tpl/cover_photo_widget.tpl | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) (limited to 'view') diff --git a/view/tpl/cover_photo_widget.tpl b/view/tpl/cover_photo_widget.tpl index 91f304ccb..4e210a300 100755 --- a/view/tpl/cover_photo_widget.tpl +++ b/view/tpl/cover_photo_widget.tpl @@ -1,12 +1,9 @@ -
+
{{$photo_html}}
-- cgit v1.2.3 From aa0384bcece9ebf0a014c5387a91bb3f0d564301 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Wed, 24 Aug 2016 22:39:30 +0200 Subject: Revert "revert cover photo changes" This reverts commit 4c840d70a494dae62a856ed91f9039eb16bc51ee. --- view/tpl/cover_photo_widget.tpl | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'view') diff --git a/view/tpl/cover_photo_widget.tpl b/view/tpl/cover_photo_widget.tpl index 4e210a300..91f304ccb 100755 --- a/view/tpl/cover_photo_widget.tpl +++ b/view/tpl/cover_photo_widget.tpl @@ -1,9 +1,12 @@ -
+
{{$photo_html}}
-- cgit v1.2.3 From 798b80e486547e4bd1e99d8513f00f4288b14635 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Wed, 24 Aug 2016 22:40:15 +0200 Subject: do not remove cover photo after scrolling it up. mimik an scroll edge if scrolling up again before scrolling into the cover photo again. --- view/tpl/cover_photo_widget.tpl | 63 +++++++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 24 deletions(-) (limited to 'view') diff --git a/view/tpl/cover_photo_widget.tpl b/view/tpl/cover_photo_widget.tpl index 91f304ccb..884dd0615 100755 --- a/view/tpl/cover_photo_widget.tpl +++ b/view/tpl/cover_photo_widget.tpl @@ -5,36 +5,54 @@ $(document).ready(function() { - $('body').on('click',slideUpCover); - aside_padding_top = parseInt($('aside').css('padding-top')); section_padding_top = parseInt($('section').css('padding-top')); + $(document).on('click', slideUpCover); + if($('#cover-photo').length && $(window).width() > 755) { - $('.navbar-fixed-top').css('position', 'relative'); - $('main').css('margin-top', - $('nav').outerHeight(true) + 'px'); - $('aside').css('padding-top', aside_padding_top - $('nav').outerHeight() + 'px'); - $('section').css('padding-top', section_padding_top - $('nav').outerHeight() + 'px'); - $('main').css('opacity', 0.5); - $('header').hide(); + if($(window).scrollTop() <= $('#cover-photo').height()) { + $('main').css('margin-top', - $('nav').outerHeight(true) + 'px'); + $('aside').css('padding-top', aside_padding_top - $('nav').outerHeight() + 'px'); + $('section').css('padding-top', section_padding_top - $('nav').outerHeight() + 'px'); + $('.navbar-fixed-top').css('position', 'relative'); + $('main').css('opacity', 0); + $('header').hide(); + } } else { $('#cover-photo').remove(); + coverSlid = true; } }); $(window).scroll(function () { - if((! coverSlid) && $('#cover-photo').length && $(window).width() > 755 && $(window).scrollTop() >= $('#cover-photo').height()) { + if($('#cover-photo').length && $(window).width() > 755 && $(window).scrollTop() >= $('#cover-photo').height()) { $('header').fadeIn(); $('main').css('opacity', 1); $('aside').css('padding-top', aside_padding_top + 'px'); $('section').css('padding-top', section_padding_top + 'px'); - $('#cover-photo').css('padding-top', $('nav').outerHeight()); - $(window).scrollTop($(window).scrollTop() - $('#cover-photo').height()) - $('.navbar-fixed-top').css({ 'position' : 'fixed', 'top' : 0}); + $('.navbar-fixed-top').css('position', ''); $('main').css('margin-top', ''); coverSlid = true; } + else if ($('#cover-photo').length && $(window).width() > 755 && $(window).scrollTop() <= $('#cover-photo').height()){ + if(coverSlid) { + $(window).scrollTop(Math.ceil($('#cover-photo').height())); + setTimeout(function(){ coverSlid = false; }, 1000); + } + else { + if($(window).scrollTop() <= $('#cover-photo').height()) { + $('main').css('margin-top', - $('nav').outerHeight(true) + 'px'); + $('aside').css('padding-top', aside_padding_top - $('nav').outerHeight() + 'px'); + $('section').css('padding-top', section_padding_top - $('nav').outerHeight() + 'px'); + + $('.navbar-fixed-top').css('position', 'relative'); + $('main').css('opacity', 0); + $('header').hide(); + } + } + } if($('#cover-photo').length) { $('main').css('opacity', ($(window).scrollTop()/$('#cover-photo').height()).toFixed(1)); } @@ -42,29 +60,26 @@ $(window).resize(function () { if($('#cover-photo').length && $(window).width() < 755) { - $('main').css('opacity', 1); - $('aside').css('padding-top', aside_padding_top + $('nav').outerHeight() + 20 + 'px'); - $('section').css('padding-top', section_padding_top + $('nav').outerHeight() + 20 + 'px'); - $('.navbar-fixed-top').css({ 'position' : 'fixed', 'top' : 0 }); $('#cover-photo').remove(); + $('main').css('opacity', 1); + $('aside').css('padding-top', aside_padding_top + 'px'); + $('section').css('padding-top', section_padding_top + 'px'); + $('.navbar-fixed-top').css('position', ''); + coverSlid = true; } }); function slideUpCover() { - if(coverSlid) + if(coverSlid) { return; + } $('html, body').animate({scrollTop: Math.ceil($('#cover-photo').height()) + 'px' }); - $('#cover-photo').css({ 'position' : 'relative' , 'top' : $('nav').outerHeight() }); - $('.navbar-fixed-top').css({ 'position' : 'fixed', 'top' : 0}); - $('aside').css('padding-top', aside_padding_top + 'px'); - $('section').css('padding-top', section_padding_top + 'px'); - $('main').css('margin-top', ''); - coverSlid = true; + return false; } -
+
{{$photo_html}}
-- cgit v1.2.3 From a78025255235b5aa34bc90e990e9accf91db320d Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Wed, 24 Aug 2016 22:47:33 +0200 Subject: remove the onclick action --- view/tpl/cover_photo_widget.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'view') diff --git a/view/tpl/cover_photo_widget.tpl b/view/tpl/cover_photo_widget.tpl index 884dd0615..59626cf32 100755 --- a/view/tpl/cover_photo_widget.tpl +++ b/view/tpl/cover_photo_widget.tpl @@ -79,7 +79,7 @@ } -
+
{{$photo_html}}
-- cgit v1.2.3 From 5c32f42fe986d2312cfbee9f8c52375af6a602b8 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Wed, 24 Aug 2016 22:58:02 +0200 Subject: do not return false since it could prevent clicking also when not appropriate. --- view/tpl/cover_photo_widget.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'view') diff --git a/view/tpl/cover_photo_widget.tpl b/view/tpl/cover_photo_widget.tpl index 59626cf32..93e3f057e 100755 --- a/view/tpl/cover_photo_widget.tpl +++ b/view/tpl/cover_photo_widget.tpl @@ -75,7 +75,7 @@ return; } $('html, body').animate({scrollTop: Math.ceil($('#cover-photo').height()) + 'px' }); - return false; + return; } -- cgit v1.2.3 From a81da0ec345fbc6c7334b6b0d5ae11a19a30918b Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 24 Aug 2016 20:06:44 -0700 Subject: off by one pixel --- view/tpl/cover_photo_widget.tpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'view') diff --git a/view/tpl/cover_photo_widget.tpl b/view/tpl/cover_photo_widget.tpl index 93e3f057e..2b47270c9 100755 --- a/view/tpl/cover_photo_widget.tpl +++ b/view/tpl/cover_photo_widget.tpl @@ -11,7 +11,7 @@ $(document).on('click', slideUpCover); if($('#cover-photo').length && $(window).width() > 755) { - if($(window).scrollTop() <= $('#cover-photo').height()) { + if($(window).scrollTop() < $('#cover-photo').height()) { $('main').css('margin-top', - $('nav').outerHeight(true) + 'px'); $('aside').css('padding-top', aside_padding_top - $('nav').outerHeight() + 'px'); $('section').css('padding-top', section_padding_top - $('nav').outerHeight() + 'px'); @@ -36,13 +36,13 @@ $('main').css('margin-top', ''); coverSlid = true; } - else if ($('#cover-photo').length && $(window).width() > 755 && $(window).scrollTop() <= $('#cover-photo').height()){ + else if ($('#cover-photo').length && $(window).width() > 755 && $(window).scrollTop() < $('#cover-photo').height()){ if(coverSlid) { $(window).scrollTop(Math.ceil($('#cover-photo').height())); setTimeout(function(){ coverSlid = false; }, 1000); } else { - if($(window).scrollTop() <= $('#cover-photo').height()) { + if($(window).scrollTop() < $('#cover-photo').height()) { $('main').css('margin-top', - $('nav').outerHeight(true) + 'px'); $('aside').css('padding-top', aside_padding_top - $('nav').outerHeight() + 'px'); $('section').css('padding-top', section_padding_top - $('nav').outerHeight() + 'px'); -- cgit v1.2.3 From 002c20391391bf6086d8a4fb7726c7d33058f7cb Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 26 Aug 2016 19:51:39 +0200 Subject: contact-block needs a class clear div at the end to not mess with following widgets and whitespace --- view/tpl/contact_block.tpl | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'view') diff --git a/view/tpl/contact_block.tpl b/view/tpl/contact_block.tpl index 6a29abaef..580a8a41c 100755 --- a/view/tpl/contact_block.tpl +++ b/view/tpl/contact_block.tpl @@ -1,13 +1,14 @@
-

{{$contacts}}

-{{if $micropro}} - {{if $viewconnections}} - {{$viewconnections}} - {{/if}} -
- {{foreach $micropro as $m}} - {{$m}} - {{/foreach}} -
-{{/if}} +

{{$contacts}}

+ {{if $micropro}} + {{if $viewconnections}} + {{$viewconnections}} + {{/if}} +
+ {{foreach $micropro as $m}} + {{$m}} + {{/foreach}} +
+ {{/if}}
+
-- cgit v1.2.3