aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-11-03 14:57:29 -0800
committerfriendica <info@friendica.com>2013-11-03 14:57:29 -0800
commit4d470f2d7017fcee94d0d5a548ff40018b358542 (patch)
tree23c3315ea4904ea9d00dc97bd5d6b15d29cae06c /view
parent5ba813397b7112df64e35ee45eef1c2f0b12d617 (diff)
downloadvolse-hubzilla-4d470f2d7017fcee94d0d5a548ff40018b358542.tar.gz
volse-hubzilla-4d470f2d7017fcee94d0d5a548ff40018b358542.tar.bz2
volse-hubzilla-4d470f2d7017fcee94d0d5a548ff40018b358542.zip
add sloppy photo setting and fix default navbar hide setting
Diffstat (limited to 'view')
-rw-r--r--view/theme/redbasic/css/sloppy_photos.css58
-rw-r--r--view/theme/redbasic/css/style.css58
-rw-r--r--view/theme/redbasic/php/config.php9
-rw-r--r--view/theme/redbasic/php/style.php7
-rw-r--r--view/theme/redbasic/tpl/theme_settings.tpl1
-rwxr-xr-xview/tpl/photo_top.tpl4
6 files changed, 73 insertions, 64 deletions
diff --git a/view/theme/redbasic/css/sloppy_photos.css b/view/theme/redbasic/css/sloppy_photos.css
new file mode 100644
index 000000000..78aedc9cc
--- /dev/null
+++ b/view/theme/redbasic/css/sloppy_photos.css
@@ -0,0 +1,58 @@
+
+.rotleft1 {
+-webkit-transform: rotate(-1deg);
+-moz-transform: rotate(-1deg);
+-ms-transform: rotate(-1deg);
+-o-transform: rotate(-1deg);
+}
+
+.rotleft2 {
+-webkit-transform: rotate(-2deg);
+-moz-transform: rotate(-2deg);
+-ms-transform: rotate(-2deg);
+-o-transform: rotate(-2deg);
+}
+
+.rotleft3 {
+-webkit-transform: rotate(-3deg);
+-moz-transform: rotate(-3deg);
+-ms-transform: rotate(-3deg);
+-o-transform: rotate(-3deg);
+}
+
+.rotleft4 {
+-webkit-transform: rotate(-4deg);
+-moz-transform: rotate(-4deg);
+-ms-transform: rotate(-4deg);
+-o-transform: rotate(-4deg);
+}
+
+
+.rotright1 {
+-webkit-transform: rotate(1deg);
+-moz-transform: rotate(1deg);
+-ms-transform: rotate(1deg);
+-o-transform: rotate(1deg);
+}
+
+.rotright2 {
+-webkit-transform: rotate(2deg);
+-moz-transform: rotate(2deg);
+-ms-transform: rotate(2deg);
+-o-transform: rotate(2deg);
+}
+
+.rotright3 {
+-webkit-transform: rotate(3deg);
+-moz-transform: rotate(3deg);
+-ms-transform: rotate(3deg);
+-o-transform: rotate(3deg);
+}
+
+.rotright4 {
+-webkit-transform: rotate(4deg);
+-moz-transform: rotate(4deg);
+-ms-transform: rotate(4deg);
+-o-transform: rotate(4deg);
+}
+
diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css
index ba0aabf8d..b672b572c 100644
--- a/view/theme/redbasic/css/style.css
+++ b/view/theme/redbasic/css/style.css
@@ -1513,64 +1513,6 @@ tr.mceLast {
border: 1px solid #888888;
}
-.rotleft1 {
--webkit-transform: rotate(-1deg);
--moz-transform: rotate(-1deg);
--ms-transform: rotate(-1deg);
--o-transform: rotate(-1deg);
-}
-
-.rotleft2 {
--webkit-transform: rotate(-2deg);
--moz-transform: rotate(-2deg);
--ms-transform: rotate(-2deg);
--o-transform: rotate(-2deg);
-}
-
-.rotleft3 {
--webkit-transform: rotate(-3deg);
--moz-transform: rotate(-3deg);
--ms-transform: rotate(-3deg);
--o-transform: rotate(-3deg);
-}
-
-.rotleft4 {
--webkit-transform: rotate(-4deg);
--moz-transform: rotate(-4deg);
--ms-transform: rotate(-4deg);
--o-transform: rotate(-4deg);
-}
-
-
-.rotright1 {
--webkit-transform: rotate(1deg);
--moz-transform: rotate(1deg);
--ms-transform: rotate(1deg);
--o-transform: rotate(1deg);
-}
-
-.rotright2 {
--webkit-transform: rotate(2deg);
--moz-transform: rotate(2deg);
--ms-transform: rotate(2deg);
--o-transform: rotate(2deg);
-}
-
-.rotright3 {
--webkit-transform: rotate(3deg);
--moz-transform: rotate(3deg);
--ms-transform: rotate(3deg);
--o-transform: rotate(3deg);
-}
-
-.rotright4 {
--webkit-transform: rotate(4deg);
--moz-transform: rotate(4deg);
--ms-transform: rotate(4deg);
--o-transform: rotate(4deg);
-}
-
-
.photos-end {
clear: both;
diff --git a/view/theme/redbasic/php/config.php b/view/theme/redbasic/php/config.php
index dc79b654f..0007d8c24 100644
--- a/view/theme/redbasic/php/config.php
+++ b/view/theme/redbasic/php/config.php
@@ -15,8 +15,9 @@ function theme_content(&$a) {
$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, $bgcolour, $background_image, $item_colour, $item_opacity,
- $font_size, $font_colour, $radius, $shadow, $section_width,$nav_min_opacity);
+ $font_size, $font_colour, $radius, $shadow, $section_width,$nav_min_opacity,$sloppy_photos);
}
function theme_post(&$a) {
@@ -35,13 +36,14 @@ function theme_post(&$a) {
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']);
+ set_pconfig(local_user(), 'redbasic', 'sloppy_photos', $_POST['redbasic_sloppy_photos']);
}
}
// 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,$nav_min_opacity) {
+ $font_size, $font_colour, $radius, $shadow, $section_width,$nav_min_opacity,$sloppy_photos) {
$scheme_choices = array();
$scheme_choices["---"] = t("Default");
@@ -82,7 +84,8 @@ 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),
+ '$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?')),
));
return $o;
diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php
index 88bd660c9..56df0f4f2 100644
--- a/view/theme/redbasic/php/style.php
+++ b/view/theme/redbasic/php/style.php
@@ -23,6 +23,7 @@
$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');
+ $sloppy_photos=get_pconfig($uid,'redbasic','sloppy_photos');
// 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
@@ -73,7 +74,7 @@
$active_colour = '#FFFFFF';
if (! $section_width)
$section_width="72%";
- if($nav_min_opacity === false) {
+ if($nav_min_opacity === false || $nav_min_opacity === '') {
$nav_float_min_opacity = 1.0;
$nav_percent_min_opacity = 100;
}
@@ -133,3 +134,7 @@ $options = array (
echo str_replace(array_keys($options), array_values($options), $x);
}
+
+if($sloppy_photos && file_exists('view/theme/redbasic/css/sloppy_photos.css')) {
+ echo file_get_contents('view/theme/redbasic/css/sloppy_photos.css');
+} \ No newline at end of file
diff --git a/view/theme/redbasic/tpl/theme_settings.tpl b/view/theme/redbasic/tpl/theme_settings.tpl
index 7a5e4a390..c7f2bf124 100644
--- a/view/theme/redbasic/tpl/theme_settings.tpl
+++ b/view/theme/redbasic/tpl/theme_settings.tpl
@@ -15,6 +15,7 @@
{{include file="field_input.tpl" field=$shadow}}
{{include file="field_input.tpl" field=$section_width}}
{{include file="field_input.tpl" field=$nav_min_opacity}}
+{{include file="field_checkbox.tpl" field=$sloppy_photos}}
<div class="settings-submit-wrapper">
<input type="submit" value="{{$submit}}" class="settings-submit" name="redbasic-settings-submit" />
</div>
diff --git a/view/tpl/photo_top.tpl b/view/tpl/photo_top.tpl
index 902f74232..944928f85 100755
--- a/view/tpl/photo_top.tpl
+++ b/view/tpl/photo_top.tpl
@@ -1,6 +1,6 @@
-<div class="photo-top-image-wrapper lframe" id="photo-top-image-wrapper-{{$photo.id}}">
+<div class="photo-top-image-wrapper lframe {{$photo.twist}}" id="photo-top-image-wrapper-{{$photo.id}}">
<a href="{{$photo.link}}" class="photo-top-photo-link" id="photo-top-photo-link-{{$photo.id}}" title="{{$photo.title}}">
- <img src="{{$photo.src}}" alt="{{$photo.alt}}" title="{{$photo.title}}" class="photo-top-photo{{$photo.twist}}" id="photo-top-photo-{{$photo.id}}" />
+ <img src="{{$photo.src}}" alt="{{$photo.alt}}" title="{{$photo.title}}" class="photo-top-photo" id="photo-top-photo-{{$photo.id}}" />
</a>
<div class="photo-top-album-name"><a href="{{$photo.album.link}}" class="photo-top-album-link" title="{{$photo.album.alt}}" >{{$photo.album.name}}</a></div>
</div>