aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme/redbasic/php
diff options
context:
space:
mode:
Diffstat (limited to 'view/theme/redbasic/php')
-rw-r--r--view/theme/redbasic/php/config.php12
-rw-r--r--view/theme/redbasic/php/style.php25
-rw-r--r--view/theme/redbasic/php/theme.php8
3 files changed, 25 insertions, 20 deletions
diff --git a/view/theme/redbasic/php/config.php b/view/theme/redbasic/php/config.php
index 0a779529d..0de475fe5 100644
--- a/view/theme/redbasic/php/config.php
+++ b/view/theme/redbasic/php/config.php
@@ -32,7 +32,7 @@ class RedbasicConfig {
}
function get() {
- if(! local_channel()) {
+ if(! local_channel()) {
return;
}
@@ -59,7 +59,7 @@ class RedbasicConfig {
}
function post() {
- if(!local_channel()) {
+ if(!local_channel()) {
return;
}
@@ -89,7 +89,7 @@ class RedbasicConfig {
if(get_pconfig(local_channel(), 'redbasic', 'advanced_theming'))
$expert = 1;
-
+
$o .= replace_macros(get_markup_template('theme_settings.tpl'), array(
'$submit' => t('Submit'),
'$baseurl' => z_root(),
@@ -98,19 +98,19 @@ class RedbasicConfig {
'$title' => t("Theme settings"),
'$narrow_navbar' => array('redbasic_narrow_navbar',t('Narrow navbar'),$arr['narrow_navbar'], '', array(t('No'),t('Yes'))),
'$nav_bg' => array('redbasic_nav_bg', t('Navigation bar background color'), $arr['nav_bg']),
- '$nav_icon_colour' => array('redbasic_nav_icon_colour', t('Navigation bar icon color '), $arr['nav_icon_colour']),
+ '$nav_icon_colour' => array('redbasic_nav_icon_colour', t('Navigation bar icon color '), $arr['nav_icon_colour']),
'$nav_active_icon_colour' => array('redbasic_nav_active_icon_colour', t('Navigation bar active icon color '), $arr['nav_active_icon_colour']),
'$link_colour' => array('redbasic_link_colour', t('Link color'), $arr['link_colour'], '', $link_colours),
'$banner_colour' => array('redbasic_banner_colour', t('Set font-color for banner'), $arr['banner_colour']),
'$bgcolour' => array('redbasic_background_colour', t('Set the background color'), $arr['bgcolour']),
- '$background_image' => array('redbasic_background_image', t('Set the background image'), $arr['background_image']),
+ '$background_image' => array('redbasic_background_image', t('Set the background image'), $arr['background_image']),
'$item_colour' => array('redbasic_item_colour', t('Set the background color of items'), $arr['item_colour']),
'$comment_item_colour' => array('redbasic_comment_item_colour', t('Set the background color of comments'), $arr['comment_item_colour']),
'$font_size' => array('redbasic_font_size', t('Set font-size for the entire application'), $arr['font_size'], t('Examples: 1rem, 100%, 16px')),
'$font_colour' => array('redbasic_font_colour', t('Set font-color for posts and comments'), $arr['font_colour']),
'$radius' => array('redbasic_radius', t('Set radius of corners'), $arr['radius'], t('Example: 4px')),
'$shadow' => array('redbasic_shadow', t('Set shadow depth of photos'), $arr['shadow']),
- '$converse_width' => array('redbasic_converse_width',t('Set maximum width of content region in pixel'),$arr['converse_width'], t('Leave empty for default width')),
+ '$converse_width' => array('redbasic_converse_width',t('Set maximum width of content region in rem'),$arr['converse_width'], t('Leave empty for default width')),
'$top_photo' => array('redbasic_top_photo', t('Set size of conversation author photo'), $arr['top_photo']),
'$reply_photo' => array('redbasic_reply_photo', t('Set size of followup author photos'), $arr['reply_photo']),
'$advanced_theming' => ['redbasic_advanced_theming', t('Show advanced settings'), $arr['advanced_theming'], '', [t('No'), t('Yes')]]
diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php
index d278aa309..3dbc29a96 100644
--- a/view/theme/redbasic/php/style.php
+++ b/view/theme/redbasic/php/style.php
@@ -36,9 +36,8 @@ if(! App::$install) {
// not --- like the mobile theme does instead.
// Allow layouts to over-ride the schema
-
-if($_REQUEST['schema']) {
- $schema = $_REQUEST['schema'];
+if (isset($_REQUEST['schema']) && preg_match('/^[\w_-]+$/i', $_REQUEST['schema'])) {
+ $schema = $_REQUEST['schema'];
}
if (($schema) && ($schema != '---')) {
@@ -69,17 +68,17 @@ if ((!$schema) || ($schema == '---')) {
}
}
-
+
//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_bg)
$nav_bg = '#343a40';
if (! $nav_icon_colour)
- $nav_icon_colour = 'rgba(255, 255, 255, 0.5)';
+ $nav_icon_colour = 'rgba(255, 255, 255, 0.55)';
if (! $nav_active_icon_colour)
$nav_active_icon_colour = 'rgba(255, 255, 255, 0.75)';
if (! $link_colour)
- $link_colour = '#007bff';
+ $link_colour = '#0d6efd';
if (! $banner_colour)
$banner_colour = '#fff';
if (! $bgcolour)
@@ -101,7 +100,7 @@ if (! $radius)
if (! $shadow)
$shadow = '0';
if (! $converse_width)
- $converse_width = '790';
+ $converse_width = '52'; //unit: rem
if(! $top_photo)
$top_photo = '2.3rem';
if(! $reply_photo)
@@ -112,6 +111,10 @@ if(file_exists('view/theme/redbasic/css/style.css')) {
$x = file_get_contents('view/theme/redbasic/css/style.css');
+ if($schema === 'dark' && file_exists('view/theme/redbasic/schema/bootstrap-nightfall.css')) {
+ $x .= file_get_contents('view/theme/redbasic/schema/bootstrap-nightfall.css');
+ }
+
if($narrow_navbar && file_exists('view/theme/redbasic/css/narrow_navbar.css')) {
$x .= file_get_contents('view/theme/redbasic/css/narrow_navbar.css');
}
@@ -120,13 +123,13 @@ if(file_exists('view/theme/redbasic/css/style.css')) {
$x .= $schemecss;
}
- $left_aside_width = 288;
- $right_aside_width = 288;
+ $left_aside_width = 21; //unit: rem
+ $right_aside_width = 21; //unit: rem
$main_width = $left_aside_width + $right_aside_width + intval($converse_width);
// prevent main_width smaller than 768px
- $main_width = (($main_width < 768) ? 768 : $main_width);
+ $main_width = (($main_width < 30) ? 30 : $main_width);
$options = array (
'$nav_bg' => $nav_bg,
@@ -158,7 +161,7 @@ if(file_exists('view/theme/redbasic/css/style.css')) {
}
-// Set the schema to the default schema in derived themes. See the documentation for creating derived themes how to override this.
+// Set the schema to the default schema in derived themes. See the documentation for creating derived themes how to override this.
if(local_channel() && App::$channel && App::$channel['channel_theme'] != 'redbasic')
set_pconfig(local_channel(), 'redbasic', 'schema', '---');
diff --git a/view/theme/redbasic/php/theme.php b/view/theme/redbasic/php/theme.php
index 2b90ae85f..783bd9d4e 100644
--- a/view/theme/redbasic/php/theme.php
+++ b/view/theme/redbasic/php/theme.php
@@ -3,12 +3,14 @@
/**
* * Name: Redbasic
* * Description: Hubzilla standard theme
- * * Version: 2.1
- * * MinVersion: 2.3.1
- * * MaxVersion: 6.0
+ * * Version: 2.2
+ * * MinVersion: 6.5.13
+ * * MaxVersion: 8.0
* * Author: Fabrixxm
* * Maintainer: Mike Macgirvin
* * Maintainer: Mario Vavti
+ * * Theme_Color: #343a40
+ * * Background_Color: rgb(254,254,254)
*/
function redbasic_init(&$a) {