aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme/redbasic/php/style.php
diff options
context:
space:
mode:
authorsasiflo <redmatrixdev@sasiflo.de>2014-04-09 23:13:25 +0200
committersasiflo <redmatrixdev@sasiflo.de>2014-04-09 23:13:25 +0200
commit036d907a4bfdbf5d58de786bea7109f52bf4a709 (patch)
treeaa9d8ed0aca33935732c3ee6b6c734a8ea56e05f /view/theme/redbasic/php/style.php
parentc7080edb1667c7f7d4f79f38d9bbc75fa11ac5c0 (diff)
downloadvolse-hubzilla-036d907a4bfdbf5d58de786bea7109f52bf4a709.tar.gz
volse-hubzilla-036d907a4bfdbf5d58de786bea7109f52bf4a709.tar.bz2
volse-hubzilla-036d907a4bfdbf5d58de786bea7109f52bf4a709.zip
Extended theme redbasic: Allow to center the content (aside + converse)
Added an option to settings of redbasic theme. You are now able to activate centering the left aside and the conversion regions in the middle of the screen. This respects configuration of conversion region width and works without special actions for mobile devices. TODO: Find a way to handle conversion width given in percent.
Diffstat (limited to 'view/theme/redbasic/php/style.php')
-rw-r--r--view/theme/redbasic/php/style.php37
1 files changed, 23 insertions, 14 deletions
diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php
index c3153a025..49852036b 100644
--- a/view/theme/redbasic/php/style.php
+++ b/view/theme/redbasic/php/style.php
@@ -18,20 +18,21 @@ if(! $a->install) {
$nav_active_icon_colour = get_pconfig($uid, "redbasic", "nav_active_icon_colour");
$narrow_navbar = get_pconfig($uid,'redbasic','narrow_navbar');
$banner_colour = get_pconfig($uid,'redbasic','banner_colour');
- $link_colour = get_pconfig($uid, "redbasic", "link_colour");
+ $link_colour = get_pconfig($uid, "redbasic", "link_colour");
$schema = get_pconfig($uid,'redbasic','schema');
- $bgcolour = get_pconfig($uid, "redbasic", "background_colour");
- $background_image = get_pconfig($uid, "redbasic", "background_image");
+ $bgcolour = get_pconfig($uid, "redbasic", "background_colour");
+ $background_image = get_pconfig($uid, "redbasic", "background_image");
$toolicon_colour = get_pconfig($uid,'redbasic','toolicon_colour');
$toolicon_activecolour = get_pconfig($uid,'redbasic','toolicon_activecolour');
- $item_colour = get_pconfig($uid, "redbasic", "item_colour");
- $item_opacity = get_pconfig($uid, "redbasic", "item_opacity");
- $body_font_size = get_pconfig($uid, "redbasic", "body_font_size");
- $font_size = get_pconfig($uid, "redbasic", "font_size");
- $font_colour = get_pconfig($uid, "redbasic", "font_colour");
- $radius = get_pconfig($uid, "redbasic", "radius");
- $shadow = get_pconfig($uid,"redbasic","photo_shadow");
- $converse_width=get_pconfig($uid,"redbasic","converse_width");
+ $item_colour = get_pconfig($uid, "redbasic", "item_colour");
+ $item_opacity = get_pconfig($uid, "redbasic", "item_opacity");
+ $body_font_size = get_pconfig($uid, "redbasic", "body_font_size");
+ $font_size = get_pconfig($uid, "redbasic", "font_size");
+ $font_colour = get_pconfig($uid, "redbasic", "font_colour");
+ $radius = get_pconfig($uid, "redbasic", "radius");
+ $shadow = get_pconfig($uid,"redbasic","photo_shadow");
+ $converse_width=get_pconfig($uid,"redbasic","converse_width");
+ $converse_center=get_pconfig($uid,"redbasic","converse_center");
$nav_min_opacity=get_pconfig($uid,'redbasic','nav_min_opacity');
$sloppy_photos=get_pconfig($uid,'redbasic','sloppy_photos');
$top_photo=get_pconfig($uid,'redbasic','top_photo');
@@ -116,8 +117,9 @@ if(! $a->install) {
$shadow = "0";
if(! $active_colour)
$active_colour = '#FFFFFF';
- if (! $converse_width)
- $converse_width="1024px";
+ if (! $converse_width) {
+ $converse_width="1024px";
+ }
if(! $top_photo)
$top_photo = '48px';
$pmenu_top = intval($top_photo) - 16 . 'px';
@@ -141,6 +143,8 @@ if(! $a->install) {
if(file_exists('view/theme/redbasic/css/style.css')) {
$x = file_get_contents('view/theme/redbasic/css/style.css');
+$body_width = (231 + $converse_width) . 'px'; // aside is 231px + converse width; have to find a way for calculation with 'px', cannot handle '%'
+
$options = array (
'$nav_bg' => $nav_bg,
'$nav_gradient_top' => $nav_gradient_top,
@@ -173,7 +177,8 @@ $options = array (
'$pmenu_top' => $pmenu_top,
'$pmenu_reply' => $pmenu_reply,
'$wwtop' => $wwtop,
-'$comment_indent' => $comment_indent
+'$comment_indent' => $comment_indent,
+'$body_width' => $body_width
);
echo str_replace(array_keys($options), array_values($options), $x);
@@ -185,3 +190,7 @@ if($sloppy_photos && file_exists('view/theme/redbasic/css/sloppy_photos.css')) {
if($narrow_navbar && file_exists('view/theme/redbasic/css/narrow_navbar.css')) {
echo file_get_contents('view/theme/redbasic/css/narrow_navbar.css');
}
+if($converse_center && file_exists('view/theme/redbasic/css/converse_center.css')) {
+ $x = file_get_contents('view/theme/redbasic/css/converse_center.css');
+ echo str_replace(array_keys($options), array_values($options), $x);
+}