]> git.mxchange.org Git - friendica.git/blob - view/theme/dispy/style.php
Merge branch 'master' of git://github.com/friendica/friendica
[friendica.git] / view / theme / dispy / style.php
1 <?php
2     $line_height = false;
3     $dispy_font_size = false;
4     $resolution = false;
5     $colour = false;
6     $site_line_height = get_config("dispy","line_height");
7     $site_dispy_font_size = get_config("dispy", "font_size" );
8     $site_colour = get_config("dispy", "colour" );
9
10     if (local_user()) {
11         $line_height = get_pconfig(local_user(), "dispy","line_height");
12         $dispy_font_size = get_pconfig(local_user(), "dispy", "font_size");
13         $colour = get_pconfig(local_user(), "dispy", "colour");
14     }
15
16     if ($line_height === false) { $line_height = $site_line_height; }
17     if ($line_height === false) { $line_height = "1.2"; }
18     if ($dispy_font_size === false) { $dispy_font_size = $site_dispy_font_size; }
19     if ($dispy_font_size === false) { $dispy_font_size = "12"; }
20     if ($colour === false) { $colour = $site_colour; }
21     if ($colour === false) { $colour = "light"; }
22     
23     if($colour == "light") {
24         if (file_exists("$THEMEPATH/light/style.css")) {
25             echo file_get_contents("$THEMEPATH/light/style.css");
26         }
27         if($dispy_font_size == "16") {
28             echo "
29                 .wall-item-container .wall-item-content {
30                     font-size: 16px;
31                 }
32                 .wall-item-photo-container .wall-item-content {
33                     font-size: 16px;
34                 }";  
35         }
36         if($dispy_font_size == "15") {
37             echo "
38                 .wall-item-container .wall-item-content {
39                     font-size: 15px;
40                 }
41                 .wall-item-photo-container .wall-item-content {
42                     font-size: 15px;
43                 }";
44         }       
45         if($dispy_font_size == "14") {
46             echo "
47                 .wall-item-container .wall-item-content {
48                     font-size: 14px;
49                 }
50                 .wall-item-photo-container .wall-item-content {
51                     font-size: 14px;
52                 }";
53         }
54         if($dispy_font_size == "13.5") {
55             echo "
56                 .wall-item-container .wall-item-content {
57                     font-size: 13.5px;
58                 }
59                 .wall-item-photo-container .wall-item-content {
60                     font-size: 13.5px;
61                 }";
62         }
63         if($dispy_font_size == "13") {
64             echo "
65                 .wall-item-container .wall-item-content {
66                     font-size: 13px;
67                 }
68                 .wall-item-photo-container .wall-item-content {
69                     font-size: 13px;
70                 }";
71         }
72         if($dispy_font_size == "12.5") {
73             echo "
74                 .wall-item-container .wall-item-content {
75                     font-size: 12.5px;
76                 }
77                 .wall-item-photo-container .wall-item-content {
78                     font-size: 12.5px;
79                 }";
80         }
81         if($dispy_font_size == "12") {
82             echo "
83                 .wall-item-container .wall-item-content {
84                     font-size: 12px;
85                 }
86                 .wall-item-photo-container .wall-item-content {
87                     font-size: 12px;
88                 }";
89         }
90         if($line_height == "1.5") {
91             echo "
92                 .wall-item-container .wall-item-content {
93                     line-height: 1.5;
94                 }
95                 .wall-item-photo-container .wall-item-content {
96                     line-height: 1.5;
97                 }";
98         }       
99         if($line_height == "1.4") {
100             echo "
101                 .wall-item-container .wall-item-content {
102                     line-height: 1.4;
103                 }
104                 .wall-item-photo-container .wall-item-content {
105                     line-height: 1.4;
106                 }";
107         }
108         if($line_height == "1.3") {
109             echo "
110                 .wall-item-container .wall-item-content {
111                     line-height: 1.3;
112                 }
113                 .wall-item-photo-container .wall-item-content {
114                     line-height: 1.3;
115                 }";
116         }
117         if($line_height == "1.2") {
118             echo "
119                 .wall-item-container .wall-item-content {
120                     line-height: 1.2;
121                 }
122                 .wall-item-photo-container .wall-item-content {
123                     line-height: 1.2;
124                 }";
125         }
126         if($line_height == "1.1") {
127             echo "
128                 .wall-item-container .wall-item-content {
129                     line-height: 1.1;
130                 }
131                 .wall-item-photo-container .wall-item-content {
132                     line-height: 1.1;
133                 }";
134         }
135     }
136
137     if($colour == "dark") {
138         if (file_exists("$THEMEPATH/dark/style.css")) { 
139             echo file_get_contents("$THEMEPATH/dark/style.css");
140         }
141         if($dispy_font_size == "16") {
142             echo "
143                 .wall-item-container .wall-item-content {
144                     font-size: 16px;
145                 }
146                 .wall-item-photo-container .wall-item-content {
147                     font-size: 16px;
148                 }";  
149         }
150         if($dispy_font_size == "15") {
151             echo "
152                 .wall-item-container .wall-item-content {
153                     font-size: 15px;
154                 }
155                 .wall-item-photo-container .wall-item-content {
156                     font-size: 15px;
157                 }";
158         }       
159         if($dispy_font_size == "14") {
160             echo "
161                 .wall-item-container .wall-item-content {
162                     font-size: 14px;
163                 }
164                 .wall-item-photo-container .wall-item-content {
165                     font-size: 14px;
166                 }";
167         }
168         if($dispy_font_size == "13.5") {
169             echo "
170                 .wall-item-container .wall-item-content {
171                     font-size: 13.5px;
172                 }
173                 .wall-item-photo-container .wall-item-content {
174                     font-size: 13.5px;
175                 }";
176         }
177         if($dispy_font_size == "13") {
178             echo "
179                 .wall-item-container .wall-item-content {
180                     font-size: 13px;
181                 }
182                 .wall-item-photo-container .wall-item-content {
183                     font-size: 13px;
184                 }";
185         }
186         if($dispy_font_size == "12.5") {
187             echo "
188                 .wall-item-container .wall-item-content {
189                     font-size: 12.5px;
190                 }
191                 .wall-item-photo-container .wall-item-content {
192                     font-size: 12.5px;
193                 }";
194         }
195         if($dispy_font_size == "12") {
196             echo "
197                 .wall-item-container .wall-item-content {
198                     font-size: 12px;
199                 }
200                 .wall-item-photo-container .wall-item-content {
201                     font-size: 12px;
202                 }";
203         }
204         if($line_height == "1.5") {
205             echo "
206                 .wall-item-container .wall-item-content {
207                     line-height: 1.5;
208                 }
209                 .wall-item-photo-container .wall-item-content {
210                     line-height: 1.5;
211                 }";
212         }       
213         if($line_height == "1.4"){
214             echo "
215                 .wall-item-container .wall-item-content {
216                     line-height: 1.4;
217                 }
218                 .wall-item-photo-container .wall-item-content {
219                     line-height: 1.4;
220                 }";
221         }
222         if($line_height == "1.3") {
223             echo "
224                 .wall-item-container .wall-item-content {
225                     line-height: 1.3;
226                 }
227                 .wall-item-photo-container .wall-item-content {
228                     line-height: 1.3;
229                 }";
230         }
231         if($line_height == "1.2") {
232             echo "
233                 .wall-item-container .wall-item-content {
234                     line-height: 1.2;
235                 }
236                 .wall-item-photo-container .wall-item-content {
237                     line-height: 1.2;
238                 }";
239         }
240         if($line_height == "1.1") {
241             echo "
242                 .wall-item-container .wall-item-content {
243                     line-height: 1.1;
244                 }
245                 .wall-item-photo-container .wall-item-content {
246                     line-height: 1.1;
247                 }";
248         }
249     }
250