aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-11-05 16:21:38 -0800
committerfriendica <info@friendica.com>2013-11-05 16:21:38 -0800
commitf4cb145f3c248aab9188900baebaa5659fa4e343 (patch)
tree57f794db998dea570b76e585be41b70975941422
parentb15c9de1e50437065fbdd1ac7e487687a4feda8d (diff)
downloadvolse-hubzilla-f4cb145f3c248aab9188900baebaa5659fa4e343.tar.gz
volse-hubzilla-f4cb145f3c248aab9188900baebaa5659fa4e343.tar.bz2
volse-hubzilla-f4cb145f3c248aab9188900baebaa5659fa4e343.zip
redbasic - allow changing icon colours
-rw-r--r--view/theme/redbasic/css/style.css17
-rw-r--r--view/theme/redbasic/php/config.php81
-rw-r--r--view/theme/redbasic/php/style.php8
-rw-r--r--view/theme/redbasic/tpl/theme_settings.tpl2
-rwxr-xr-xview/tpl/conv_item.tpl2
5 files changed, 66 insertions, 44 deletions
diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css
index a19630292..32d33ad70 100644
--- a/view/theme/redbasic/css/style.css
+++ b/view/theme/redbasic/css/style.css
@@ -930,7 +930,8 @@ footer {
font-size: 1.4em;
left: 105px;
position: absolute;
- top: 1px;
+ top: 1px;
+ color: $toolicon_colour;
}
.comment .wall-item-lock {
left: 65px;
@@ -958,17 +959,21 @@ footer {
margin-right: 8px;
font-size: 1.2em;
cursor: pointer;
- color: #777;
+ color: $toolicon_colour;
}
.item-tool:hover {
- color: #000;
+ color: $toolicon_activecolour;
+}
+
+.drop-icons.item-tool {
+ color: $toolicon_colour;
}
.like-rotator {
float: left;
margin: 8px;
- color: #777;
+ color: $toolicon_colour;
}
.wall-item-delete-wrapper {
@@ -3390,12 +3395,12 @@ margin-right: 50px;
.comment-icon,
.jot-icons {
font-size: 1.2em;
- color: #777;
+ color: $toolicon_colour;
}
.comment-icon:hover,
.jot-icons:hover {
- color: #000;
+ color: $toolicon_activecolour;
}
.nav-icon {
diff --git a/view/theme/redbasic/php/config.php b/view/theme/redbasic/php/config.php
index fa441e15e..eb583d9bf 100644
--- a/view/theme/redbasic/php/config.php
+++ b/view/theme/redbasic/php/config.php
@@ -3,22 +3,25 @@
function theme_content(&$a) {
if(!local_user()) { return;}
- $schema = get_pconfig(local_user(),'redbasic', 'schema' );
- $nav_colour = get_pconfig(local_user(),'redbasic', 'nav_colour' );
- $banner_colour = get_pconfig(local_user(),'redbasic', 'banner_colour' );
- $bgcolour = get_pconfig(local_user(),'redbasic', 'background_colour' );
- $background_image = get_pconfig(local_user(),'redbasic', 'background_image' );
- $item_colour = get_pconfig(local_user(),'redbasic', 'item_colour' );
- $item_opacity = get_pconfig(local_user(),'redbasic', 'item_opacity' );
- $font_size = get_pconfig(local_user(),'redbasic', 'font_size' );
- $font_colour = get_pconfig(local_user(),'redbasic', 'font_colour' );
- $radius = get_pconfig(local_user(),'redbasic', 'radius' );
- $shadow = get_pconfig(local_user(),'redbasic', 'photo_shadow' );
- $section_width=get_pconfig(local_user(),"redbasic","section_width");
- $nav_min_opacity=get_pconfig(local_user(),"redbasic","nav_min_opacity");
- $sloppy_photos=get_pconfig(local_user(),"redbasic","sloppy_photos");
- return redbasic_form($a, $schema, $nav_colour, $banner_colour, $bgcolour, $background_image, $item_colour, $item_opacity,
- $font_size, $font_colour, $radius, $shadow, $section_width,$nav_min_opacity,$sloppy_photos);
+ $arr = array();
+
+ $arr['schema'] = get_pconfig(local_user(),'redbasic', 'schema' );
+ $arr['nav_colour'] = get_pconfig(local_user(),'redbasic', 'nav_colour' );
+ $arr['banner_colour'] = get_pconfig(local_user(),'redbasic', 'banner_colour' );
+ $arr['bgcolour'] = get_pconfig(local_user(),'redbasic', 'background_colour' );
+ $arr['background_image'] = get_pconfig(local_user(),'redbasic', 'background_image' );
+ $arr['item_colour'] = get_pconfig(local_user(),'redbasic', 'item_colour' );
+ $arr['item_opacity'] = get_pconfig(local_user(),'redbasic', 'item_opacity' );
+ $arr['toolicon_colour'] = get_pconfig(local_user(),'redbasic','toolicon_colour');
+ $arr['toolicon_activecolour'] = get_pconfig(local_user(),'redbasic','toolicon_activecolour');
+ $arr['font_size'] = get_pconfig(local_user(),'redbasic', 'font_size' );
+ $arr['font_colour'] = get_pconfig(local_user(),'redbasic', 'font_colour' );
+ $arr['radius'] = get_pconfig(local_user(),'redbasic', 'radius' );
+ $arr['shadow'] = get_pconfig(local_user(),'redbasic', 'photo_shadow' );
+ $arr['section_width']=get_pconfig(local_user(),"redbasic","section_width");
+ $arr['nav_min_opacity']=get_pconfig(local_user(),"redbasic","nav_min_opacity");
+ $arr['sloppy_photos']=get_pconfig(local_user(),"redbasic","sloppy_photos");
+ return redbasic_form($a, $arr);
}
function theme_post(&$a) {
@@ -32,6 +35,8 @@ function theme_post(&$a) {
set_pconfig(local_user(), 'redbasic', 'background_image', $_POST['redbasic_background_image']);
set_pconfig(local_user(), 'redbasic', 'item_colour', $_POST['redbasic_item_colour']);
set_pconfig(local_user(), 'redbasic', 'item_opacity', $_POST['redbasic_item_opacity']);
+ set_pconfig(local_user(), 'redbasic', 'toolicon_colour', $_POST['redbasic_toolicon_colour']);
+ set_pconfig(local_user(), 'redbasic', 'toolicon_activecolour', $_POST['redbasic_toolicon_activecolour']);
set_pconfig(local_user(), 'redbasic', 'font_size', $_POST['redbasic_font_size']);
set_pconfig(local_user(), 'redbasic', 'font_colour', $_POST['redbasic_font_colour']);
set_pconfig(local_user(), 'redbasic', 'radius', $_POST['redbasic_radius']);
@@ -42,10 +47,10 @@ function theme_post(&$a) {
}
}
-// FIXME - this really should be an array
-function redbasic_form(&$a, $schema, $nav_colour, $banner_colour, $bgcolour, $background_image, $item_colour, $item_opacity,
- $font_size, $font_colour, $radius, $shadow, $section_width,$nav_min_opacity,$sloppy_photos) {
+
+function redbasic_form(&$a, $arr) {
+
$scheme_choices = array();
$scheme_choices["---"] = t("Default");
@@ -60,10 +65,10 @@ function redbasic_form(&$a, $schema, $nav_colour, $banner_colour, $bgcolour, $ba
$nav_colours = array (
- '' => 'Scheme Default',
- 'red' => 'red',
- 'black' => 'black',
- 'silver' => 'silver',
+ '' => t('Scheme Default'),
+ 'red' => t('red'),
+ 'black' => t('black'),
+ 'silver' => t('silver'),
);
if(feature_enabled(local_user(),'expert'))
@@ -75,20 +80,22 @@ if(feature_enabled(local_user(),'expert'))
'$baseurl' => $a->get_baseurl(),
'$expert' => $expert,
'$title' => t("Theme settings"),
- '$schema' => array('redbasic_schema', t('Set scheme'), $schema, '', $scheme_choices),
- '$nav_colour' => array('redbasic_nav_colour', t('Navigation bar colour'), $nav_colour, '', $nav_colours),
- '$banner_colour' => array('redbasic_banner_colour', t('Set font-colour for banner'), $banner_colour),
- '$bgcolour' => array('redbasic_background_colour', t('Set the background colour'), $bgcolour),
- '$background_image' => array('redbasic_background_image', t('Set the background image'), $background_image),
- '$item_colour' => array('redbasic_item_colour', t('Set the background colour of items'), $item_colour),
- '$item_opacity' => array('redbasic_item_opacity', t('Set the opacity of items'), $item_opacity),
- '$font_size' => array('redbasic_font_size', t('Set font-size for posts and comments'), $font_size),
- '$font_colour' => array('redbasic_font_colour', t('Set font-colour for posts and comments'), $font_colour),
- '$radius' => array('redbasic_radius', t('Set radius of corners'), $radius),
- '$shadow' => array('redbasic_shadow', t('Set shadow depth of photos'), $shadow),
- '$section_width' => array('redbasic_section_width',t('Set width of main section'),$section_width),
- '$nav_min_opacity' => array('redbasic_nav_min_opacity',t('Set minimum opacity of nav bar - to hide it'),$nav_min_opacity),
- '$sloppy_photos' => array('redbasic_sloppy_photos',t('Sloppy photo albums'),$sloppy_photos,t('Are you a clean desk or a messy desk person?')),
+ '$schema' => array('redbasic_schema', t('Set scheme'), $arr['schema'], '', $scheme_choices),
+ '$nav_colour' => array('redbasic_nav_colour', t('Navigation bar colour'), $arr['nav_colour'], '', $nav_colours),
+ '$banner_colour' => array('redbasic_banner_colour', t('Set font-colour for banner'), $arr['banner_colour']),
+ '$bgcolour' => array('redbasic_background_colour', t('Set the background colour'), $arr['bgcolour']),
+ '$background_image' => array('redbasic_background_image', t('Set the background image'), $arr['background_image']),
+ '$item_colour' => array('redbasic_item_colour', t('Set the background colour of items'), $arr['item_colour']),
+ '$item_opacity' => array('redbasic_item_opacity', t('Set the opacity of items'), $arr['item_opacity']),
+ '$toolicon_colour' => array('redbasic_toolicon_colour',t('Set the basic colour for item icons'),$arr['toolicon_colour']),
+ '$toolicon_activecolour' => array('redbasic_toolicon_activecolour',t('Set the hover colour for item icons'),$arr['toolicon_activecolour']),
+ '$font_size' => array('redbasic_font_size', t('Set font-size for posts and comments'), $arr['font_size']),
+ '$font_colour' => array('redbasic_font_colour', t('Set font-colour for posts and comments'), $arr['font_colour']),
+ '$radius' => array('redbasic_radius', t('Set radius of corners'), $arr['radius']),
+ '$shadow' => array('redbasic_shadow', t('Set shadow depth of photos'), $arr['shadow']),
+ '$section_width' => array('redbasic_section_width',t('Set width of main section'),$arr['section_width']),
+ '$nav_min_opacity' => array('redbasic_nav_min_opacity',t('Set minimum opacity of nav bar - to hide it'),$arr['nav_min_opacity']),
+ '$sloppy_photos' => array('redbasic_sloppy_photos',t('Sloppy photo albums'),$arr['sloppy_photos'],t('Are you a clean desk or a messy desk person?')),
));
return $o;
diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php
index 426453cb7..6a1b9c65e 100644
--- a/view/theme/redbasic/php/style.php
+++ b/view/theme/redbasic/php/style.php
@@ -16,6 +16,8 @@
$schema = get_pconfig($uid,'redbasic','schema');
$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");
$font_size = get_pconfig($uid, "redbasic", "font_size");
@@ -63,6 +65,10 @@
$background_image ='';
if (! $item_colour)
$item_colour = "#f8f8f8";
+ if (! $toolicon_colour)
+ $toolicon_colour = '#777777';
+ if (! $toolicon_activecolour)
+ $toolicon_activecolour = '#000';
if (! $item_opacity)
$item_opacity = "1";
if (! $font_size)
@@ -125,6 +131,8 @@ $options = array (
'$background_image' => $background_image,
'$item_colour' => $item_colour,
'$item_opacity' => $item_opacity,
+'$toolicon_colour' => $toolicon_colour,
+'$toolicon_activecolour' => $toolicon_activecolour,
'$font_size' => $font_size,
'$font_colour' => $font_colour,
'$radius' => $radius,
diff --git a/view/theme/redbasic/tpl/theme_settings.tpl b/view/theme/redbasic/tpl/theme_settings.tpl
index 48b9c07c3..237637770 100644
--- a/view/theme/redbasic/tpl/theme_settings.tpl
+++ b/view/theme/redbasic/tpl/theme_settings.tpl
@@ -10,6 +10,8 @@
{{include file="field_input.tpl" field=$background_image}}
{{include file="field_input.tpl" field=$item_colour}}
{{include file="field_input.tpl" field=$item_opacity}}
+{{include file="field_input.tpl" field=$toolicon_colour}}
+{{include file="field_input.tpl" field=$toolicon_activecolour}}
{{include file="field_input.tpl" field=$font_size}}
{{include file="field_input.tpl" field=$font_colour}}
{{include file="field_input.tpl" field=$radius}}
diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl
index 6927eb9e4..781746b4b 100755
--- a/view/tpl/conv_item.tpl
+++ b/view/tpl/conv_item.tpl
@@ -89,7 +89,7 @@
<div id="like-rotator-{{$item.id}}" class="like-rotator"></div>
<div class="wall-item-delete-wrapper" id="wall-item-delete-wrapper-{{$item.id}}" >
- {{if $item.drop.dropping}}<a href="item/drop/{{$item.id}}" onclick="return confirmDelete();" title="{{$item.drop.delete}}" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ><i class="icon-remove drop-icons"></i></a>{{/if}}
+ {{if $item.drop.dropping}}<a href="item/drop/{{$item.id}}" onclick="return confirmDelete();" title="{{$item.drop.delete}}" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ><i class="icon-remove drop-icons item-tool"></i></a>{{/if}}
</div>
{{if $item.drop.pagedrop}}<input type="checkbox" onclick="checkboxhighlight(this);" title="{{$item.drop.select}}" class="item-select" name="itemselected[]" value="{{$item.id}}" />{{/if}}
<div class="wall-item-delete-end"></div>