From ac11640938f2e7e3d691a9932cada2eab26d4fd4 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 6 Apr 2014 21:26:24 +0200 Subject: [PATCH 1/4] [ticket/232] Use class for clear both
B3P-232 --- styles/prosilver/template/portal/_block_config.html | 4 ++-- styles/prosilver/theme/portal.css | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/styles/prosilver/template/portal/_block_config.html b/styles/prosilver/template/portal/_block_config.html index c87b8ea9..edfd608b 100644 --- a/styles/prosilver/template/portal/_block_config.html +++ b/styles/prosilver/template/portal/_block_config.html @@ -2,13 +2,13 @@ - + - + diff --git a/styles/prosilver/theme/portal.css b/styles/prosilver/theme/portal.css index 4882c236..502b0cb2 100644 --- a/styles/prosilver/theme/portal.css +++ b/styles/prosilver/theme/portal.css @@ -130,6 +130,10 @@ span.portal-corners-top-inner, span.portal-corners-bottom-inner{ margin: 0; } +.portal-clear { + clear: both; +} + /* RTL language fixes */ .rtl .portal-navigation ul li a{ background-image: url("./images/portal/arrowbullet_rtl.gif"); From 67b067355d64498443ed7410b78fed09581aea8d Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 6 Apr 2014 21:26:53 +0200 Subject: [PATCH 2/4] [ticket/232] Add missing margin-right to #viewpoll ID B3P-232 --- styles/prosilver/theme/portal.css | 1 + 1 file changed, 1 insertion(+) diff --git a/styles/prosilver/theme/portal.css b/styles/prosilver/theme/portal.css index 502b0cb2..82ffb467 100644 --- a/styles/prosilver/theme/portal.css +++ b/styles/prosilver/theme/portal.css @@ -117,6 +117,7 @@ span.portal-corners-top-inner, span.portal-corners-bottom-inner{ #portal-body #viewpoll { margin-left: 0px; + margin-right: 0px; } /** From 42a34c2ea61528676371616547a7ee89fc4ccf92 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 6 Apr 2014 21:27:32 +0200 Subject: [PATCH 3/4] [ticket/232] Get rid of useless padding and margins in mobile view B3P-232 --- styles/prosilver/theme/responsive.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/styles/prosilver/theme/responsive.css b/styles/prosilver/theme/responsive.css index 8edfb950..198c316d 100644 --- a/styles/prosilver/theme/responsive.css +++ b/styles/prosilver/theme/responsive.css @@ -52,4 +52,6 @@ dt#a { width: 125% !important; } #portal-left ul.topiclist dd, #portal-right ul.topiclist dd { display: block !important; } .portal-responsive-show { display: block !important; } .portal-responsive-hide { display: none !important; } + #portal-body { padding-top: 0px !important; } + .portal-clear { display: none !important; } } From 2390fd8432b7e727fe0d6e953340ad6f3dc4ab16 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 6 Apr 2014 21:48:15 +0200 Subject: [PATCH 4/4] [ticket/232] Correctly align right column under left column in mobile view Javascript code will make sure that the right column is nicely aligned right below the left column if the screen width is not enough for 3 columns. B3P-232 --- styles/prosilver/template/portal/portal.js | 39 +++++++++++++++++++ .../template/portal/portal_body.html | 2 + 2 files changed, 41 insertions(+) create mode 100644 styles/prosilver/template/portal/portal.js diff --git a/styles/prosilver/template/portal/portal.js b/styles/prosilver/template/portal/portal.js new file mode 100644 index 00000000..1cb65b26 --- /dev/null +++ b/styles/prosilver/template/portal/portal.js @@ -0,0 +1,39 @@ +/** +* +* @package Board3 Portal v2.1 - javascript code +* @copyright (c) 2014 Board3 Group ( www.board3.de ) +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +(function($) { // Avoid conflicts with other libraries + +"use strict"; + +/** + * Correctly align the right column underneath the left column. + * This will make sure that the right column doesn't start before the end of + * the center column but rather right after the last module of the left column. + */ +phpbb.b3p_fix_right_column_margin = function() { + var width = $(window).width(); + + if (width <= 700) { + // Get height of left and center column + var center_height = $('#portal-center').outerHeight(); + var left_height = $('#portal-left').outerHeight(); + + $('#portal-right').css('margin-top', -(center_height - left_height) + 'px'); + } else { + $('#portal-right').css('margin-top', '0px'); + } +}; + +$(document).ready(function() { + phpbb.b3p_fix_right_column_margin(); + $(window).resize(function() { + phpbb.b3p_fix_right_column_margin(); + }); +}); + +})(jQuery); // Avoid conflicts with other libraries diff --git a/styles/prosilver/template/portal/portal_body.html b/styles/prosilver/template/portal/portal_body.html index 67bfb358..392eddde 100644 --- a/styles/prosilver/template/portal/portal_body.html +++ b/styles/prosilver/template/portal/portal_body.html @@ -112,4 +112,6 @@ + +