-
Notifications
You must be signed in to change notification settings - Fork 0
/
themes.php
127 lines (124 loc) · 2.71 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<?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();
$full = MP::getSetting('full', 0, true);
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;' : ($full ? '' : 'max-width: 500px;
margin-left: auto;
margin-right: auto;')).'
font-family: system-ui;
'.(static::$theme == 0 ?
'background: #000;
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;
color: '.(static::$theme == 0 ? '#ccc' : '#111').';
}
.ct {
margin-left: 2px;
overflow: hidden;
color: '.(static::$theme == 0 ? '#aaa' : '#444').';
}
.m {
margin-left: 2px;
margin-bottom: 7px;
}
.r, .mw {
text-align: left;
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 ? '#222' : '#d7d7d7').';
}
.c1 {
background-color: '.(static::$theme == 0 ? '#111' : '#eee').';
}
'.(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;
}
.unr {
color: '.(static::$theme == 0 ? '#f77' : '#700').';
}
input[type="file"] {
'.(static::$theme == 0 ? 'color: #eee;' : 'color: #111;').';
}
.ml {
color: #37a1de;
}
--></style>';
}
}