]> git.mxchange.org Git - friendica.git/blob - view/theme/quattro/style.php
Merge pull request #500 from fabrixxm/quattro-fontsoptions
[friendica.git] / view / theme / quattro / style.php
1 <?php
2         $color=false;
3         $quattro_align=false;
4         $site_color = get_config("quattro","color");
5         $site_quattro_align = get_config("quattro", "align" );
6         
7         if (local_user()) {
8                 $color = get_pconfig(local_user(), "quattro","color");
9                 $quattro_align = get_pconfig(local_user(), 'quattro', 'align' );
10         }
11         
12         if ($color===false) $color=$site_color;
13         if ($color===false) $color="dark";
14         if ($quattro_align===false) $quattro_align=$site_quattro_align;
15         
16                 
17         if (file_exists("$THEMEPATH/$color/style.css")){
18                 echo file_get_contents("$THEMEPATH/$color/style.css");
19         }
20
21
22         if($quattro_align=="center"){
23                 echo "
24                         html { width: 100%; margin:0px; padding:0px; }
25                         body {
26                                 margin: 50px auto;
27                                 width: 900px;
28                         }
29                 ";
30         }
31
32     
33
34     $textarea_font_size = false;
35     $post_font_size = false;
36     
37     $site_textarea_font_size = get_config("quattro","tfs");
38     $site_post_font_size = get_config("quattro","pfs");
39     if ($site_textarea_font_size===false) $site_textarea_font_size="20";
40     if ($site_post_font_size===false) $site_post_font_size="12";
41     
42         if (local_user()) {
43         $textarea_font_size = get_pconfig(local_user(), "quattro","tfs");
44         $post_font_size = get_pconfig(local_user(), "quattro","pfs");    
45         } 
46     
47     if ($textarea_font_size===false) $textarea_font_size = $site_textarea_font_size;
48     if ($post_font_size===false) $post_font_size = $site_post_font_size;
49
50     echo "
51         textarea { font-size: ${textarea_font_size}px; }
52         .wall-item-comment-wrapper .comment-edit-text-full { font-size: ${textarea_font_size}px; }
53         #jot .profile-jot-text:focus { font-size: ${textarea_font_size}px; }
54         .wall-item-container .wall-item-content  { font-size: ${post_font_size}px; }
55     ";