From 102521844b3d6f31d0d801b0d0c89241c2c621af Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 27 Feb 2014 20:48:10 -0800 Subject: put schemas in Comanche (this requires theme support (!)) --- view/theme/redbasic/php/style.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'view/theme/redbasic/php/style.php') diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php index 901d06af7..01e81eb53 100644 --- a/view/theme/redbasic/php/style.php +++ b/view/theme/redbasic/php/style.php @@ -37,10 +37,16 @@ if(! $a->install) { } -// Now load the scheme. If a value is changed above, we'll keep the settings -// If not, we'll keep those defined by the schema -// Setting $scheme to '' wasn't working for some reason, so we'll check it's -// not --- like the mobile theme does instead. + // Now load the scheme. If a value is changed above, we'll keep the settings + // If not, we'll keep those defined by the schema + // Setting $schema to '' wasn't working for some reason, so we'll check it's + // not --- like the mobile theme does instead. + + + // Allow layouts to over-ride the schema + + if($_REQUEST['schema']) + $schema = $_REQUEST['schema']; if (($schema) && ($schema != '---')) { // Check it exists, because this setting gets distributed to clones -- cgit v1.2.3 From 57cc77f6d595a003aa0702995439716cf12005b8 Mon Sep 17 00:00:00 2001 From: marijus Date: Sun, 2 Mar 2014 22:50:53 +0100 Subject: make navbar themable again --- view/theme/redbasic/php/style.php | 104 ++++++++++++-------------------------- 1 file changed, 32 insertions(+), 72 deletions(-) (limited to 'view/theme/redbasic/php/style.php') diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php index 01e81eb53..9e6adb2a4 100644 --- a/view/theme/redbasic/php/style.php +++ b/view/theme/redbasic/php/style.php @@ -7,13 +7,15 @@ if(! $a->install) { if($uid) load_pconfig($uid,'redbasic'); -// Nav colours are mess. Set $nav_colour as a single word for the sake of letting folk pick one -// but it actually consists of at least two colours to form a gradient - $nav_bg_1 and $nav_bg_2 -// A further two - $nav_bg_3 and $nav_bg_4 are used to create the hover, if any particular scheme -// wants to implement that - $nav_colour = get_pconfig($uid, "redbasic", "nav_colour"); - // Load the owners pconfig + $nav_bg = get_pconfig($uid, "redbasic", "nav_bg"); + $nav_gradient_top = get_pconfig($uid, "redbasic", "nav_gradient_top"); + $nav_gradient_bottom = get_pconfig($uid, "redbasic", "nav_gradient_bottom"); + $nav_active_gradient_top = get_pconfig($uid, "redbasic", "nav_active_gradient_top"); + $nav_active_gradient_bottom = get_pconfig($uid, "redbasic", "nav_active_gradient_bottom"); + $nav_bd = get_pconfig($uid, "redbasic", "nav_bd"); + $nav_icon_colour = get_pconfig($uid, "redbasic", "nav_icon_colour"); + $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"); @@ -68,13 +70,22 @@ if(! $a->install) { //Set some defaults - we have to do this after pulling owner settings, and we have to check for each setting //individually. If we don't, we'll have problems if a user has set one, but not all options. - if (! $nav_colour) { - $nav_colour = "red"; - $nav_bg_1 = "#f88"; - $nav_bg_2 = "#b00"; - $nav_bg_3 = "#f00"; - $nav_bg_4 = "#b00"; - } + if (! $nav_bg) + $nav_bg = "#222"; + if (! $nav_gradient_top) + $nav_gradient_top = "#3c3c3c"; + if (! $nav_gradient_bottom) + $nav_gradient_bottom = "#222"; + if (! $nav_active_gradient_top) + $nav_active_gradient_top = "#222"; + if (! $nav_active_gradient_bottom) + $nav_active_gradient_bottom = "#282828"; + if (! $nav_bd) + $nav_bd = "#080808"; + if (! $nav_icon_colour) + $nav_icon_colour = "#999"; + if (! $nav_active_icon_colour) + $nav_active_icon_colour = "#fff"; if (! $link_colour) $link_colour = "#0080FF"; if (! $banner_colour) @@ -123,70 +134,20 @@ if(! $a->install) { $nav_float_min_opacity = (float) $nav_min_opacity; $nav_percent_min_opacity = (int) 100 * $nav_min_opacity; } - - -// Nav colours have nested values, so we have to define the actual variables -// used in the CSS from the higher level "red", "black", etc here - if ($nav_colour == "red") { - $nav_bg_1 = $nav_bg_3 = "#ba002f"; - $nav_bg_2 = $nav_bg_4 = "#ad002c"; - $search_background = "#EEEEEE"; - $active_colour = '#444444'; - } - - if ($nav_colour == "black") { - $nav_bg_1 = $nav_bg_3 = "#000"; - $nav_bg_2 = $nav_bg_4 = "#222"; - $search_background = '#EEEEEE'; - $active_colour = '#AAAAAA'; - } - if ($nav_colour == "silver") { - $nav_bg_1 = $nav_bg_2 = $nav_bg_3 = $nav_bg_4 = "silver"; - $search_background = '#EEEEEE'; - } - if($nav_colour === "pink") { - $nav_bg_1 = $nav_bg_3 = "#FFC1CA"; - $nav_bg_2 = $nav_bg_4 = "#FFC1CA"; - } - if($nav_colour === "green") { - $nav_bg_1 = $nav_bg_3 = "#5CD65C"; - $nav_bg_2 = $nav_bg_4 = "#5CD65C"; - } - if($nav_colour === "blue") { - $nav_bg_1 = $nav_bg_3 = "#1872a2"; - $nav_bg_2 = $nav_bg_4 = "#1872a2"; - } - if($nav_colour === "purple") { - $nav_bg_1 = $nav_bg_3 = "#551A8B"; - $nav_bg_2 = $nav_bg_4 = "#551A8B"; - } - if($nav_colour === "orange") { - $nav_bg_1 = $nav_bg_3 = "#FF3D0D"; - $nav_bg_2 = $nav_bg_4 = "#FF3D0D"; - } - if($nav_colour === "brown") { - $nav_bg_1 = $nav_bg_3 = "#330000"; - $nav_bg_2 = $nav_bg_4 = "#330000"; - } - if($nav_colour === "grey") { - $nav_bg_1 = $nav_bg_3 = "#2e2f2e"; - $nav_bg_2 = $nav_bg_4 = "#2e2f2e"; - } - if($nav_colour === "gold") { - $nav_bg_1 = $nav_bg_3 = "#FFAA00"; - $nav_bg_2 = $nav_bg_4 = "#FFAA00"; - } - // Apply the settings if(file_exists('view/theme/redbasic/css/style.css')) { $x = file_get_contents('view/theme/redbasic/css/style.css'); $options = array ( -'$nav_bg_1' => $nav_bg_1, -'$nav_bg_2' => $nav_bg_2, -'$nav_bg_3' => $nav_bg_3, -'$nav_bg_4' => $nav_bg_4, +'$nav_bg' => $nav_bg, +'$nav_gradient_top' => $nav_gradient_top, +'$nav_gradient_bottom' => $nav_gradient_bottom, +'$nav_active_gradient_top' => $nav_active_gradient_top, +'$nav_active_gradient_bottom' => $nav_active_gradient_bottom, +'$nav_bd' => $nav_bd, +'$nav_icon_colour' => $nav_icon_colour, +'$nav_active_icon_colour' => $nav_active_icon_colour, '$link_colour' => $link_colour, '$banner_colour' => $banner_colour, '$search_background' => $search_background, @@ -214,7 +175,6 @@ $options = array ( ); echo str_replace(array_keys($options), array_values($options), $x); - } if($sloppy_photos && file_exists('view/theme/redbasic/css/sloppy_photos.css')) { -- cgit v1.2.3 From 239550b0c96e5204be4ef4c5f6130e0278ae50b7 Mon Sep 17 00:00:00 2001 From: marijus Date: Mon, 3 Mar 2014 19:48:16 +0100 Subject: one got lost and a typo --- view/theme/redbasic/php/style.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'view/theme/redbasic/php/style.php') diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php index 9e6adb2a4..4bb852a40 100644 --- a/view/theme/redbasic/php/style.php +++ b/view/theme/redbasic/php/style.php @@ -89,7 +89,9 @@ if(! $a->install) { if (! $link_colour) $link_colour = "#0080FF"; if (! $banner_colour) - $banner_colour = "fff"; + $banner_colour = "#fff"; + if (! $search_background) + $search_background = "#eee"; if (! $bgcolour) $bgcolour = "#fdfdfd"; if (! $background_image) -- cgit v1.2.3 From 56c84ba2676b474f55f73881fc0a1a56a284a29f Mon Sep 17 00:00:00 2001 From: marijus Date: Sat, 8 Mar 2014 11:24:53 +0100 Subject: style fixes --- view/theme/redbasic/php/style.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'view/theme/redbasic/php/style.php') diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php index 4bb852a40..8fb4de381 100644 --- a/view/theme/redbasic/php/style.php +++ b/view/theme/redbasic/php/style.php @@ -81,7 +81,7 @@ if(! $a->install) { if (! $nav_active_gradient_bottom) $nav_active_gradient_bottom = "#282828"; if (! $nav_bd) - $nav_bd = "#080808"; + $nav_bd = "#222"; if (! $nav_icon_colour) $nav_icon_colour = "#999"; if (! $nav_active_icon_colour) -- cgit v1.2.3 From 34fd387438f5f3d06b0a1c26d5c7ca5c1f5bd270 Mon Sep 17 00:00:00 2001 From: marijus Date: Mon, 10 Mar 2014 17:17:49 +0100 Subject: this commit is an attempt to make conv items better scalable on smaller screens. also save some horizontal space. --- view/theme/redbasic/php/style.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'view/theme/redbasic/php/style.php') diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php index 8fb4de381..c3153a025 100644 --- a/view/theme/redbasic/php/style.php +++ b/view/theme/redbasic/php/style.php @@ -119,7 +119,7 @@ if(! $a->install) { if (! $converse_width) $converse_width="1024px"; if(! $top_photo) - $top_photo = '64px'; + $top_photo = '48px'; $pmenu_top = intval($top_photo) - 16 . 'px'; $wwtop = intval($top_photo) - 15 . 'px'; $comment_indent = intval($top_photo) + 10 . 'px'; -- cgit v1.2.3