From 7aa3b92f4c4619de76f45f448edfd6e4dcfbceb4 Mon Sep 17 00:00:00 2001
From: Fabio Comuni <fabrix.xm@gmail.com>
Date: Fri, 13 Apr 2012 11:21:15 +0200
Subject: [PATCH] quattro: add admin theme settigs. darker items background
 with a bottom border.

---
 view/theme/quattro/config.php        | 42 ++++++++++++++++++-------
 view/theme/quattro/dark/colors.less  |  3 +-
 view/theme/quattro/dark/style.css    | 46 ++++++----------------------
 view/theme/quattro/green/colors.less |  3 +-
 view/theme/quattro/green/style.css   | 46 ++++++----------------------
 view/theme/quattro/quattro.less      | 45 +++++----------------------
 view/theme/quattro/style.php         |  9 +++++-
 view/theme/quattro/theme.php         | 11 +++++++
 8 files changed, 79 insertions(+), 126 deletions(-)
 create mode 100644 view/theme/quattro/theme.php

diff --git a/view/theme/quattro/config.php b/view/theme/quattro/config.php
index c9ab3a4a14..c261a78ecb 100644
--- a/view/theme/quattro/config.php
+++ b/view/theme/quattro/config.php
@@ -11,6 +11,37 @@ function theme_content(&$a){
 	
 	$align = get_pconfig(local_user(), 'quattro', 'align' );
 	$color = get_pconfig(local_user(), 'quattro', 'color' );
+	
+	return quattro_form($a,$align, $color);
+}
+
+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']);
+	}
+}
+
+
+function theme_admin(&$a){
+	$align = get_config('quattro', 'align' );
+	$color = get_config('quattro', 'color' );
+	
+	return quattro_form($a,$align, $color);
+}
+
+function theme_admin_post(&$a){
+	if (isset($_POST['quattro-settings-submit'])){
+		set_config('quattro', 'align', $_POST['quattro_align']);
+		set_config('quattro', 'color', $_POST['quattro_color']);
+	}
+}
+
+
+function quattro_form(&$a, $align, $color){
 	$colors = array(
 		"dark"=>"Quattro", 
 		"green"=>"Green"
@@ -26,14 +57,3 @@ function theme_content(&$a){
 	));
 	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/colors.less b/view/theme/quattro/dark/colors.less
index e867d76435..42fdd34bb7 100644
--- a/view/theme/quattro/dark/colors.less
+++ b/view/theme/quattro/dark/colors.less
@@ -73,7 +73,8 @@
 
 @FieldHelpColor: @Grey3;
 
-@ThreadBackgroundColor: #f6f7f8;
+@ThreadBackgroundColor: #eff0f1;
+@ThreadBottomBorderColor: @Grey2;
 @ShinyBorderColor: @Yellow1;
 
 @ItemColor: @Grey5;
diff --git a/view/theme/quattro/dark/style.css b/view/theme/quattro/dark/style.css
index 857596fc68..4691985102 100644
--- a/view/theme/quattro/dark/style.css
+++ b/view/theme/quattro/dark/style.css
@@ -785,11 +785,12 @@ section {
 }
 /* wall item */
 .tread-wrapper {
-  background-color: #f6f7f8;
+  background-color: #eff0f1;
   position: relative;
   padding: 10px;
   margin-bottom: 20px;
   width: 750px;
+  border-bottom: 1px solid #cccccc;
 }
 .wall-item-decor {
   position: absolute;
@@ -1628,44 +1629,15 @@ ul.tabs li .active {
   -ms-transition: all 0.2s ease-in-out;
   transition: all 0.2s ease-in-out;
 }
-/* mail view */
-/*
-.mail-conv-sender,
-.mail-conv-detail {
-	float: left;
-}
-.mail-conv-detail {
-	margin-left: 20px;
-	width: 500px;
-}
-
-.mail-conv-subject {
-    font-size: 1.4em;
-    margin: 10px 0;
-}
-
-.mail-conv-outside-wrapper-end {
-	clear: both;
-}
-
-.mail-conv-outside-wrapper {
-	margin-top: 30px;
-}
-
-.mail-conv-delete-wrapper {
-	float: right;
-	margin-right: 30px;
-	margin-top: 15px;
-}
-.mail-conv-break {
-	clear: both;
+/* theme screenshot */
+.screenshot {
+  position: absolute;
+  left: 70%;
+  top: 50px;
 }
-
-.mail-conv-delete-icon {
-	border: none;
+.screenshot img {
+  width: 200px;
 }
-
-*/
 /* page footer */
 footer {
   height: 100px;
diff --git a/view/theme/quattro/green/colors.less b/view/theme/quattro/green/colors.less
index bc78c3fdad..1f1df4c55d 100644
--- a/view/theme/quattro/green/colors.less
+++ b/view/theme/quattro/green/colors.less
@@ -74,7 +74,8 @@
 
 @FieldHelpColor: @Grey3;
 
-@ThreadBackgroundColor: #f6f7f8;
+@ThreadBackgroundColor: #eff0f1;
+@ThreadBottomBorderColor: @Grey2;
 @ShinyBorderColor: @Green4;
 
 @CommentBoxEmptyColor: @Grey3;
diff --git a/view/theme/quattro/green/style.css b/view/theme/quattro/green/style.css
index 9c8621c60b..b4bfe05a99 100644
--- a/view/theme/quattro/green/style.css
+++ b/view/theme/quattro/green/style.css
@@ -785,11 +785,12 @@ section {
 }
 /* wall item */
 .tread-wrapper {
-  background-color: #f6f7f8;
+  background-color: #eff0f1;
   position: relative;
   padding: 10px;
   margin-bottom: 20px;
   width: 750px;
+  border-bottom: 1px solid #cccccc;
 }
 .wall-item-decor {
   position: absolute;
@@ -1628,44 +1629,15 @@ ul.tabs li .active {
   -ms-transition: all 0.2s ease-in-out;
   transition: all 0.2s ease-in-out;
 }
-/* mail view */
-/*
-.mail-conv-sender,
-.mail-conv-detail {
-	float: left;
-}
-.mail-conv-detail {
-	margin-left: 20px;
-	width: 500px;
-}
-
-.mail-conv-subject {
-    font-size: 1.4em;
-    margin: 10px 0;
-}
-
-.mail-conv-outside-wrapper-end {
-	clear: both;
-}
-
-.mail-conv-outside-wrapper {
-	margin-top: 30px;
-}
-
-.mail-conv-delete-wrapper {
-	float: right;
-	margin-right: 30px;
-	margin-top: 15px;
-}
-.mail-conv-break {
-	clear: both;
+/* theme screenshot */
+.screenshot {
+  position: absolute;
+  left: 70%;
+  top: 50px;
 }
-
-.mail-conv-delete-icon {
-	border: none;
+.screenshot img {
+  width: 200px;
 }
-
-*/
 /* page footer */
 footer {
   height: 100px;
diff --git a/view/theme/quattro/quattro.less b/view/theme/quattro/quattro.less
index 9a58741412..d17b16bcdc 100644
--- a/view/theme/quattro/quattro.less
+++ b/view/theme/quattro/quattro.less
@@ -422,6 +422,7 @@ section {
 	padding: 10px;
 	margin-bottom: 20px;
 	width: 750px;
+	border-bottom: 1px solid @ThreadBottomBorderColor;
 }
 .wall-item-decor { position: absolute; left: 97%; top: -10px;  width: 16px;}
 .unstarred { display: none; }
@@ -1134,46 +1135,14 @@ ul.tabs {
 	
 }
 
-/* mail view */
-/*
-.mail-conv-sender,
-.mail-conv-detail {
-	float: left;
-}
-.mail-conv-detail {
-	margin-left: 20px;
-	width: 500px;
-}
-
-.mail-conv-subject {
-    font-size: 1.4em;
-    margin: 10px 0;
-}
-
-.mail-conv-outside-wrapper-end {
-	clear: both;
-}
-
-.mail-conv-outside-wrapper {
-	margin-top: 30px;
-}
-
-.mail-conv-delete-wrapper {
-	float: right;
-	margin-right: 30px;
-	margin-top: 15px;
-}
-.mail-conv-break {
-	clear: both;
-}
-
-.mail-conv-delete-icon {
-	border: none;
+/* theme screenshot */
+.screenshot {
+	position: absolute;
+	left: 70%;
+	top: 50px;
+	img { width: 200px; }
 }
 
-*/
-
-
 /* page footer */
 footer { height: 100px; display: table-row; }
 
diff --git a/view/theme/quattro/style.php b/view/theme/quattro/style.php
index b6104a170d..fa02a04b63 100644
--- a/view/theme/quattro/style.php
+++ b/view/theme/quattro/style.php
@@ -1,11 +1,18 @@
 <?php
-	$color = false;
+	$color=false;
+	$quattro_align=false;
+	$site_color = get_config("quattro","color");
+	$site_quattro_align = get_config("quattro", "align" );
+	
 	if (local_user()) {
 		$color = get_pconfig(local_user(), "quattro","color");
 		$quattro_align = get_pconfig(local_user(), 'quattro', 'align' );
 	}
 	
+	if ($color===false) $color=$site_color;
 	if ($color===false) $color="dark";
+	if ($quattro_align===false) $quattro_align=$site_quattro_align;
+	
 		
 	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
new file mode 100644
index 0000000000..de2e5861e3
--- /dev/null
+++ b/view/theme/quattro/theme.php
@@ -0,0 +1,11 @@
+<?php
+/**
+ * Name: Quattro
+ * Author: Fabio <http://kirgroup.com/profile/fabrixxm>
+ * Maintainer: Fabio <http://kirgroup.com/profile/fabrixxm>
+ * Maintainer: Tobias <https://diekershoff.homeunix.net/friendika/profile/tobias>
+ */
+ 
+	$a->theme_info = array();
+ 
+
-- 
2.39.5