]> git.mxchange.org Git - friendica.git/commitdiff
quattro: move center css to style.php. add tpl for generic_links_widget
authorFabio Comuni <fabrix.xm@gmail.com>
Thu, 12 Apr 2012 06:40:17 +0000 (08:40 +0200)
committerFabio Comuni <fabrix.xm@gmail.com>
Thu, 12 Apr 2012 06:40:17 +0000 (08:40 +0200)
view/theme/quattro/generic_links_widget.tpl [new file with mode: 0644]
view/theme/quattro/style.php
view/theme/quattro/theme.php [deleted file]

diff --git a/view/theme/quattro/generic_links_widget.tpl b/view/theme/quattro/generic_links_widget.tpl
new file mode 100644 (file)
index 0000000..29580bb
--- /dev/null
@@ -0,0 +1,11 @@
+<div class="widget">
+       {{if $title}}<h3>$title</h3>{{endif}}
+       {{if $desc}}<div class="desc">$desc</div>{{endif}}
+       
+       <ul>
+               {{ for $items as $item }}
+                       <li class="tool {{ if $item.selected }}selected{{ endif }}"><a href="$item.url" class="link">$item.label</a></li>
+               {{ endfor }}
+       </ul>
+       
+</div>
index 889ec1530e449c6fcecb2b05c354a66fc239049b..b6104a170df7eaec2ae6e37d373ae259670ad242 100644 (file)
@@ -1,5 +1,9 @@
 <?php
-       $color = get_pconfig(local_user(), "quattro","color");
+       $color = false;
+       if (local_user()) {
+               $color = get_pconfig(local_user(), "quattro","color");
+               $quattro_align = get_pconfig(local_user(), 'quattro', 'align' );
+       }
        
        if ($color===false) $color="dark";
                
@@ -7,3 +11,13 @@
                echo file_get_contents("$THEMEPATH/$color/style.css");
        }
 
+
+       if($quattro_align=="center"){
+               echo "
+                       html { width: 100%; margin:0px; padding:0px; }
+                       body {
+                               margin: 50px auto;
+                               width: 900px;
+                       }
+               ";
+       }
diff --git a/view/theme/quattro/theme.php b/view/theme/quattro/theme.php
deleted file mode 100644 (file)
index be47a40..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-
-
-
-
-$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>
-       ";
-       
-}