quattro: move quattro-green inside quattro folder.

Add config option to select quattro color scheme.
This commit is contained in:
Fabio Comuni 2012-03-30 21:21:14 +02:00
parent 01af7d355a
commit be2005f146
16 changed files with 87 additions and 72 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 KiB

View file

@ -1,27 +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',
);
$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>
";
}

View file

@ -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>

View file

@ -10,6 +10,11 @@ function theme_content(&$a){
return; return;
$align = get_pconfig(local_user(), 'quattro', 'align' ); $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" ); $t = file_get_contents( dirname(__file__). "/theme_settings.tpl" );
$o .= replace_macros($t, array( $o .= replace_macros($t, array(
@ -17,6 +22,7 @@ function theme_content(&$a){
'$baseurl' => $a->get_baseurl(), '$baseurl' => $a->get_baseurl(),
'$title' => t("Theme settings"), '$title' => t("Theme settings"),
'$align' => array('quattro_align', t('Alignment'), $align, '', array('left'=>t('Left'), 'center'=>t('Center'))), '$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; return $o;
} }
@ -24,8 +30,10 @@ function theme_content(&$a){
function theme_post(&$a){ function theme_post(&$a){
if(! local_user()) if(! local_user())
return; return;
if (isset($_POST['quattro-settings-submit'])){ if (isset($_POST['quattro-settings-submit'])){
set_pconfig(local_user(), 'quattro', 'align', $_POST['quattro_align']); set_pconfig(local_user(), 'quattro', 'align', $_POST['quattro_align']);
set_pconfig(local_user(), 'quattro', 'color', $_POST['quattro_color']);
} }
} }

View file

@ -0,0 +1,4 @@
##
style.css : style.less colors.less ../icons.less ../quattro.less
lessc style.less > style.css

View file

@ -231,7 +231,8 @@ body {
h4 { h4 {
font-size: 1.1em; font-size: 1.1em;
} }
a, a:link { a,
a:link {
color: #005c94; color: #005c94;
text-decoration: none; text-decoration: none;
} }
@ -449,7 +450,8 @@ nav #nav-site-linkmenu .menu-popup {
right: 0px; right: 0px;
left: auto; 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"); background-image: url("../../../images/icons/22/notify_on.png");
} }
nav #nav-apps-link.selected { nav #nav-apps-link.selected {
@ -627,11 +629,15 @@ aside #profiles-menu {
height: 48px; height: 48px;
} }
/* group member */ /* 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; float: right;
margin-right: 50px; 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'); background-image: url('../../../images/icons/22/delete.png');
display: block; display: block;
width: 22px; width: 22px;
@ -640,7 +646,9 @@ aside #profiles-menu {
position: relative; position: relative;
top: -50px; 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'); background-image: url('../../../images/icons/22/delete.png');
display: block; display: block;
width: 22px; width: 22px;
@ -769,7 +777,8 @@ section {
display: table; display: table;
width: 780px; 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; display: table-row;
} }
.wall-item-container .wall-item-bottom { .wall-item-container .wall-item-bottom {
@ -807,11 +816,13 @@ section {
.wall-item-container .wall-item-content img { .wall-item-container .wall-item-content img {
max-width: 710px; 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; display: table-cell;
vertical-align: middle; 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; opacity: 0.5;
-webkit-transition: all 0.2s ease-in-out; -webkit-transition: all 0.2s ease-in-out;
-moz-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; -ms-transition: all 0.2s ease-in-out;
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; opacity: 1;
-webkit-transition: all 0.2s ease-in-out; -webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out;
@ -944,9 +956,6 @@ section {
opacity: 0.5; opacity: 0.5;
} }
.wwto { .wwto {
position: absolute !important;
width: 25px;
height: 25px;
background: #FFFFFF; background: #FFFFFF;
border: 2px solid #364e59; border: 2px solid #364e59;
height: 25px; height: 25px;
@ -1164,7 +1173,9 @@ section {
height: 18px; height: 18px;
}*/ }*/
/** acl **/ /** 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; display: block!important;
} }
#acl-wrapper { #acl-wrapper {
@ -1323,10 +1334,12 @@ ul.tabs li .active {
float: left; float: left;
width: 200px; width: 200px;
} }
.field input, .field textarea { .field input,
.field textarea {
width: 400px; width: 400px;
} }
.field input[type="checkbox"], .field input[type="radio"] { .field input[type="checkbox"],
.field input[type="radio"] {
width: auto; width: auto;
} }
.field textarea { .field textarea {

View file

@ -6,8 +6,8 @@
// $ lessc style.less > style.css // $ lessc style.less > style.css
@import "colors"; @import "colors";
@import "icons"; @import "../icons";
@import "quattro"; @import "../quattro";

View file

@ -0,0 +1,4 @@
##
style.css : style.less colors.less ../icons.less ../quattro.less
lessc style.less > style.css

View file

@ -231,7 +231,8 @@ body {
h4 { h4 {
font-size: 1.1em; font-size: 1.1em;
} }
a, a:link { a,
a:link {
color: #009100; color: #009100;
text-decoration: none; text-decoration: none;
} }
@ -449,7 +450,8 @@ nav #nav-site-linkmenu .menu-popup {
right: 0px; right: 0px;
left: auto; 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"); background-image: url("../../../images/icons/22/notify_on.png");
} }
nav #nav-apps-link.selected { nav #nav-apps-link.selected {
@ -627,11 +629,15 @@ aside #profiles-menu {
height: 48px; height: 48px;
} }
/* group member */ /* 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; float: right;
margin-right: 50px; 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'); background-image: url('../../../images/icons/22/delete.png');
display: block; display: block;
width: 22px; width: 22px;
@ -640,7 +646,9 @@ aside #profiles-menu {
position: relative; position: relative;
top: -50px; 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'); background-image: url('../../../images/icons/22/delete.png');
display: block; display: block;
width: 22px; width: 22px;
@ -769,7 +777,8 @@ section {
display: table; display: table;
width: 780px; 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; display: table-row;
} }
.wall-item-container .wall-item-bottom { .wall-item-container .wall-item-bottom {
@ -807,11 +816,13 @@ section {
.wall-item-container .wall-item-content img { .wall-item-container .wall-item-content img {
max-width: 710px; 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; display: table-cell;
vertical-align: middle; 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; opacity: 0.5;
-webkit-transition: all 0.2s ease-in-out; -webkit-transition: all 0.2s ease-in-out;
-moz-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; -ms-transition: all 0.2s ease-in-out;
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; opacity: 1;
-webkit-transition: all 0.2s ease-in-out; -webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out;
@ -944,9 +956,6 @@ section {
opacity: 0.5; opacity: 0.5;
} }
.wwto { .wwto {
position: absolute !important;
width: 25px;
height: 25px;
background: #FFFFFF; background: #FFFFFF;
border: 2px solid #364e59; border: 2px solid #364e59;
height: 25px; height: 25px;
@ -1164,7 +1173,9 @@ section {
height: 18px; height: 18px;
}*/ }*/
/** acl **/ /** 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; display: block!important;
} }
#acl-wrapper { #acl-wrapper {
@ -1323,10 +1334,12 @@ ul.tabs li .active {
float: left; float: left;
width: 200px; width: 200px;
} }
.field input, .field textarea { .field input,
.field textarea {
width: 400px; width: 400px;
} }
.field input[type="checkbox"], .field input[type="radio"] { .field input[type="checkbox"],
.field input[type="radio"] {
width: auto; width: auto;
} }
.field textarea { .field textarea {

View file

@ -6,8 +6,8 @@
// $ lessc style.less > style.css // $ lessc style.less > style.css
@import "colors"; @import "colors";
@import "../quattro/icons"; @import "../icons";
@import "../quattro/quattro"; @import "../quattro";

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 68 KiB

View file

@ -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");
}

View file

@ -1,3 +1,5 @@
{{inc field_select.tpl with $field=$color}}{{endinc}}
{{inc field_select.tpl with $field=$align}}{{endinc}} {{inc field_select.tpl with $field=$align}}{{endinc}}
<div class="settings-submit-wrapper"> <div class="settings-submit-wrapper">