-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcss.py
More file actions
158 lines (128 loc) · 2.1 KB
/
css.py
File metadata and controls
158 lines (128 loc) · 2.1 KB
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
import os
import sys
def createcss(header, background, box):
os.mkdir("styles", 0755 );
os.chdir("styles")
css = open("global.css", 'a')
cssContents="""@import url("http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,300,700,400,600");
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Open Sans';
}
a {
text-decoration: none;
}
div#header {
width: 100%%;
height: 50px;
background-color: %(header)s ;
margin: 0 auto;
}
.logo {
float: left;
margin-top: 10px;
margin-left: 10px;
}
.logo a {
font-size: 1.3em;
color: #fff;
}
.logo a span {
font-weight: 300;
}
div#container {
width: 100%%;
margin: 0 auto;
}
.sidebar {
width: 250px;
/*height: 100%%;*/
background-color: #171717;
float: left;
}
ul#nav {
}
ul#nav li {
list-style: none;
}
ul#nav li a {
color: #ccc;
display: block;
padding: 10px;
font-size: 0.8em;
border-bottom: 1px solid #0A0A0A;
-webkit-transition: 0.2s;
-moz-transition: 0.2s;
-o-transition: 0.2s;
transition: 0.2s;
}
ul#nav li a:hover {
background-color: #030303;
color: #fff;
}
ul#nav li a.selected {
background-color: #030303;
color: #fff;
}
.content {
width: auto;
margin-left: 250px;
height: 100%%;
background-color: %(background)s ;
padding: 15px;
}
.content p {
color: #424242;
font-size: 0.73em;
}
div#box {
margin-top: 15px;
}
div#box .box-top {
color: #fff;
text-shadow: 0px 1px #000;
background-color: %(box)s ;
padding: 5px;
padding-left: 15px;
font-weight: 300;
}
div#box .box-panel {
padding: 15px;
background-color: #fff;
color: #333;
}
a.mobile {
display: block;
color: #fff;
background-color: #000;
text-align: center;
padding: 7px;
}
a.mobile:active {
background-color: #4a4a4a;
}
@media only screen and (max-width: 320px) {
.sidebar {
width: 100%%;
display: none;
}
.content {
margin-left: 0px;
}
}
@media only screen and (min-width: 320px) {
a.mobile {
display: none;
}
.sidebar {
height: 100%%;
display: block;
}
}""" % {'background': background, 'box': box, 'header': header}
css.write(cssContents)
print "CSS file is completed."
css.close()