Dotclear

source: admin/style/scss/partials/_layout.scss @ 3412:a07474dc68c1

Revision 3412:a07474dc68c1, 7.3 KB checked in by franck <carnet.franck.paul@…>, 9 years ago (diff)

Separate dashboard items boxes (usually official DC infos/links) from dashboard contents boxes (usually 3rd party plugins), get advantage of flexbox system to display all of them

Line 
1// Admin layout
2#dotclear-admin {
3     display: flex;
4     min-height: 100vh;
5     flex-direction: column;
6}
7
8#header {
9     width: 99.99%; /* Bugfix Chrome >= 49.0.2623.108 */
10     display: table;
11     position: relative;
12}
13
14h1,
15#top-info-blog,
16#top-info-user {
17     display: table-cell;
18     padding: 8px 0;
19     margin: 0;
20     font-size: 1em;
21     vertical-align: top;
22}
23
24#wrapper {
25     position: relative;
26     padding-top: 1.5em;
27     float: left;
28     width: 100%;
29     z-index: 10;
30     flex: 1;
31}
32
33.with-js #wrapper {
34     padding-top: 0;
35}
36
37#main {
38     width: 100%;
39     float: right;
40     margin-left: -14em;
41     margin-top: 0;
42}
43
44#content {
45     margin: 0 0 0 14em;
46     padding: .5em 1.5em .75em 2.5em;
47}
48
49#main-menu {
50     width: 14em;
51     float: left;
52     margin: 0;
53     padding-top: .5em;
54     padding-bottom: 1em;
55     overflow: hidden;
56}
57
58#footer {
59     clear: both;
60     position: relative;
61     padding: .5em 0 .5em 1em;
62     text-align: left;
63}
64
65
66/* to hide main-menu */
67
68#collapser {
69     position: absolute;
70     top: 0;
71     left: 14em;
72     width: $collapser-width;
73     height: 100%;
74     overflow: hidden;
75     display: block;
76     border-right: 0; // 1px solid #999;
77     border-bottom: 0;
78     z-index: 1;
79     transition: none;
80}
81
82.expand-mm {
83     display: none;
84}
85
86/* if main-menu is hidden */
87
88.hide-mm #main {
89     margin-left: 0;
90}
91
92.hide-mm #content {
93     margin-left: $collapser-width;
94}
95
96.hide-mm #content > h2 {
97     margin-left: calc(-1em - #{$collapser-width});
98}
99
100.hide-mm #main-menu {
101     display: none;
102}
103
104.hide-mm #collapser {
105     left: 0;
106}
107
108.hide-mm .collapse-mm {
109     display: none;
110}
111
112.hide-mm .expand-mm {
113     display: block;
114}
115
116/* -------------------------------------------------------------- layout: two-cols */
117
118.two-cols {
119     position: static;
120}
121
122.two-cols .col {
123     width: 48%;
124     margin-left: 2%;
125     float: left;
126}
127
128.two-cols .col70 {
129     width: 68%;
130     margin-left: 0;
131     float: left;
132}
133
134.col30 {
135     width: 28%;
136     margin-left: 2%;
137     float: left;
138}
139
140.two-cols .col:first-child,
141.two-cols .col30.first-col {
142     margin-left: 0;
143     margin-right: 2%;
144}
145
146.two-cols .col:last-child,
147.two-cols .col70.last-col {
148     margin-left: 2%;
149     margin-right: 0;
150}
151
152.two-cols table {
153     width: 90%;
154}
155
156
157/* -------------------------------------------------------------- layout: three-cols */
158
159.three-cols {
160     position: static;
161}
162
163.three-cols .col {
164     width: 32.3%;
165     float: left;
166     margin-left: 1%;
167}
168
169.three-cols .col:first-child {
170     margin-left: 0;
171}
172
173
174/* ------------------------------------------------- layout: optionnal one/two/three-boxes */
175
176.one-box {
177     text-align: justify;
178}
179
180.two-boxes {
181     width: 48.5%;
182}
183
184.three-boxes {
185     width: 30%;
186}
187
188.two-boxes,
189.three-boxes {
190     display: inline-block;
191     vertical-align: top;
192     margin: 0 1.5% 1em;
193     text-align: left;
194}
195
196.two-boxes:nth-of-type(odd),
197.three-boxes:nth-of-type(3n+1) {
198     margin-left: 0;
199}
200
201.two-boxes:nth-of-type(even),
202.three-boxes:nth-of-type(3n) {
203     margin-right: 0;
204}
205
206
207/* ---------------------------------------------------------------- layout: popups */
208
209.popup h1 {
210     display: block;
211     width: 100%;
212     margin: 0;
213     font-size: 1.5em;
214     text-indent: 1em;
215     line-height: 1.5em;
216     font-weight: normal;
217}
218
219.popup #wrapper {
220     display: block;
221     float: none;
222     width: 100%;
223     margin: 0;
224     padding: 0;
225     background-position: 0 0;
226}
227
228.popup #main {
229     margin: 0;
230     padding: 0;
231}
232
233.popup #content {
234     margin: 0;
235     padding: 1em;
236}
237
238.popup #content h2 {
239     margin: 0 0 1em 0;
240     padding: 0;
241}
242
243.popup #footer p {
244     border: none;
245}
246
247
248/* -------------------------------------------------------- layout: classes de complément */
249
250.constrained {
251     margin: 0;
252     padding: 0;
253     border: none;
254     background: transparent;
255}
256
257.table {
258     display: table;
259}
260
261.cell {
262     display: table-cell;
263     vertical-align: top;
264}
265
266.clear {
267     clear: both;
268}
269
270.lclear {
271     clear: left;
272}
273
274.clearer {
275     height: 1px;
276     font-size: 1px;
277}
278
279
280/* Micro clearfix thx to Nicolas Gallagher */
281
282.clearfix:before,
283.clearfix:after {
284     content: " ";
285     display: table;
286}
287
288.clearfix:after {
289     clear: both;
290}
291
292/*
293.frame-shrink {
294     border: 1px solid #676e78;
295     padding: 0.5em;
296     margin-bottom: 1em;
297     height: 120px;
298     overflow: auto;
299     }
300 */
301
302.box {
303     display: inline-block;
304     vertical-align: top;
305     margin: 0 10px 10px;
306     text-align: left;
307     flex: 1 1 auto;
308}
309
310.box.small {
311//    width: 312px;
312     flex-basis: 312px;
313}
314
315.box.medium {
316//    width: 644px;
317     flex-basis: 644px;
318}
319
320.box.large {
321     width: 100%;
322}
323
324.odd {
325     margin-left: 0;
326}
327
328.even {
329     margin-right: 0;
330}
331
332/* ------------------------------------------------------------------------------------
333                                                                           UN POIL DE MEDIA QUERIES
334------------------------------------------------------------------------------------ */
335
336@media screen and (max-width: $xl-screen) {
337     #main {
338          margin-left: -17em;
339     }
340     #content {
341          margin: 0 0 0 17em;
342     }
343     #main-menu {
344          width: 17em;
345     }
346     #collapser {
347          left: 17em;
348     }
349     h1 {
350          width: 19.5em;
351     }
352     #top-info-blog #switchblog {
353          max-width: 16em;
354     }
355     #top-info-blog a {
356          margin-left: 2em;
357     }
358     #header {
359          display: block;
360          width: 100%;
361          text-align: right;
362     }
363     #header h1,
364     #header h1 a {
365          width: 120px;
366          margin: 0;
367     }
368     h1,
369     #top-info-blog {
370          display: inline-block;
371          vertical-align: top;
372          margin-right: 1em;
373     }
374     #top-info-user {
375          display: block;
376          width: 100%;
377     }
378     .three-boxes,
379     .three-boxes .box,
380     .two-cols .col70,
381     .two-cols .col30 {
382          width: 100%;
383          margin-left: 0;
384          margin-right: 0;
385     }
386}
387
388@media screen and (max-width: $m-screen) {
389     #dashboard-boxes .box.medium,
390     .box.medium,
391     #dashboard-boxes .box.small,
392     .box.small,
393     #dashboard-boxes .box.large,
394     .box.large {
395          width: 95%;
396          margin: 10px auto;
397     }
398}
399
400@media screen and (max-width: $s-screen) {
401     #help-button {
402          height: 26px;
403          width: 26px;
404          margin: 0;
405          overflow: hidden;
406     }
407     #content.with-help #help-button {
408          top: 10em; // 77px;
409     }
410     .one-box,
411     .two-boxes,
412     .box,
413     .two-cols .col {
414          width: 96%;
415          margin-left: 0;
416          margin-right: 0;
417     }
418     #entry-wrapper {
419          float: none;
420          width: 100%;
421          margin-right: 0;
422     }
423     #entry-content {
424          margin-right: 0;
425          margin-left: 0;
426     }
427     #entry-sidebar {
428          width: 100%;
429          float: none;
430     }
431}
432
433@media screen and (max-width: $xs-screen) {
434     #header h1,
435     #header h1 a {
436          width: 42px !important;
437          height: 42px;
438     }
439     #wrapper,
440     #main,
441     #main-menu {
442          display: block;
443          float: none;
444          width: 100%;
445          margin: 0;
446     }
447     #main-menu a {
448          display: block;
449          width: 100%;
450     }
451     #main-menu h3 a {
452          display: inline;
453     }
454     #content,
455     .hide-mm #content {
456          margin: 0;
457     }
458     #collapser {
459          display: none;
460     }
461     #main #content > h2 {
462          margin: 0 -.25em 1em;
463     }
464     #dashboard-boxes .box.medium,
465     .box.medium,
466     #dashboard-boxes .box.small,
467     .box.small,
468     #dashboard-boxes .box.large,
469     .box.large {
470          width: 95%;
471          margin: 10px auto;
472     }
473     .cell,
474     #filters-form .cell {
475          display: inline-block;
476          vertical-align: bottom;
477     }
478     .pseudo-tabs li {
479          display: block;
480          float: left;
481          width: 50%;
482     }
483}
484
485@media screen and (max-width: $xxs-screen) {
486     #top-info-blog label,
487     .nomobile {
488          display: none;
489     }
490     #top-info-blog {
491          margin-bottom: .5em;
492          max-width: 75%;
493     }
494     #top-info-blog select {
495          margin-bottom: .5em;
496     }
497     #content.with-help #help-button {
498          top: 10em; // 120px;
499          right: 28rem; // 20.5em;
500     }
501     #content.with-help #help {
502          width: 28rem;
503     }
504     p.top-add {
505          margin-bottom: .5em;
506     }
507     .part-tabs ul {
508          margin: 1em 0;
509     }
510     .part-tabs li a {
511          display: block;
512          width: 100%;
513     }
514     #icons p {
515          width: 9em;
516     }
517     .media-item {
518          width: 90%;
519     }
520     #theme-new,
521     #theme-activate,
522     #theme-deactivate {
523          margin-left: 0;
524          margin-right: 0;
525     }
526     .box.current-theme {
527          margin: 5px;
528          width: 100%;
529     }
530     .current-theme .module-sshot img {
531          margin: 0;
532          float: none;
533          max-width: 100%;
534     }
535     table .maximal {
536          min-width: 14em;
537     }
538     .pseudo-tabs li {
539          display: block;
540          width: 100%;
541          float: none;
542     }
543}
Note: See TracBrowser for help on using the repository browser.

Sites map