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