3289d9422829a1a44df601bcdc0a7461528f144c
[snf-cloudcms] / cloudcms / static / cloudcms / less / styles.less
1 @import "../less/bootstrap.less";
2 @import "../less/django_forms.less";
3 @import "../less/tables.less";
4 @import "../less/xtra.less";
5 @import "../less/colorbox.less";
6 @import "../less/resources.less";
7
8
9 // mixins
10
11 .border-box {
12     -moz-box-sizing: border-box;
13     -webkit-box-sizing: border-box;
14     box-sizing: border-box;
15     *behavior: url(boxsizing.htc);
16 }
17
18 .clearme { .clearfix() }
19
20 @verticalSpacing: @gridGutterWidth/1.5;
21 @gradCol: #ddd;
22 body {
23     #font.main();
24     font-size: 12px;
25 }
26
27 .topbar {
28     background-color: @shadowColor;
29     .head {
30         float: left;    
31             padding: @verticalSpacing/2-5;
32     }
33     .links {
34         .clearfix();
35         a {
36             color: @black;
37             text-decoration: none;
38             display: block;
39             float: left;
40             margin-left: 10px;
41             padding: @verticalSpacing/2+1;
42
43             &:hover {
44                 background-color: lighten(@black, 10%);
45                 color: @white;
46             }
47         }
48
49         float: right;    
50     }
51 }
52
53 // default link styles
54 section a, p a, form a, .section a, .styledlinks a, a.styled {
55     color: @black;
56     text-decoration: none;
57     border-bottom: 1px solid @linkColor;
58
59     &:hover {
60         color: @linkColor;
61     }
62
63     &.noborder {
64         border: none;   
65     }
66
67     em {
68         color: @blue;    
69     }
70 }
71
72 a.simple {
73     border: none;
74
75 }
76 a.action {
77     color: @linkColor;
78     border-bottom: none;
79 }
80
81 a img {
82     border-bottom: none;
83 }
84
85 // body borders
86 .content-border {
87     border-right: 1px solid @mainBorderColor;
88     border-left: 1px solid @mainBorderColor;
89 }
90
91 .hidden {
92     display: none !important;
93 }
94
95 // container sizing
96 .container, .topbar, .footer {
97     .fixed-container();
98     .content-border();
99     padding: 0 @siteWhiteSpace;
100 }
101
102 .container {
103     padding-bottom: @siteWhiteSpace;
104     background-color: @white;
105 }
106
107 .topbar {
108 }
109
110
111 div.header {
112     position: relative;
113     margin-top: 2.5*@verticalSpacing;
114     margin-bottom: @verticalSpacing;
115     h1 {
116         color: @shadowColor;
117         display: inline;
118         font-size: 2.3em;
119         border-bottom: 1px solid @shadowColor;
120         padding-bottom: 3px;
121     }
122 }
123 .mainlogo {
124     height: 36px;
125
126     h1 { height: 36px }
127     img {
128         margin-left: -10px;
129     }
130 }
131
132 .footer {
133     border-bottom: 1px solid @mainBorderColor;
134     border-top: 1px solid lighten(@mainBorderColor, 15%);
135     padding-top: @verticalSpacing;
136     padding-bottom: @verticalSpacing;
137 }
138
139 ul.inline {
140     .clearfix();
141     li {
142         display: block;    
143         float: left;
144         margin-right: 1em;
145     }
146 }
147
148 .mainnav.quicknav {
149     position: absolute;
150     right: 0;
151     top: -2.6*@verticalSpacing;
152     margin:0;
153
154     li {
155         margin-right:0;
156         margin-left: 1em;
157     }
158 }
159
160 .navigation {
161     height: 83px;    
162     position: absolute;
163     right: -15px;
164     top: -23px;
165 }
166
167 .mainnav {
168     font-size: 1.3em;
169     
170     &.subnav {
171         margin-bottom: -@verticalSpacing;
172         li {
173             margin-top: 0.4*@verticalSpacing;
174             float: right;
175         }
176     }
177
178     li {
179         margin-top: 2*@verticalSpacing;
180     }
181
182     li.active {
183         a {
184             /*border-bottom: 1px solid @linkColor;*/
185             border-bottom: none;
186             color: @linkColor;
187         }
188     }
189     a {
190         color: @black;
191         text-decoration: none;
192
193         &:hover {
194             border-bottom: 1px solid @linkColor;
195         }
196
197         &.active, &:active {
198             border-bottom: 1px solid @linkColor;
199             color: @linkColor;
200         }
201     }
202 }
203
204 .bottom-section {
205     .clearfix();
206
207     .section {
208         img {
209             width: 200px;    
210         }
211     }
212 }
213
214 .top-section {
215     .clearfix();
216 }
217
218 div.page {
219     .makeRow();
220     margin-top: 5*@verticalSpacing;
221     font-size: 1.1em;
222     .page-inner {
223         position: relative;    
224     }
225 }
226
227 // columnlayout
228 .maincol {
229     position: relative;
230     .makeColumn(5);
231     
232     &.wide {
233         .makeColumn(6);    
234     }
235
236     &.full {
237         .makeRow();
238         margin-left: 0;
239         .makeColumn(10);
240     }
241
242     .nextlink {
243          margin-top: 60px;
244          text-align: right;
245          float: right;
246          margin-right: 50px;
247          font-size: 1.1em;
248     }   
249
250     .content-bottom { position: relative; .clearfix(); }
251 }
252
253 .backlink {
254     margin: 30px 0;    
255 }
256
257 .appbar {
258     height: 30px;
259     background-color: @blue;
260 }
261
262 .rightcol {
263     .offset(6.5);
264     .columns(4);
265
266     &.narrow {
267         .offset(7.5);
268         .columns(3);    
269     }
270     input[type=text], input[type=password] {
271         width: 3*@gridColumnWidth + 4*@gridGutterWidth + 5;    
272     }
273 }
274
275 /* generic form styles */
276 input, textarea, .form-widget {
277     background-color: @white;
278     color: @gray;
279     border-color: @black;
280 }
281
282 #forms {
283     .input, input {
284         #font.main();
285         border: 1px solid @gray;
286         height:21px;
287         display: inline-block;
288         margin-bottom: -1px;
289         padding: 0.8em;
290         padding-left: 1.5em;
291         z-index: 2;
292         &:focus {
293             position: relative;
294             border: 1px solid #000;
295             z-index: 100;
296
297             label {
298                 z-index: 300;    
299             }
300         }
301     }
302 }
303
304 .altcol {
305     background-color: @altColor !important;
306
307     &:hover {
308         background-color: @linkColor !important;
309     }
310 }
311
312 .section {
313     
314     em {
315         color: @blue;
316     }
317
318     &.positioned {
319         margin-bottom: 0;
320         .content {
321             .makeColumn(4);
322         }
323
324         img {
325         }
326
327         &.withimg {
328             .img {
329                 .makeColumn(4);
330             }
331
332             img {
333                 float: left;    
334             }
335         }
336         
337         h3 {
338             font-size: 1.2em;
339             margin-bottom: @verticalSpacing;    
340         }
341
342         .text {
343             color: @black;    
344         }
345     }
346
347     margin-bottom: 3*@verticalSpacing; 
348
349     .left, .right {
350         width: 50%;
351         float: left;
352     }
353
354     &.imagelist {
355         margin-top: 2em;
356         .clearfix();
357         img {
358             float: left;    
359             margin-right: 4em;
360             vertical-align: middle;
361         }    
362     }
363 }
364
365 input[readonly=true] {
366     background-color: #ddd;
367     color: darken(#ddd, 50%);
368 }
369
370 form.withlabels {
371     label {
372         width: 3*@gridColumnWidth + 2*@gridGutterWidth;
373         display: block;
374         float: left;
375         padding-top: 1em;
376     }
377
378     input[type=text], input[type=password], textarea {
379         width: 3*@gridColumnWidth + 2*@gridGutterWidth;
380
381         &.long {
382             width: 3*@gridColumnWidth + 2*@gridGutterWidth;
383         }
384     }
385 }
386
387
388 .login-section {
389     a.button {
390         margin-bottom: 0.2*@gridColumnWidth;    
391         
392         &:last-child {
393             margin-bottom: none;    
394         }
395
396         &.withicon {
397             background-repeat: no-repeat;
398             background-position: 15px 50%;
399             padding-left: 40px;
400         }
401     }    
402
403     &.loggedin {
404         padding-bottom: 0 !important;
405         background-image: none !important;
406     }
407 }
408
409
410 @errorColor: lighten(@red, 30%);
411 // forms
412 form {
413     
414     &.login {
415         margin-bottom: 1.5*@verticalSpacing; 
416     }
417
418     h2 {
419         color: @black;
420         margin-bottom: @verticalSpacing;
421         font-size: 1.1em;
422
423         span {
424             padding-bottom: 3px;
425         }
426     }
427
428     .form-row {
429         min-height: 2*@verticalSpacing;
430         position: relative;
431         &.submit {
432             margin-top: 1.5*@verticalSpacing;
433         }
434
435         .extra-link {
436             color: @gray;
437             text-decoration: none;
438             border: none;
439             font-size: 0.8em;
440             margin-top: 1.3em;
441             float: right;
442         }
443
444         label {
445             font-size: 1.1em;    
446         }
447     }
448     
449     &.innerlabels label { 
450         position: absolute;
451         top: 1.1em;
452         left: 1.5em;
453         color: #aaa;
454     }
455
456     &.innerlabels p {
457         position: relative;    
458     }
459
460     textarea, input.text, input[type="text"], input[type="password"] {
461         #forms.input();
462     }
463
464     input.submit, input[type="submit"] {
465         .button();
466     }
467
468     
469     textarea {
470         height: 200px;
471         width: 350px !important;
472     }
473     .with-errors {
474         input, textarea, select {
475             color: @red;
476         }
477         label {
478             color: @errorColor;
479         }
480     }
481 }
482
483 .form-error {
484     background-color: @red;
485     color: #fff;
486     font-size: 0.8em;
487     padding: 5px 5px;
488 }
489
490 .form-errors.all {
491     .form-error {
492         position: relative;
493         border-radius: 0;
494         margin-bottom: 1.3em;
495         padding: 0.5em;
496     }
497 }
498
499 div.form-stacked {
500     margin-bottom: 4em;
501 }
502 // content types
503
504 .rightcol .section {
505     background-image: url("../images/dashed_border.png");
506     background-repeat: repeat-x;
507     background-position: left bottom;
508     padding-bottom: 2*@verticalSpacing;
509     margin-bottom: 2*@verticalSpacing;
510
511 }
512
513 .section {
514     h2 {
515         font-size: 1.1em;
516         line-height: 1.3em;
517         margin-bottom: 1.5*@verticalSpacing;    
518
519         a {
520             color: #4085A6;
521             border: none;
522             line-height: 1.3em;
523         }
524     }
525
526     h3 {
527         font-size: 1.1em;    
528         line-height: 1.3em;
529         margin-bottom: 1.5*@verticalSpacing;    
530     }
531
532     p {
533         line-height: 1.7em;    
534     }
535
536     .section-img {
537         margin-bottom: 1*@verticalSpacing;    
538     }
539 }
540
541
542 // page messages
543 .messages {
544     .makeColumn(10);
545
546     margin: 2em 0;
547     background-color: #ddd;
548     margin-left: 0;
549     font-size: 1.1em;
550     li {
551         padding: 1em;    
552
553         &.success { background-color: @green; color: @white }
554         &.error { background-color: @red; color: @white }
555         &.warning { background-color: #AF6906; color: @black }
556     }
557
558     .warning {
559         color: @white !important;   
560         a {
561             color: inherit;
562             font-weight: bold;
563         }
564     }
565
566 }
567
568 // accounts specific styles
569 .service-desc {
570     margin-top: 4em;    
571
572 }
573
574
575 // invitations table
576 table {
577
578     td.consumed {
579         color: @red;
580     }
581
582     tr.consumed {
583         td.consumed {
584             color: @green;    
585         }
586     }
587 }
588
589
590 .row { .makeRow() }
591
592 // footer
593 .footer {
594     .clearfix();
595     color: lighten(@gray, 20%);
596     .transit();
597
598     a { .transit() }
599
600     &:hover {
601         color: @gray !important;
602         a {
603             color: @gray !important;
604         }
605     }
606
607     a {
608         color: lighten(@gray, 20%);    
609         text-decoration: none;
610
611         &:hover {
612             color: #000 !important;
613         }
614     }
615
616     li {
617         margin-bottom: @verticalSpacing/2;
618
619         &.header {
620             margin-bottom: @verticalSpacing;    
621         }
622     }
623
624     .col {
625         .makeColumn(4);
626         &:last-child, &.last {
627             width: 140px;
628             margin-right:0;
629         }
630     }
631     
632     .top.row, .last.row {
633         .makeRow();
634         margin: 20px 0;
635
636         .col {
637             .makeColumn(4);    
638
639             &.first {
640                 margin-left: 0 !important;    
641             }
642             &.last {
643                 .makeColumn(2);    
644             }
645         }
646     }
647     .top.row {
648         margin-top: 0;
649     }
650     
651     .last.row { 
652         text-align: left; 
653         font-size: 0.8em;
654         margin-bottom: 0;
655     }
656
657     .bottom.row {
658         .col {
659             .makeColumn(2);    
660             &:last-child, &.last {
661                 width: 140px;
662                 margin-right:0;
663             }
664         }
665     }
666 }
667
668
669 /*pagination*/
670 .pagination {
671     a.page {
672         display: inline !important;
673
674     }    
675 }
676
677 /*blog styles*/
678 .blog-entries {
679
680 }
681
682 .blog-entry {
683
684     .section();
685     .clearfix();
686     margin-bottom: 2*@verticalSpacing;    
687
688     .title {
689         margin-bottom: 1em;    
690         font-size: 1.1em;
691         line-height: 1.4em;
692     }    
693
694     .media {
695         img {
696             border: 1px solid @gray;    
697         }    
698     }
699     
700     .intro-content, .content {
701         margin-top: @verticalSpacing;
702
703         object {
704             margin: @verticalSpacing 0;    
705         }
706     }
707
708     .entry-info {
709         font-size: 0.7em;
710         margin-top: @verticalSpacing;    
711     }
712
713     &.single {
714         .entry-info {
715             margin-top: 0;
716             margin-bottom: @verticalSpacing;
717         }    
718     }
719 }
720
721 .section.twitter-feed {
722     
723     font-size: 1.1em;
724     .tweet {
725         &:last-child { margin-bottom:0; padding-bottom:0; border-bottom: none }
726         line-height: 1.3em;
727         font-size: 0.9em;
728         margin-bottom: @verticalSpacing;
729         color: @gray;
730
731         .date {
732             display: block;
733             font-size: 0.7em;
734             a {
735                 text-decoration: none !important;
736                 border: none;
737             }
738         }
739     }
740 }
741
742 .pagination .page {
743     margin-left: 0;    
744 }
745
746
747 .entry-list {
748     
749     .since {
750         font-size: 0.8em;    
751     }
752
753     .title {
754         margin-bottom: 1em;    
755     }
756
757     .content, .text {
758         margin-bottom: 2em;
759         font-size: 0.8em;
760     }
761 }
762
763
764 .initial_hidden {
765     display: none;    
766 }
767
768  
769 /* recaptcha */
770 #recaptcha_widget_div {
771     margin-top: 10px;
772     margin-left: -4px;
773
774     #recaptcha_instructions_image {
775         font-size: 0.8em;
776         margin-bottom: 10px;
777         display: block !important;
778     }
779
780     th, td {
781         line-height: 1;    
782     }
783 }
784
785 .checkbox-widget.checked {
786     background-color: #f00;
787     background-image: url("../images/checkbox.png");
788     background-position: 50% 50%;
789 }
790
791 .checkbox-widget {
792     border: 1px solid @gray;
793     width: 25px;
794     height: 25px;
795     display: block;
796     float: left;
797     cursor: pointer;
798     margin-top: @verticalSpacing/2 - 2;
799 }
800
801
802