aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
Diffstat (limited to 'view')
-rwxr-xr-xview/settings.tpl5
-rw-r--r--view/settings_display.tpl23
-rwxr-xr-xview/theme/quattro-green/experimental0
-rw-r--r--view/theme/quattro-green/screenshot.pngbin147135 -> 0 bytes
-rw-r--r--view/theme/quattro-green/theme.php56
-rw-r--r--view/theme/quattro-green/theme_settings.tpl11
-rw-r--r--view/theme/quattro/config.php39
-rw-r--r--view/theme/quattro/dark/Makefile4
-rwxr-xr-xview/theme/quattro/dark/colors.less (renamed from view/theme/quattro/colors.less)0
-rwxr-xr-xview/theme/quattro/dark/style.css (renamed from view/theme/quattro/style.css)43
-rwxr-xr-xview/theme/quattro/dark/style.less (renamed from view/theme/quattro/style.less)4
-rw-r--r--view/theme/quattro/green/Makefile4
-rwxr-xr-xview/theme/quattro/green/colors.less (renamed from view/theme/quattro-green/colors.less)0
-rwxr-xr-xview/theme/quattro/green/style.css (renamed from view/theme/quattro-green/style.css)43
-rwxr-xr-xview/theme/quattro/green/style.less (renamed from view/theme/quattro-green/style.less)4
-rw-r--r--view/theme/quattro/screenshot.jpgbin71709 -> 69607 bytes
-rw-r--r--view/theme/quattro/style.php9
-rw-r--r--view/theme/quattro/theme.php26
-rw-r--r--view/theme/quattro/theme_settings.tpl15
19 files changed, 146 insertions, 140 deletions
diff --git a/view/settings.tpl b/view/settings.tpl
index 75225a0f1..f0fd70921 100755
--- a/view/settings.tpl
+++ b/view/settings.tpl
@@ -28,10 +28,7 @@ $nickname_block
{{inc field_custom.tpl with $field=$timezone }}{{endinc}}
{{inc field_input.tpl with $field=$defloc }}{{endinc}}
{{inc field_checkbox.tpl with $field=$allowloc }}{{endinc}}
-{{inc field_themeselect.tpl with $field=$theme }}{{endinc}}
-{{inc field_input.tpl with $field=$ajaxint }}{{endinc}}
-{{inc field_input.tpl with $field=$itemspage_network }}{{endinc}}
-{{inc field_checkbox.tpl with $field=$nosmile}}{{endinc}}
+
<div class="settings-submit-wrapper" >
<input type="submit" name="submit" class="settings-submit" value="$submit" />
diff --git a/view/settings_display.tpl b/view/settings_display.tpl
new file mode 100644
index 000000000..fc7a56c8a
--- /dev/null
+++ b/view/settings_display.tpl
@@ -0,0 +1,23 @@
+$tabs
+
+<h1>$ptitle</h1>
+
+<form action="settings/display" id="settings-form" method="post" autocomplete="off" >
+<input type='hidden' name='form_security_token' value='$form_security_token'>
+
+{{inc field_themeselect.tpl with $field=$theme }}{{endinc}}
+{{inc field_input.tpl with $field=$ajaxint }}{{endinc}}
+{{inc field_input.tpl with $field=$itemspage_network }}{{endinc}}
+{{inc field_checkbox.tpl with $field=$nosmile}}{{endinc}}
+
+
+<div class="settings-submit-wrapper" >
+<input type="submit" name="submit" class="settings-submit" value="$submit" />
+</div>
+
+{{ if $theme_config }}
+<h2>Theme settings</h2>
+$theme_config
+{{ endif }}
+
+</form>
diff --git a/view/theme/quattro-green/experimental b/view/theme/quattro-green/experimental
deleted file mode 100755
index e69de29bb..000000000
--- a/view/theme/quattro-green/experimental
+++ /dev/null
diff --git a/view/theme/quattro-green/screenshot.png b/view/theme/quattro-green/screenshot.png
deleted file mode 100644
index a764f4f9a..000000000
--- a/view/theme/quattro-green/screenshot.png
+++ /dev/null
Binary files differ
diff --git a/view/theme/quattro-green/theme.php b/view/theme/quattro-green/theme.php
deleted file mode 100644
index 47a5c6333..000000000
--- a/view/theme/quattro-green/theme.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-/*
- * Name: quattro-green
- * Description: Green variation of the quattro theme
- * Version: 1.0
- * Author: Fabio Communi <fabrix.xm@gmail.com>
- * Maintainer: Tobias Diekershoff
- */
-$a->theme_info = array(
- 'extends' => 'quattro',
-);
-
-$a->hooks[] = array('plugin_settings', 'view/theme/quattro-green/theme.php', 'quattro_green_settings');
-$a->hooks[] = array('plugin_settings_post', 'view/theme/quattro-green/theme.php', 'quattro_green_settings_post');
-
-
-function quattro_green_settings(&$a, &$o){
- if(!local_user())
- return;
-
- $align = get_pconfig(local_user(), 'quattro', 'align' );
-
- $t = file_get_contents( dirname(__file__). "/theme_settings.tpl" );
- $o .= replace_macros($t, array(
- '$submit' => t('Submit'),
- '$baseurl' => $a->get_baseurl(),
- '$title' => t("Theme settings"),
- '$align' => array('quattro_align', t('Alignment'), $align, '', array('left'=>t('Left'), 'center'=>t('Center'))),
- ));
-}
-
-function quattro_green_settings_post(&$a){
- if(! local_user())
- return;
- if (isset($_POST['quattro-settings-submit'])){
- set_pconfig(local_user(), 'quattro', 'align', $_POST['quattro_align']);
- }
- goaway($a->get_baseurl()."/settings/addon");
-}
-
-
-$quattro_align = get_pconfig(local_user(), 'quattro', 'align' );
-
-if(local_user() && $quattro_align=="center"){
-
- $a->page['htmlhead'].="
- <style>
- html { width: 100%; margin:0px; padding:0px; }
- body {
- margin: 50px auto;
- width: 900px;
- }
- </style>
- ";
-
-}
diff --git a/view/theme/quattro-green/theme_settings.tpl b/view/theme/quattro-green/theme_settings.tpl
deleted file mode 100644
index 25af04253..000000000
--- a/view/theme/quattro-green/theme_settings.tpl
+++ /dev/null
@@ -1,11 +0,0 @@
-<div class="settings-block">
- <h3 class="settings-heading">$title</h3>
-
- {{inc field_select.tpl with $field=$align}}{{endinc}}
-
- <div class="settings-submit-wrapper">
- <input type="submit" value="$submit" class="settings-submit" name="quattro-settings-submit" />
- </div>
-
-
-</div>
diff --git a/view/theme/quattro/config.php b/view/theme/quattro/config.php
new file mode 100644
index 000000000..c9ab3a4a1
--- /dev/null
+++ b/view/theme/quattro/config.php
@@ -0,0 +1,39 @@
+<?php
+/**
+ * Theme settings
+ */
+
+
+
+function theme_content(&$a){
+ if(!local_user())
+ return;
+
+ $align = get_pconfig(local_user(), 'quattro', 'align' );
+ $color = get_pconfig(local_user(), 'quattro', 'color' );
+ $colors = array(
+ "dark"=>"Quattro",
+ "green"=>"Green"
+ );
+
+ $t = file_get_contents( dirname(__file__). "/theme_settings.tpl" );
+ $o .= replace_macros($t, array(
+ '$submit' => t('Submit'),
+ '$baseurl' => $a->get_baseurl(),
+ '$title' => t("Theme settings"),
+ '$align' => array('quattro_align', t('Alignment'), $align, '', array('left'=>t('Left'), 'center'=>t('Center'))),
+ '$color' => array('quattro_color', t('Color scheme'), $color, '', $colors),
+ ));
+ return $o;
+}
+
+function theme_post(&$a){
+ if(! local_user())
+ return;
+
+ if (isset($_POST['quattro-settings-submit'])){
+ set_pconfig(local_user(), 'quattro', 'align', $_POST['quattro_align']);
+ set_pconfig(local_user(), 'quattro', 'color', $_POST['quattro_color']);
+ }
+}
+
diff --git a/view/theme/quattro/dark/Makefile b/view/theme/quattro/dark/Makefile
new file mode 100644
index 000000000..989da60c7
--- /dev/null
+++ b/view/theme/quattro/dark/Makefile
@@ -0,0 +1,4 @@
+##
+
+style.css : style.less colors.less ../icons.less ../quattro.less
+ lessc style.less > style.css
diff --git a/view/theme/quattro/colors.less b/view/theme/quattro/dark/colors.less
index b6d487f92..b6d487f92 100755
--- a/view/theme/quattro/colors.less
+++ b/view/theme/quattro/dark/colors.less
diff --git a/view/theme/quattro/style.css b/view/theme/quattro/dark/style.css
index 7d7444e48..1d951aba8 100755
--- a/view/theme/quattro/style.css
+++ b/view/theme/quattro/dark/style.css
@@ -231,7 +231,8 @@ body {
h4 {
font-size: 1.1em;
}
-a, a:link {
+a,
+a:link {
color: #005c94;
text-decoration: none;
}
@@ -449,7 +450,8 @@ nav #nav-site-linkmenu .menu-popup {
right: 0px;
left: auto;
}
-nav #nav-notifications-linkmenu.on .icon.s22.notify, nav #nav-notifications-linkmenu.selected .icon.s22.notify {
+nav #nav-notifications-linkmenu.on .icon.s22.notify,
+nav #nav-notifications-linkmenu.selected .icon.s22.notify {
background-image: url("../../../images/icons/22/notify_on.png");
}
nav #nav-apps-link.selected {
@@ -627,11 +629,15 @@ aside #profiles-menu {
height: 48px;
}
/* group member */
-#contact-edit-drop-link, .mail-list-delete-wrapper, .group-delete-wrapper {
+#contact-edit-drop-link,
+.mail-list-delete-wrapper,
+.group-delete-wrapper {
float: right;
margin-right: 50px;
}
-#contact-edit-drop-link .drophide, .mail-list-delete-wrapper .drophide, .group-delete-wrapper .drophide {
+#contact-edit-drop-link .drophide,
+.mail-list-delete-wrapper .drophide,
+.group-delete-wrapper .drophide {
background-image: url('../../../images/icons/22/delete.png');
display: block;
width: 22px;
@@ -640,7 +646,9 @@ aside #profiles-menu {
position: relative;
top: -50px;
}
-#contact-edit-drop-link .drop, .mail-list-delete-wrapper .drop, .group-delete-wrapper .drop {
+#contact-edit-drop-link .drop,
+.mail-list-delete-wrapper .drop,
+.group-delete-wrapper .drop {
background-image: url('../../../images/icons/22/delete.png');
display: block;
width: 22px;
@@ -769,7 +777,8 @@ section {
display: table;
width: 780px;
}
-.wall-item-container .wall-item-item, .wall-item-container .wall-item-bottom {
+.wall-item-container .wall-item-item,
+.wall-item-container .wall-item-bottom {
display: table-row;
}
.wall-item-container .wall-item-bottom {
@@ -807,11 +816,13 @@ section {
.wall-item-container .wall-item-content img {
max-width: 710px;
}
-.wall-item-container .wall-item-links, .wall-item-container .wall-item-actions {
+.wall-item-container .wall-item-links,
+.wall-item-container .wall-item-actions {
display: table-cell;
vertical-align: middle;
}
-.wall-item-container .wall-item-links .icon, .wall-item-container .wall-item-actions .icon {
+.wall-item-container .wall-item-links .icon,
+.wall-item-container .wall-item-actions .icon {
opacity: 0.5;
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
@@ -819,7 +830,8 @@ section {
-ms-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
-.wall-item-container .wall-item-links .icon:hover, .wall-item-container .wall-item-actions .icon:hover {
+.wall-item-container .wall-item-links .icon:hover,
+.wall-item-container .wall-item-actions .icon:hover {
opacity: 1;
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
@@ -944,9 +956,6 @@ section {
opacity: 0.5;
}
.wwto {
- position: absolute !important;
- width: 25px;
- height: 25px;
background: #FFFFFF;
border: 2px solid #364e59;
height: 25px;
@@ -1164,7 +1173,9 @@ section {
height: 18px;
}*/
/** acl **/
-#photo-edit-perms-select, #photos-upload-permissions-wrapper, #profile-jot-acl-wrapper {
+#photo-edit-perms-select,
+#photos-upload-permissions-wrapper,
+#profile-jot-acl-wrapper {
display: block!important;
}
#acl-wrapper {
@@ -1323,10 +1334,12 @@ ul.tabs li .active {
float: left;
width: 200px;
}
-.field input, .field textarea {
+.field input,
+.field textarea {
width: 400px;
}
-.field input[type="checkbox"], .field input[type="radio"] {
+.field input[type="checkbox"],
+.field input[type="radio"] {
width: auto;
}
.field textarea {
diff --git a/view/theme/quattro/style.less b/view/theme/quattro/dark/style.less
index c3dbae777..7d81e788a 100755
--- a/view/theme/quattro/style.less
+++ b/view/theme/quattro/dark/style.less
@@ -6,8 +6,8 @@
// $ lessc style.less > style.css
@import "colors";
-@import "icons";
-@import "quattro";
+@import "../icons";
+@import "../quattro";
diff --git a/view/theme/quattro/green/Makefile b/view/theme/quattro/green/Makefile
new file mode 100644
index 000000000..989da60c7
--- /dev/null
+++ b/view/theme/quattro/green/Makefile
@@ -0,0 +1,4 @@
+##
+
+style.css : style.less colors.less ../icons.less ../quattro.less
+ lessc style.less > style.css
diff --git a/view/theme/quattro-green/colors.less b/view/theme/quattro/green/colors.less
index bc78c3fda..bc78c3fda 100755
--- a/view/theme/quattro-green/colors.less
+++ b/view/theme/quattro/green/colors.less
diff --git a/view/theme/quattro-green/style.css b/view/theme/quattro/green/style.css
index 8e3ddd9b8..e7cc549d0 100755
--- a/view/theme/quattro-green/style.css
+++ b/view/theme/quattro/green/style.css
@@ -231,7 +231,8 @@ body {
h4 {
font-size: 1.1em;
}
-a, a:link {
+a,
+a:link {
color: #009100;
text-decoration: none;
}
@@ -449,7 +450,8 @@ nav #nav-site-linkmenu .menu-popup {
right: 0px;
left: auto;
}
-nav #nav-notifications-linkmenu.on .icon.s22.notify, nav #nav-notifications-linkmenu.selected .icon.s22.notify {
+nav #nav-notifications-linkmenu.on .icon.s22.notify,
+nav #nav-notifications-linkmenu.selected .icon.s22.notify {
background-image: url("../../../images/icons/22/notify_on.png");
}
nav #nav-apps-link.selected {
@@ -627,11 +629,15 @@ aside #profiles-menu {
height: 48px;
}
/* group member */
-#contact-edit-drop-link, .mail-list-delete-wrapper, .group-delete-wrapper {
+#contact-edit-drop-link,
+.mail-list-delete-wrapper,
+.group-delete-wrapper {
float: right;
margin-right: 50px;
}
-#contact-edit-drop-link .drophide, .mail-list-delete-wrapper .drophide, .group-delete-wrapper .drophide {
+#contact-edit-drop-link .drophide,
+.mail-list-delete-wrapper .drophide,
+.group-delete-wrapper .drophide {
background-image: url('../../../images/icons/22/delete.png');
display: block;
width: 22px;
@@ -640,7 +646,9 @@ aside #profiles-menu {
position: relative;
top: -50px;
}
-#contact-edit-drop-link .drop, .mail-list-delete-wrapper .drop, .group-delete-wrapper .drop {
+#contact-edit-drop-link .drop,
+.mail-list-delete-wrapper .drop,
+.group-delete-wrapper .drop {
background-image: url('../../../images/icons/22/delete.png');
display: block;
width: 22px;
@@ -769,7 +777,8 @@ section {
display: table;
width: 780px;
}
-.wall-item-container .wall-item-item, .wall-item-container .wall-item-bottom {
+.wall-item-container .wall-item-item,
+.wall-item-container .wall-item-bottom {
display: table-row;
}
.wall-item-container .wall-item-bottom {
@@ -807,11 +816,13 @@ section {
.wall-item-container .wall-item-content img {
max-width: 710px;
}
-.wall-item-container .wall-item-links, .wall-item-container .wall-item-actions {
+.wall-item-container .wall-item-links,
+.wall-item-container .wall-item-actions {
display: table-cell;
vertical-align: middle;
}
-.wall-item-container .wall-item-links .icon, .wall-item-container .wall-item-actions .icon {
+.wall-item-container .wall-item-links .icon,
+.wall-item-container .wall-item-actions .icon {
opacity: 0.5;
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
@@ -819,7 +830,8 @@ section {
-ms-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
-.wall-item-container .wall-item-links .icon:hover, .wall-item-container .wall-item-actions .icon:hover {
+.wall-item-container .wall-item-links .icon:hover,
+.wall-item-container .wall-item-actions .icon:hover {
opacity: 1;
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
@@ -944,9 +956,6 @@ section {
opacity: 0.5;
}
.wwto {
- position: absolute !important;
- width: 25px;
- height: 25px;
background: #FFFFFF;
border: 2px solid #364e59;
height: 25px;
@@ -1164,7 +1173,9 @@ section {
height: 18px;
}*/
/** acl **/
-#photo-edit-perms-select, #photos-upload-permissions-wrapper, #profile-jot-acl-wrapper {
+#photo-edit-perms-select,
+#photos-upload-permissions-wrapper,
+#profile-jot-acl-wrapper {
display: block!important;
}
#acl-wrapper {
@@ -1323,10 +1334,12 @@ ul.tabs li .active {
float: left;
width: 200px;
}
-.field input, .field textarea {
+.field input,
+.field textarea {
width: 400px;
}
-.field input[type="checkbox"], .field input[type="radio"] {
+.field input[type="checkbox"],
+.field input[type="radio"] {
width: auto;
}
.field textarea {
diff --git a/view/theme/quattro-green/style.less b/view/theme/quattro/green/style.less
index f8b0bb31c..7d81e788a 100755
--- a/view/theme/quattro-green/style.less
+++ b/view/theme/quattro/green/style.less
@@ -6,8 +6,8 @@
// $ lessc style.less > style.css
@import "colors";
-@import "../quattro/icons";
-@import "../quattro/quattro";
+@import "../icons";
+@import "../quattro";
diff --git a/view/theme/quattro/screenshot.jpg b/view/theme/quattro/screenshot.jpg
index 7f50ec70e..98fbfe2ea 100644
--- a/view/theme/quattro/screenshot.jpg
+++ b/view/theme/quattro/screenshot.jpg
Binary files differ
diff --git a/view/theme/quattro/style.php b/view/theme/quattro/style.php
new file mode 100644
index 000000000..889ec1530
--- /dev/null
+++ b/view/theme/quattro/style.php
@@ -0,0 +1,9 @@
+<?php
+ $color = get_pconfig(local_user(), "quattro","color");
+
+ if ($color===false) $color="dark";
+
+ if (file_exists("$THEMEPATH/$color/style.css")){
+ echo file_get_contents("$THEMEPATH/$color/style.css");
+ }
+
diff --git a/view/theme/quattro/theme.php b/view/theme/quattro/theme.php
index 7e5ab1e62..be47a401c 100644
--- a/view/theme/quattro/theme.php
+++ b/view/theme/quattro/theme.php
@@ -1,33 +1,7 @@
<?php
-$a->hooks[] = array('plugin_settings', 'view/theme/quattro/theme.php', 'quattro_settings');
-$a->hooks[] = array('plugin_settings_post', 'view/theme/quattro/theme.php', 'quattro_settings_post');
-function quattro_settings(&$a, &$o){
- if(!local_user())
- return;
-
- $align = get_pconfig(local_user(), 'quattro', 'align' );
-
- $t = file_get_contents( dirname(__file__). "/theme_settings.tpl" );
- $o .= replace_macros($t, array(
- '$submit' => t('Submit'),
- '$baseurl' => $a->get_baseurl(),
- '$title' => t("Theme settings"),
- '$align' => array('quattro_align', t('Alignment'), $align, '', array('left'=>t('Left'), 'center'=>t('Center'))),
- ));
-}
-
-function quattro_settings_post(&$a){
- if(! local_user())
- return;
- if (isset($_POST['quattro-settings-submit'])){
- set_pconfig(local_user(), 'quattro', 'align', $_POST['quattro_align']);
- }
- goaway($a->get_baseurl()."/settings/addon");
-}
-
$quattro_align = get_pconfig(local_user(), 'quattro', 'align' );
diff --git a/view/theme/quattro/theme_settings.tpl b/view/theme/quattro/theme_settings.tpl
index 25af04253..9771ae162 100644
--- a/view/theme/quattro/theme_settings.tpl
+++ b/view/theme/quattro/theme_settings.tpl
@@ -1,11 +1,8 @@
-<div class="settings-block">
- <h3 class="settings-heading">$title</h3>
-
- {{inc field_select.tpl with $field=$align}}{{endinc}}
-
- <div class="settings-submit-wrapper">
- <input type="submit" value="$submit" class="settings-submit" name="quattro-settings-submit" />
- </div>
+{{inc field_select.tpl with $field=$color}}{{endinc}}
-
+{{inc field_select.tpl with $field=$align}}{{endinc}}
+
+<div class="settings-submit-wrapper">
+ <input type="submit" value="$submit" class="settings-submit" name="quattro-settings-submit" />
</div>
+