Statistics
| Branch: | Tag: | Revision:

root / snf-cyclades-app / synnefo / ui / new_ui / ui / sass / _common.scss @ bffd1e41

History | View | Annotate | Download (12.8 kB)

1
/* Table of Contents
2

    
3
  - Clearfix
4
  - Mixins
5
  - Buttons and Links
6
  - Layout 
7
  - Header
8
  - Actions Bar
9
  - Icon Navigation
10
  - Top Info
11
  - Progress Bar
12
  - Responsive
13
  - Scroll Bar
14
  - Images from sprites
15

    
16
 */
17

    
18
/* Clearfix -------------------------------------------- */
19

    
20
.clearfix {
21
    zoom:1;
22
    &:before, &:after {
23
        content: "\0020";
24
        display: block;
25
        height: 0;
26
        overflow: hidden;
27
    }
28
    &:after {
29
        clear: both;
30
    }
31
}
32

    
33
/* Mixins ----------------------------------------------- */
34

    
35
@mixin marginPaddingZero() {
36
	margin: 0;
37
	padding: 0;
38
}
39
 
40

    
41
// Establishes the prequisits for sprite with background-image.
42
// Background-position for normal and hover states need to 
43
// be declared separetely
44
@mixin sprite($image, $width, $height){
45
	background:url($image) no-repeat center center;
46
	width: $width;
47
	height:$height;
48
	display: inline-block;
49
	text-indent: -2000px;
50
	overflow: hidden;
51

    
52
}
53

    
54
// Transition for css properties
55
@mixin transition($transition-property, $transition-time, $method) {
56
	-webkit-transition: $transition-property $transition-time $method;
57
	-moz-transition: $transition-property $transition-time $method;
58
	-ms-transition: $transition-property $transition-time $method;
59
	-o-transition: $transition-property $transition-time $method;
60
	transition: $transition-property $transition-time $method;
61
}
62

    
63
// Box-shadow property. For no box-shadow use box-shadow(none)
64
@mixin box-shadow($shadows...) {
65
  -moz-box-shadow: $shadows;
66
  -webkit-box-shadow: $shadows;
67
  box-shadow: $shadows;
68
}
69

    
70
@mixin placeholder {
71
	&.placeholder { @content; }
72
	&:-moz-placeholder { @content; }
73
	&::-moz-placeholder { @content; }
74
	&::-webkit-input-placeholder { @content; }
75
}
76

    
77
// keyframes mixin
78
@mixin keyframes($name) {
79
  @-webkit-keyframes #{$name} {
80
    @content;
81
  }
82
  @-moz-keyframes #{$name} {
83
    @content;
84
  }
85
  @-ms-keyframes #{$name} {
86
    @content;
87
  }
88
  @keyframes #{$name} {
89
    @content;
90
  }
91
}
92

    
93

    
94
// style .lt-bar
95

    
96
@mixin ltbar($width:$lt-bar-width, $bgcolor: #fff ){
97
	position: fixed;
98
	width: $width;
99
	left:50%;
100
	top:$header-height + $bar-height;
101
	padding:15px 10px;
102
	margin-left:-($row-width - 2*$main-padding-horizontal)/2;
103
	@include box-shadow(3px -2px 8px #ccc);
104
	background: $bgcolor;
105
	z-index: 3;
106
}
107

    
108
@mixin square($side, $bgcolor) {
109
	width: $side;
110
	height: $side;
111
	background-color: $bgcolor;
112
	display: inline-block;
113
}
114

    
115
@mixin circle($radius, $bgcolor: $primary-color) {
116
	display:inline-block;
117
    -webkit-border-radius: 999px;
118
    -moz-border-radius: 999px;
119
    border-radius: 999px;
120
    width: $radius * 2;
121
    height: $radius * 2;
122
    background-color: $bgcolor;
123
    behavior: url(PIE.htc);
124
}
125

    
126
@mixin stateColor($color) {
127
	.img-wrap {
128
		.snf-pc-full,
129
		.snf-network-full, .snf-font {
130
			color:$color;
131
		}
132
	}
133
	.status {
134
		color: $color;
135
	}
136
}
137

    
138
/* Circle and Tags ----------------------------------------------- */
139

    
140

    
141
.tags {
142
	text-align:center;
143
	.tag {
144
		@include circle(6px);
145
		margin:0 3px;
146
		&.tag1 { background-color:$error-color;}
147
		&.tag2 { background-color:$success-color;}
148
		&.tag3 { background-color:$alert-color;}
149
	}
150
}
151

    
152

    
153
/* Buttons and Links ----------------------------------------------- */
154

    
155

    
156
a {
157
	color:$link-color;
158
	&:hover, &.current, &.active  {
159
		color:$link-color-hover;
160
		@include transition(background, 300ms, ease-out);
161
	}
162

    
163
	
164
}
165

    
166
.inactive {
167
	color:$inactive-color!important;
168
	&:hover {
169
		color:$inactive-color;
170
		cursor:default;
171
	}
172
}
173

    
174
.btn1 {
175
	border:1px solid $link-color;
176
	color:$link-color;
177
	display:inline-block;
178
	height:$btn-height;
179
	text-align:center;
180
	font-size:emCalc(12px);
181
	&:hover,
182
	&:focus {
183
		color: $link-color;
184
		span {
185
			border-color: $link-color;
186
		}
187
	}
188
	&.current {
189
		span {
190
			background-color: $link-color;
191
		}
192
		color:#fff;
193
	}
194
	span {
195
		border: 1px solid transparent;
196
		display: block;
197
		padding:0 20px;
198
		line-height:$btn-height - 4px;
199
		height:100%;
200

    
201
	}
202
}
203

    
204
.btn2 {
205
	@extend .btn1;
206
	color:$secondary-color;
207
	background:#fff;
208
	border-color:$secondary-color;
209
	&:hover,
210
	&.current,
211
	&:focus {
212
		background:transparent;
213
		border-color:#fff;
214
	}
215
}
216

    
217
.btn3 {
218
	@extend .btn1;
219
	color:#fff; 
220
	border-color:#fff;
221
	&:hover, 
222
	&.current,
223
	&:focus {
224
		color:$secondary-color;
225
		background:#fff;
226
		border-color:#fff;
227
	}
228
}
229

    
230

    
231
.btn4 {
232
	border:1px solid white;
233
	color:white;
234
	display:inline-block;
235
	height:$btn-height;
236
	text-align:center;
237
	font-size:emCalc(12px);
238
	&:hover,
239
	&:focus {
240
		color: #fff;
241
		span {
242
			border-color: white;
243
		}
244
	}
245
	&.current {
246
		span {
247
			background-color: white;
248
		}
249
		background:white;
250
		color:$secondary-color;
251
	}
252
	span {
253
		border: 1px solid transparent;
254
		display: block;
255
		padding:0 20px;
256
		line-height:$btn-height - 4px;
257
		height:100%;
258

    
259
	}
260
}
261

    
262
.btn5 {
263
	border:1px solid white;
264
	color:white;
265
	display:inline-block;
266
	height:$btn-height;
267
	text-align:center;
268
	font-size:emCalc(12px);
269
	&:hover,
270
	&:focus {
271
		span {
272
			border-color: white;
273
		}
274
	}
275
	&.current {
276
		span {
277
			background-color: white;
278
		}
279
		background:white;
280
		color:$secondary-color;
281
	}
282
	span {
283
		border: 1px solid transparent;
284
		display: block;
285
		padding:0 20px;
286
		line-height:$btn-height - 4px;
287
		height:100%;
288

    
289
	}
290
}
291

    
292
.btn-img {
293
	@extend .btn1;
294
	border-color:$secondary-color;
295
	&:hover,
296
	&:focus {
297
		background:transparent;
298
	}
299
	a {
300
		img,span {
301
			margin-left:5px;
302
		}
303
	}
304
}
305

    
306

    
307
/* Layout ----------------------------------------------- */
308
html,body {
309
	height:100%;
310
}
311

    
312
body {
313
	padding-top:$header-height+$bar-height;
314
}
315

    
316
.body-wrapper {
317
	min-height:100%;
318
}
319

    
320
.main {
321
	padding:0 $main-padding-horizontal;
322
}
323

    
324
/* Header ----------------------------------------------- */
325

    
326
.header {
327
	position:fixed;
328
	top:0;
329
	left:0;
330
	right:0;
331
	width:100%;
332
	height:$header-height;
333
	line-height:$header-height;
334
	padding:0 $header-padding-horizontal;
335
	background:white;
336
	z-index:100;
337
	.icons-nav {
338
		position:absolute;
339
		left:$header-padding-horizontal;
340
		height:$header-height;
341
		line-height:$header-height;
342
		top:0;
343
		li {
344
			line-height: $header-height;
345
		}
346
	}
347
	.logo {
348
		text-align: center;
349
		a {
350
			position: relative;
351
			// top:-5px;
352
		}
353
		img {
354
			height: 40px;
355
		}
356
		h2 {
357
			display: none;
358
			margin:0;
359
			font-size: 1em;
360
			color:$primary-color;
361
			font-weight: normal;
362
		}
363
	}
364
	.login {
365
		position:absolute;
366
		top:25px;
367
		right:$header-padding-horizontal;
368

    
369
		.wrap {
370
			$wr-padd-top:12px;
371
			border:1px solid $body-font-color;
372
			background: white;
373
			font-size:emCalc(12px);
374
			padding:$wr-padd-top 30px;
375
			line-height:100%;
376
			ul {
377
				padding:0;
378
				margin:0;
379
				list-style: none outside none;
380
				display: none;
381
				li {
382
					list-style: none outside none;
383
					padding:0;
384
					padding-top:$wr-padd-top;
385
				}
386
			}
387
		}
388
	}
389
	
390
}
391

    
392
/* Actions Bar ----------------------------------------------- */
393

    
394
.actions-bar {
395
	position:fixed;
396
	left:0;
397
	top:$header-height;
398
	width:100%;
399
	z-index:15;
400
	text-align:center;
401
	height:$bar-height;
402
	line-height:$bar-height;
403
	background-color: $gray-4;
404
	h2 {
405
		float: left;
406
		margin:0 0 0 15px;
407
		font-size: emCalc(12px);
408
		line-height: $bar-height;
409
		font-weight: normal;
410
		a {
411
			&:after {
412
				content: " >";
413
			}
414
		}
415
	}
416
	.filter-menu {
417
		float:right;
418
		position: relative;
419
		.filter {
420
			padding: 0 10px;
421
			font-size:emCalc(12px);
422
			position: relative;
423
			top:-1px;
424
		}
425
		.options {
426
			display: none;
427
			position: absolute;
428
			right: 0;
429
			top:$bar-height;
430
			width: 120px;
431
			list-style-type: none;
432
			padding: 10px 15px 15px;
433
			text-align: left;
434
			margin:0;
435
		}
436
		&.current {
437
			.options {
438
				background-color: lighten($primary-color,10%);
439
				display: inline-block;
440
				a {
441
					color: white;
442
				}
443
			}
444
		}
445

    
446

    
447
	}
448
	
449
	.row {
450
		position: relative;
451
		height: $bar-height;
452
	}
453

    
454
	.hd-search {
455
		$icon-dim :24px;
456
		width: $icon-dim;
457
		overflow:hidden;
458
		position:relative;
459
		float: right;
460
		height: $bar-height;
461
		margin-right: -6px;
462
		@include transition(width, 0.3s, linear);
463
		-webkit-backface-visibility: hidden;
464
		.hd-icon-search {
465
			display: block;
466
			width: $bar-height;
467
			height: $bar-height;
468
			line-height: $bar-height;
469
			float: right;
470
			color: $link-color;
471
			&:hover {
472
				color: $link-color-hover;
473
				cursor:pointer;
474
			}
475
			z-index:1;
476
			position: relative;
477
			background: $gray-4;
478
		}
479
		.hd-search-input {
480
			border: transparent;
481
			background-color: white;
482
			padding: 0 10px;
483
			width: 160px;
484
			font-size: emCalc(10px);
485
			box-shadow: none;
486
			height:0.7* $bar-height;
487
			line-height: 0.7* $bar-height;
488
			position: absolute;
489
			top:4px;
490
			left:0;
491
		}
492
		&.hd-open {
493
			width: 190px;
494
		}
495
	}
496
	.rt-actions {
497
		float: right;
498
		margin-right:15px;
499
		.current, a:hover {
500
			color: $secondary-color;
501
		}
502
		a {			
503
			float: left;
504
			span {
505
				position: relative;
506
				&.snf-listview {
507
					font-size: emCalc(18px);
508
				}
509
				&.snf-gridview {
510
					font-size: emCalc(18px);
511
				}
512
				&.snf-trash-outline {
513
				}
514
				&.snf-folder-create-outline {
515
					font-size: emCalc(18px);
516
				}
517
				&.snf-refresh-outline {
518
					font-size: emCalc(12px);
519
					top: -2px;
520
				}
521
			}
522
			&:not(:last-child) {
523
				margin-right: 10px;
524
			}
525
		}
526
		.single {
527
			@include square(12px , $link-color);
528
			margin-top: 9px;
529
			&.current,
530
			&:hover {
531
				background-color: $secondary-color;
532
			}
533
		}
534
		
535
	}
536
}
537

    
538
.no-vm {
539
	.actions-bar {
540
		.rt-actions, .hd-search, .filter {
541
			display: none;
542
		}
543
	}
544
}
545

    
546
/* Icons Navigation ----------------------------------------------- */
547

    
548
.icons-nav {
549
	@include marginPaddingZero();
550
	li {
551
		display: inline-block;
552
		margin-right:$icons-nav-margin-horizontal;
553
		font-size: emCalc(26px);
554
		line-height: 1em;
555
	}
556
}
557

    
558

    
559

    
560

    
561
/* Top info  ----------------------------------------------- */
562

    
563
.top-info {
564
	padding:50px 100px;
565
	position: relative;
566
	z-index:10;
567
	display:none;
568
	.close {
569
		position: absolute;
570
		right:$header-padding-horizontal;
571
		top:50px;
572
		@include sprite('../images/info-close.png', 31px, 30px);
573
	}
574
}
575

    
576

    
577
.info.error {
578
	background:$error-color;
579
	color:#fff;
580
}
581

    
582

    
583
.info.alert {
584
	background:$alert-color;
585
	color:#fff;
586
}
587

    
588
.info.warning {
589
	background:$primary-color;
590
	color:#fff;
591
}
592

    
593
.info.success {
594
	background:$success-color;
595
	color:#fff;
596
}
597

    
598
.border-bottom-style1 {
599
	padding-bottom:20px;
600
	margin-bottom:20px;
601
	border-bottom:1px dashed $primary-color;
602
}
603

    
604

    
605
/* Progress Bar ----------------------------------------------- */
606

    
607
.progress-bar {
608
	position: fixed;
609
	bottom:0;
610
	left:0;
611
	border-top:1px solid $secondary-color;
612
	width:100%;
613
	background:#fff;
614
	padding:20px 0 20px 310px;
615
	color:$primary-color;
616
	span.counter {
617
		display: inline-block;
618
		margin-right:20px;
619
		float:left;
620
	}
621
	div.progress-wrap {
622
		display:inline-block;
623
		float:left;
624
		width:40%;
625
		margin-right:60px;
626
		.progress {
627
			position: relative;
628
			top:2px;
629
		}
630
	}
631
	span.more {
632
		display: inline-block;
633
	}
634
}
635

    
636
.storage-progress {
637
	display: none;
638
	position: fixed;
639
	bottom: 0;
640
	left: 0;
641
	right: 0;
642
	background: $turquoise-1;
643
	color: #fff;
644
	z-index: 50;
645
	overflow-y: auto;
646
	@include transition(background-color, 500ms, linear);
647
	&.ready {
648
		background: $green-1;
649
	}
650
	.wrap {
651
		position: relative;
652
		padding: 10px;
653
	}
654
	.loader {
655
		position: absolute;
656
		height: 5px;
657
		left: 0;
658
		top: 0;
659
		background: $yellow-1;
660
		width: 0%;
661
	}
662
	.summary {
663
		padding-left: $lt-bar-width + $check-w;
664
		margin: 0;
665
		font-size: emCalc(12px);
666
		span {
667
			background-color: #fff;
668
			color: $turquoise-1;
669
			padding: 2px 6px;
670
			margin-right: 10px;
671
			@include transition(opacity, 500ms, linear);
672
			&.animated {
673
				opacity: 0;
674
			}
675
		}
676
	}
677
	.details {
678
		display: none;
679
	}
680
}
681

    
682

    
683
/* Responive ------------------------------------------------ */
684
@media only screen and (max-width: $small-mobile) {
685
}
686

    
687
@media only screen and (max-width: $small-screen) {
688
	body {
689
		padding-top:0
690
	}
691
	.header, .actions-bar {
692
		position:static;
693
		z-index: auto;
694
	}
695
	.actions-bar {
696
		top:2*$header-height;
697
	}
698
	.header {
699
		height: $header-height-responsive;
700
		line-height:50px;
701
		.icons-nav {
702
			position: static;
703
		}
704
	}
705
}
706

    
707
/* Scroll Bar  -------------------------------------------- */
708

    
709
body .jspVerticalBar {
710
	background-color: transparent;
711
	width: 14px;
712
	padding: 1px;
713
	border-left: 1px solid #c2bebe;
714
	border-right: 1px solid #c2bebe;
715
	.jspTrack {
716
		background-color: #e6e5e5;
717
		.jspDrag {
718
			-webkit-border-radius: 5px;
719
			-moz-border-radius: 5px;
720
			border-radius: 5px;
721
			background-color: #c2bebe;
722
		}
723
	}
724
	.jspArrow {
725
		background-color: transparent;
726
		@include sprite('../images/arrows.png', 14px, 14px);
727
		overflow: hidden;
728
		&.jspArrowDown{
729
			background-position: -18px;
730
		}
731

    
732
		&.jspArrowUp {
733
			background-position: 0px;
734
		}
735
	}
736
}
737

    
738
@mixin files-icon($bg-position) {
739
	background: url(../images/file-types.png) no-repeat top left;
740
	background-position: $bg-position;
741
	width: 30px;
742
	height: 35px;
743
	display: block;
744
	margin: 0 auto;
745
}
746
.folder {
747
	background: url(file-types.png) no-repeat top left;
748
	background-position: 0 -165px;
749
	width: 35px;
750
	height: 28px;
751
}
752
/* to put in use
753
.folder-open {
754
	background: url(file-types.png) no-repeat top left;
755
	background-position: 0 --243px;
756
	width: 35px;
757
	height: 28px;
758
}
759
*/
760
.txt {
761
	@include files-icon(0 -486px);
762
}
763
.pdf {
764
	@include files-icon(0 -321px);
765
}
766
.excel {
767
	@include files-icon(0 -85px);
768
}
769
.word {
770
	@include files-icon(0 -571px);
771
}
772
.powerpoint {
773
	@include files-icon(0 -406px);
774
}
775
.ai {
776
	@include files-icon(0 0);
777
}