aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
Diffstat (limited to 'view')
-rw-r--r--view/theme/redbasic/css/style.css28
-rw-r--r--view/theme/redbasic/php/config.php9
-rw-r--r--view/theme/redbasic/php/style.php16
-rw-r--r--view/theme/redbasic/tpl/theme_settings.tpl1
4 files changed, 39 insertions, 15 deletions
diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css
index 669f73f42..ba0aabf8d 100644
--- a/view/theme/redbasic/css/style.css
+++ b/view/theme/redbasic/css/style.css
@@ -118,21 +118,29 @@ blockquote {
filter:alpha(opacity=100);
}
-nav {background-image: linear-gradient(bottom, $nav_bg_1 26%, $nav_bg_2 82%);
- background-image: -o-linear-gradient(bottom, $nav_bg_1 26%, $nav_bg_2 82%);
- background-image: -moz-linear-gradient(bottom,$nav_bg_1 26%, $nav_bg_2 82%);
- background-image: -webkit-linear-gradient(bottom, $nav_bg_1 26%, $nav_bg_2 82%);
- background-image: -ms-linear-gradient(bottom, $nav_bg_1 26%, $nav_bg_2 82%);
+nav {
+ background-image: linear-gradient(bottom, $nav_bg_1 26%, $nav_bg_2 82%);
+ background-image: -o-linear-gradient(bottom, $nav_bg_1 26%, $nav_bg_2 82%);
+ background-image: -moz-linear-gradient(bottom,$nav_bg_1 26%, $nav_bg_2 82%);
+ background-image: -webkit-linear-gradient(bottom, $nav_bg_1 26%, $nav_bg_2 82%);
+ background-image: -ms-linear-gradient(bottom, $nav_bg_1 26%, $nav_bg_2 82%);
+ opacity: $nav_float_min_opacity;
+ filter:alpha(opacity=$nav_percent_min_opacity);
+
}
section {width: $section_width;
}
-nav:hover {background-image: linear-gradient(bottom, $nav_bg_3 26%, $nav_bg_4 82%);
- background-image: -o-linear-gradient(bottom, $nav_bg_3 26%, $nav_bg_4 82%);
- background-image: -moz-linear-gradient(bottom, $nav_bg_3 26%, $nav_bg_4 82%);
- background-image: -webkit-linear-gradient(bottom, $nav_bg_3 26%, $nav_bg_4 82%);
- background-image: -ms-linear-gradient(bottom, $nav_bg_3 26%, $nav_bg_4 82%);
+nav:hover {
+ background-image: linear-gradient(bottom, $nav_bg_3 26%, $nav_bg_4 82%);
+ background-image: -o-linear-gradient(bottom, $nav_bg_3 26%, $nav_bg_4 82%);
+ background-image: -moz-linear-gradient(bottom, $nav_bg_3 26%, $nav_bg_4 82%);
+ background-image: -webkit-linear-gradient(bottom, $nav_bg_3 26%, $nav_bg_4 82%);
+ background-image: -ms-linear-gradient(bottom, $nav_bg_3 26%, $nav_bg_4 82%);
+ opacity: 1.0;
+ filter:alpha(opacity=100);
+
}
diff --git a/view/theme/redbasic/php/config.php b/view/theme/redbasic/php/config.php
index 053940219..dc79b654f 100644
--- a/view/theme/redbasic/php/config.php
+++ b/view/theme/redbasic/php/config.php
@@ -14,8 +14,9 @@ function theme_content(&$a) {
$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");
return redbasic_form($a, $schema, $nav_colour, $bgcolour, $background_image, $item_colour, $item_opacity,
- $font_size, $font_colour, $radius, $shadow, $section_width);
+ $font_size, $font_colour, $radius, $shadow, $section_width,$nav_min_opacity);
}
function theme_post(&$a) {
@@ -33,11 +34,14 @@ function theme_post(&$a) {
set_pconfig(local_user(), 'redbasic', 'radius', $_POST['redbasic_radius']);
set_pconfig(local_user(), 'redbasic', 'photo_shadow', $_POST['redbasic_shadow']);
set_pconfig(local_user(), 'redbasic', 'section_width', $_POST['redbasic_section_width']);
+ set_pconfig(local_user(), 'redbasic', 'nav_min_opacity', $_POST['redbasic_nav_min_opacity']);
}
}
+// FIXME - this really should be an array
+
function redbasic_form(&$a, $schema, $nav_colour, $bgcolour, $background_image, $item_colour, $item_opacity,
- $font_size, $font_colour, $radius, $shadow, $section_width) {
+ $font_size, $font_colour, $radius, $shadow, $section_width,$nav_min_opacity) {
$scheme_choices = array();
$scheme_choices["---"] = t("Default");
@@ -78,6 +82,7 @@ if(feature_enabled(local_user(),'expert'))
'$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('nav_min_opacity',t('Set minimum opacity of nav bar - to hide it'),$nav_min_opacity),
));
return $o;
diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php
index c4bd2e15a..88bd660c9 100644
--- a/view/theme/redbasic/php/style.php
+++ b/view/theme/redbasic/php/style.php
@@ -22,6 +22,7 @@
$radius = get_pconfig($uid, "redbasic", "radius");
$shadow = get_pconfig($uid,"redbasic","photo_shadow");
$section_width=get_pconfig($uid,"redbasic","section_width");
+ $nav_min_opacity=get_pconfig($uid,'redbasic','nav_min_opacity');
// 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
@@ -72,8 +73,15 @@
$active_colour = '#FFFFFF';
if (! $section_width)
$section_width="72%";
-
-
+ if($nav_min_opacity === false) {
+ $nav_float_min_opacity = 1.0;
+ $nav_percent_min_opacity = 100;
+ }
+ else {
+ $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
@@ -117,7 +125,9 @@ $options = array (
'$radius' => $radius,
'$shadow' => $shadow,
'$active_colour' => $active_colour,
-'$section_width' => $section_width
+'$section_width' => $section_width,
+'$nav_float_min_opacity' => $nav_float_min_opacity,
+'$nav_percent_min_opacity' => $nav_percent_min_opacity
);
echo str_replace(array_keys($options), array_values($options), $x);
diff --git a/view/theme/redbasic/tpl/theme_settings.tpl b/view/theme/redbasic/tpl/theme_settings.tpl
index 4e4b6002c..7a5e4a390 100644
--- a/view/theme/redbasic/tpl/theme_settings.tpl
+++ b/view/theme/redbasic/tpl/theme_settings.tpl
@@ -14,6 +14,7 @@
{{include file="field_input.tpl" field=$radius}}
{{include file="field_input.tpl" field=$shadow}}
{{include file="field_input.tpl" field=$section_width}}
+{{include file="field_input.tpl" field=$nav_min_opacity}}
<div class="settings-submit-wrapper">
<input type="submit" value="{{$submit}}" class="settings-submit" name="redbasic-settings-submit" />
</div>