forked from shinovon/mpgram-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
themes.php
107 lines (104 loc) · 2.21 KB
/
themes.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<?php
if(!defined('mp_loaded'))
require_once 'mp.php';
class Themes {
static $theme = 0;
static $iev;
static function setTheme($theme) {
static::$theme = $theme;
}
static function bodyStart($a = null) {
if($a) {
return '<body '.$a.'>';
}
return '<body>'.(static::$iev > 0 ? '<div class="c">' : '');
}
static function bodyEnd() {
return (static::$iev > 0 ? '</div>' : '').'</body>';
}
static function head() {
static::$iev = MP::getIEVersion();
return (MP::$enc == null ? '<meta charset="UTF-8">' : '').
'<meta name="viewport" content="width=device-width, initial-scale=1">
<style type="text/css"><!--
'.(static::$iev > 0 ? '.c {
text-align: left;
width: 420;
margin-left: auto;
margin-right: auto;
}
' : ''). 'body {
'.(static::$iev > 0 ? 'text-align: center;' : 'max-width: 500px;
margin-left: auto;
margin-right: auto;').'
font-family: system-ui;
'.(static::$theme == 0 ?
'background-color: black;
color: #eee;' : 'color: #111;').'
}
a {
'.(static::$theme == 0 ?
'color: #eee;' : 'color: #111;').'
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
input[type=text], select, textarea {
'.(static::$theme == 0 ? 'background-color: black;
color: #eee;
border-color: #eee;
' : '').'border-style: solid;
}
.cm {
margin-left: 2px;
overflow: hidden;
}
.m {
margin-left: 2px;
margin-bottom: 7px;
}
.r, .mw {
border-left: 2px solid '.(static::$theme == 0 ? 'white' : '#168acd').';
padding-left: 4px;
margin-bottom: 2px;
}
.rn, .mwt {
'.(static::$theme == 0 ? '' : 'color: #37a1de;').
'overflow: hidden;
max-width: 200px;
white-space: nowrap;
text-overflow: ellipsis;
}
.rt {
overflow: hidden;
max-width: 300px;
white-space: nowrap;
text-overflow: ellipsis;
}
.c0 {
background-color: '.(static::$theme == 0 ? '#333' : '#ccc').';
}
'.(static::$theme == 0 ? '' : '.ml, .mf, .mn {
color: #168acd;
}').
'.ma {
text-align: center;
margin-bottom: 10px;
}
.cma {
color: #168acd;
}
.u {
color: '.(static::$theme == 0 ? 'darkgrey' : 'grey').';
}
.in {
display: inline;
}
.inr {
display: inline;
float: right;
}
--></style>';
}
}