]> git.plutz.net Git - serve0/blob - templates/common.css.sh
some css restructuring, animated filter boxes
[serve0] / templates / common.css.sh
1 # Copyright 2014, 2015 Paul Hänsch
2 #
3 # This file is part of Serve0
4
5 # Serve0 is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU Affero General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
9
10 # Serve0 is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU Affero General Public License for more details.
14
15 # You should have received a copy of the GNU Affero General Public License
16 # along with Serve0  If not, see <http://www.gnu.org/licenses/>. 
17
18 cat <<EOF
19
20 * {
21   -moz-box-sizing: border-box;
22   box-sizing: border-box;
23   -moz-transition: all .3s linear;
24   transition: all .3s linear;
25 }
26
27 body {
28   padding: 0;
29   margin: 0;
30   background-color: #000;
31   color: #DDD;
32 }
33 a { color: #EEE; }
34 legend, label, .label { font-weight: bold; }
35
36 input.tabhandle { display: none; }
37 .tabcontent { display: none; }
38 input.tabhandle:checked + label.tabhandle + .tabcontent { display: inline-block; }
39 input.tabhandle:checked + .tabcontent { display: inline-block; }
40
41 textarea {
42   display: block;
43   width: 100%;
44 }
45
46 .info {
47   margin: 0;
48   padding: 0 .25em;
49   background-color: #BBD;
50   color: #000;
51   border: #000 1px solid;
52 }
53 .info.tag {
54   line-height: 1.6em;
55   background-color: #DBB;
56 }
57
58 .pagination_nav {
59   display: inline;
60   border: none;
61   position: absolute;
62   right: 1em;
63   padding-top: .125em;
64 }
65
66 /* == Panels == */
67
68 .panel {
69   display: block;
70   width: 100%;
71   margin: 0;
72   padding: .25em 1em;
73   background-color: #333;
74   border-width: 1px;
75   border-style: none none solid none;
76 }
77
78 a.panel {
79   font-weight: bold;
80   display: inline;
81   border: none;
82 }
83
84 .panel .help { display: block;}
85
86 /* == Top Panel == */
87 .panel#advfilter {
88   position: absolute;
89   top: 0;
90 }
91
92 /* == Bottom Panels == */
93 .panel#preferences,
94 .panel#tagger,
95 .panel#foot {
96   position: fixed;
97   bottom: 0px;
98   min-height: 2em;
99   border-style: solid none none none;
100 }
101
102
103 /* == Switchable Panels == */
104
105 .panel#advfilter,
106 .panel#tagger,
107 .panel#preferences {
108   z-index: 1;
109   overflow: hidden;
110   min-height: 0; max-height: 0;
111   padding-top: 0; padding-bottom: 0;
112 }
113 .panel#advfilter:target,
114 .panel#tagger:target,
115 .panel#preferences:target {
116   max-height: 100%;
117   overflow-y: scroll;
118 }
119
120
121 /* == Panel Switches == */
122
123 .panel#advfilter a.panel,
124 .panel#preferences a.panel,
125 .panel#tagger a.panel {
126   display: block;
127   border-style: none none solid none;
128   border-width: 1px;
129 }
130 .panel#preferences a.panel,
131 .panel#tagger a.panel {
132   border-style: solid none none none;
133   margin-top: .5em;
134 }
135
136
137 /* == Panel Elements == */
138
139 .panel#advfilter .quicklinks,
140 .panel#advfilter .filter,
141 .panel#tagger .newtag,
142 .panel#tagger input[type=submit],
143 .panel#preferences > * {
144   display: inline-block;
145   vertical-align: top;
146   margin-top: 1em;
147 }
148
149
150 /* == Advanced Filters == */
151
152 /* == Filter Boxes == */
153 #advfilter .filter {
154   border: solid 1px #FFF;
155   border-radius: .25em;
156   padding: .25em .5em;
157 }
158 #advfilter .filter .tabcontainer {
159   position: relative;
160   width: 16em;
161   font-weight:normal;
162 }
163 #advfilter .filter .tabcontainer input + .category.tabhandle {
164   display: block;
165   width: 50%;
166 }
167 #advfilter .filter .tabcontainer input:checked + .category.tabhandle {
168   background: #FFF;
169   color: #000;
170 }
171 #advfilter .filter .tabcontainer .category.tabcontent {
172   position: absolute;
173   top: 0; right: 0;
174   width: 50%;
175   height: 100%;
176   min-height: 4em;
177   border: 2px #FFF solid;
178   border-radius: 0 .25em .25em 0;
179 }
180
181 #advfilter > label.tabhandle {
182   text-align: right;
183   width: 4em;
184   margin-left: 4em;
185 }
186
187 /* == Dynamic Appearance of Boxes == */
188 .panel#advfilter > .tabhandle + label { display: none; }
189 .panel#advfilter > .tabhandle:checked + label + .tabcontent + .tabhandle + label { display: inline-block; }
190 .panel#advfilter > .tabhandle:checked + label + .tabcontent + .tabhandle:checked + label { display: none; }
191 .panel#advfilter > .tabhandle + label + .tabcontent {
192   display: inline-block;
193   overflow: hidden;
194   max-width: 0;
195   max-height: 0;
196   padding: 0;
197   border: none;
198 }
199 .panel#advfilter > .tabhandle:checked + label + .tabcontent {
200   max-width: 100%;
201   max-height: 100%;
202   padding: .25em .5em;
203   border: solid 1px #FFF;
204 }
205
206 #advfilter .filter.final {
207   width: 16em;
208   margin-left: 1em;
209 }
210
211 #advfilter .quicklinks {max-width: 100%;}
212 #advfilter .quicklinks * {
213   display: block;
214   word-wrap: break-word;
215 }
216
217
218 /* == Thumblist == */
219
220 #thumblist {
221   width: 100%;
222   padding: .5em 0 3em 0;
223   text-align: center;
224 }
225
226 #thumblist .thumb {
227   display: inline-block;
228   text-align: left;
229   width: 90%;
230   padding: 0 .5em;
231   margin: auto;
232   margin-bottom: .75em;
233   vertical-align: top;
234   word-wrap: break-word;
235 }
236 @media (min-width: 480px){#thumblist .thumb{width: 49.5%;}}
237 @media (min-width: 640px){#thumblist .thumb{width: 33%;}}
238 @media (min-width: 1024px){#thumblist .thumb{width: 256px;}}
239
240 #thumblist .thumb img {
241   width: 100%;
242 }
243 #thumblist .thumb h2 {
244   font-size: 1em;
245   font-weight: normal;
246   margin: 0;
247 }
248 #thumblist .thumb a {
249   display: block;
250 }
251 #thumblist .thumb a.alt {
252   display: inline-block;
253   margin-top: .3em;
254 }
255 #thumblist input {
256   margin: .75em .5em;
257 }
258
259 .panel#tagger .newtag select,
260 .panel#tagger .newtag .label{
261   display: block;
262   width: 10em;
263 }
264
265 .panel#preferences > fieldset {
266   border: solid 1px;
267   border-radius: .25em;
268 }
269 .panel#preferences > input { display: block; }
270
271 #videoview a.panel {
272   position: absolute;
273   right: 1em;
274   width: auto;
275   border: none;
276 }
277 #videoview .video {
278   display: inline-block;
279   width: 60%;
280   vertical-align: top;
281 }
282 #videoview .video * {
283   display: block;
284 }
285 #videoview .videoinfo {
286   width: 39%;
287   margin-top: 2em;
288 }
289 #videoview .videoinfo h2 {
290   display: inline;
291
292 #videoview .videoinfo .meta:after {
293   content: "\A";
294   white-space: pre;
295 }
296 #videoview .videoinfo .label {
297   display: block;
298   margin-top: 1em;
299 }
300 #videoview .videoinfo .info.description {
301   display: block;
302   background-color: #DDF;
303 }
304 #videoview .videoinfo .edit {
305   width: 100%
306 }
307 EOF
308
309 # vi:set filetype=css: