From 50ac9378e3b1b55e8f12513f5b72152078477ab2 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Wed, 10 Jun 2015 13:08:17 +0200 Subject: assign right aside the same width as we have in left aside but hide it on small and xs screens. make aside width a variablee for easier handling. --- view/css/default.css | 6 ++---- view/php/default.php | 2 +- view/theme/redbasic/css/style.css | 12 +++++++++--- view/theme/redbasic/php/style.php | 9 ++++++--- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/view/css/default.css b/view/css/default.css index 56173f932..2675bc2d8 100644 --- a/view/css/default.css +++ b/view/css/default.css @@ -14,10 +14,8 @@ main { height: 100%; } -aside#region_1 { - width: 231px; - min-width: 231px; - max-width: 231px; +aside#region_1, +aside#region_3 { display: table-cell; vertical-align: top; padding: 65px 7px 0px 7px; diff --git a/view/php/default.php b/view/php/default.php index 01cd8a0d4..4c8311ef0 100644 --- a/view/php/default.php +++ b/view/php/default.php @@ -14,7 +14,7 @@
- + diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index a671a6671..1c575a63e 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -24,8 +24,14 @@ body { height: 100%; } +aside { + width: $aside_widthpx; + min-width: $aside_widthpx; + max-width: $aside_widthpx; +} + main { - max-width: $main_width; + max-width: $main_widthpx; } h1, .h1, h2, .h2 { @@ -2097,8 +2103,8 @@ nav .badge.mail-update:hover { } main { - left: -231px; - width: calc( 100% + 231px ); + left: -$aside_widthpx; + width: calc( 100% + $aside_widthpx ); } main.region_1-on { diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php index c6231e690..5a28fc4e3 100644 --- a/view/theme/redbasic/php/style.php +++ b/view/theme/redbasic/php/style.php @@ -153,11 +153,13 @@ if(file_exists('view/theme/redbasic/css/style.css')) { $x = file_get_contents('view/theme/redbasic/css/style.css'); - // left aside is 231px + converse width - $main_width = (231 + intval($converse_width)); + $aside_width = 231; + + // left aside and right aside are is 231px + converse width + $main_width = (($aside_width * 2) + intval($converse_width)); // prevent main_width smaller than 768px - $main_width = (($main_width < 768) ? 768 : $main_width) . 'px'; + $main_width = (($main_width < 768) ? 768 : $main_width); $options = array ( '$nav_bg' => $nav_bg, @@ -191,6 +193,7 @@ if(file_exists('view/theme/redbasic/css/style.css')) { '$pmenu_reply' => $pmenu_reply, '$comment_indent' => $comment_indent, '$main_width' => $main_width, + '$aside_width' => $aside_width ); echo str_replace(array_keys($options), array_values($options), $x); -- cgit v1.2.3