magic_stylez 0.0.0.27 → 0.0.0.28
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +24 -2
- data/lib/generators/magic_stylez/install_generator.rb +56 -0
- data/lib/magic_stylez/version.rb +1 -1
- data/test/dummy/app/assets/javascripts/views/app/start.jst.eco +43 -15
- data/test/dummy/app/assets/javascripts/views/content/{_box.jst.eco → box.jst.eco} +0 -0
- data/test/dummy/app/assets/javascripts/views/elements/buttons.jst.eco +8 -8
- data/test/dummy/app/assets/javascripts/views/elements/circle_diagram.jst.eco +7 -2
- data/test/dummy/app/assets/javascripts/views/elements/inputs.jst.eco +6 -6
- data/test/dummy/app/assets/javascripts/views/helper/arrow_infos.jst.eco +7 -4
- data/test/dummy/app/assets/javascripts/views/helper/crossed_text.jst.eco +8 -1
- data/test/dummy/app/assets/javascripts/views/helper/divider.jst.eco +12 -5
- data/test/dummy/app/assets/javascripts/views/helper/three_previews.jst.eco +8 -1
- data/test/dummy/app/assets/javascripts/views/icons/glyphicons.jst.eco +8 -1
- data/test/dummy/app/assets/javascripts/views/icons/icomoon.jst.eco +8 -1
- data/test/dummy/app/assets/javascripts/views/icons/magicons.jst.eco +8 -1
- data/test/dummy/app/assets/javascripts/views/icons/olicons.jst.eco +8 -1
- data/test/dummy/app/assets/stylesheets/application.css.scss +1 -3
- data/{vendor/assets/stylesheets/magic → test/dummy/app/assets/stylesheets}/corporate/_colors.scss +28 -22
- data/{vendor/assets/stylesheets/magic → test/dummy/app/assets/stylesheets}/corporate/_fonts.scss +5 -0
- data/{vendor/assets/stylesheets/magic → test/dummy/app/assets/stylesheets}/corporate/_typo.scss +14 -8
- data/{vendor/assets/stylesheets/magic → test/dummy/app/assets/stylesheets}/corporate/_variables.scss +6 -0
- data/test/dummy/app/views/front/_aside.html.erb +3 -1
- data/test/dummy/app/views/front/start.html.erb +49 -27
- data/test/dummy/app/views/templates/fixed-header.html.erb +4 -4
- data/test/dummy/public/html/{fixed-header.html.erb → fixed-header.html} +6 -6
- data/test/dummy/public/html/index.html +65 -45
- data/test/dummy/public/html/{responsive-slidebar.html.erb → responsive-slidebar.html} +2 -2
- data/vendor/assets/stylesheets/corporate/_colors.scss +285 -0
- data/vendor/assets/stylesheets/corporate/_fonts.scss +157 -0
- data/vendor/assets/stylesheets/corporate/_typo.scss +85 -0
- data/vendor/assets/stylesheets/corporate/_variables.scss +640 -0
- data/vendor/assets/stylesheets/magic-min.scss +62 -0
- data/vendor/assets/stylesheets/magic/content/_buttons.scss +25 -1
- data/vendor/assets/stylesheets/magic/content/_forms.scss +25 -0
- data/vendor/assets/stylesheets/magic/content/_inputs.scss +4 -0
- data/vendor/assets/stylesheets/magic/content/_navbar.scss +67 -0
- data/vendor/assets/stylesheets/magic/helper/_divider.scss +48 -20
- data/vendor/assets/stylesheets/magic/layout/_section.scss +33 -32
- data/vendor/assets/stylesheets/magic/lib/_helper.scss +68 -0
- data/vendor/assets/stylesheets/magic/lib/_twbs.scss +4 -4
- metadata +21 -11
@@ -0,0 +1,62 @@
|
|
1
|
+
// load bourbon sass helper
|
2
|
+
@import "bourbon";
|
3
|
+
// load twitter bootstrap
|
4
|
+
@import "magic/lib/twbs";
|
5
|
+
// load bourbon again, to overwriter twbs helpers
|
6
|
+
@import "bourbon";
|
7
|
+
|
8
|
+
// load some basic methods
|
9
|
+
@import "magic/lib/cross_browser";
|
10
|
+
@import "magic/lib/media_querries";
|
11
|
+
// load style helper
|
12
|
+
@import "magic/lib/helper";
|
13
|
+
@import "magic/lib/animation";
|
14
|
+
@import "magic/lib/text";
|
15
|
+
@import "magic/lib/filter";
|
16
|
+
@import "magic/lib/forms";
|
17
|
+
|
18
|
+
|
19
|
+
// load effects
|
20
|
+
@import "magic/effects/shadows"; // (generates no code, when unused)
|
21
|
+
// @import "magic/effects/reflections";
|
22
|
+
|
23
|
+
// load icons
|
24
|
+
// @import "magic/icons/icomoon";
|
25
|
+
// @import "magic/icons/magicons";
|
26
|
+
// @import "magic/icons/orderlifticons";
|
27
|
+
|
28
|
+
|
29
|
+
// load layout helper
|
30
|
+
@import "magic/layout/section";
|
31
|
+
@import "magic/layout/corset";
|
32
|
+
@import "magic/layout/fullpage_table";
|
33
|
+
|
34
|
+
|
35
|
+
// load elements
|
36
|
+
// @import "magic/elements/circle_diagram";
|
37
|
+
|
38
|
+
// load content helper
|
39
|
+
// @import "magic/content/banner";
|
40
|
+
// @import "magic/content/box";
|
41
|
+
// @import "magic/content/buttons";
|
42
|
+
// @import "magic/content/forms";
|
43
|
+
// @import "magic/content/helper";
|
44
|
+
// @import "magic/content/icons";
|
45
|
+
// @import "magic/content/inputs";
|
46
|
+
// @import "magic/content/navbar";
|
47
|
+
// @import "magic/content/panel";
|
48
|
+
// @import "magic/content/pix";
|
49
|
+
|
50
|
+
|
51
|
+
@import "magic/helper/divider";
|
52
|
+
// @import "magic/helper/arrow_hints";
|
53
|
+
// @import "magic/helper/crossed";
|
54
|
+
// @import "magic/helper/dots";
|
55
|
+
// @import "magic/helper/three_previews";
|
56
|
+
|
57
|
+
|
58
|
+
// @import "magic/lists/nav";
|
59
|
+
// @import "magic/content/header";
|
60
|
+
// @import "magic/layout/body";
|
61
|
+
|
62
|
+
|
@@ -10,7 +10,7 @@
|
|
10
10
|
width: auto;
|
11
11
|
width: 100%;
|
12
12
|
// margin: 0 0 10px;
|
13
|
-
padding: 0;
|
13
|
+
margin: 0; padding: 0;
|
14
14
|
& > * {
|
15
15
|
display: table-cell; position: relative;
|
16
16
|
padding: $padding-base-vertical $padding-base-horizontal;
|
@@ -78,6 +78,15 @@
|
|
78
78
|
}
|
79
79
|
}
|
80
80
|
|
81
|
+
// Vertically space out multiple block buttons
|
82
|
+
.btn-block + .btn-block {
|
83
|
+
margin-top: 10px;
|
84
|
+
}
|
85
|
+
.btn-splited + .btn-splited, .btn-splited + .btn-divided, .btn-divided + .btn-splited, .btn-divided + .btn-divided {
|
86
|
+
margin-top: 10px;
|
87
|
+
}
|
88
|
+
|
89
|
+
|
81
90
|
//
|
82
91
|
// Social - Buttons
|
83
92
|
//
|
@@ -174,6 +183,21 @@ $paypal-nice-bottom: darken(#1784cb, 5%);
|
|
174
183
|
@include btn-with-gradient($btn-paypal-color, $paypal-gradient-top, $paypal-gradient-bottom, $btn-paypal-border);
|
175
184
|
}
|
176
185
|
|
186
|
+
.btn-link {
|
187
|
+
color: $link-color !important;
|
188
|
+
background-color: transparent !important;
|
189
|
+
border-color: transparent !important;
|
190
|
+
&:hover,
|
191
|
+
&:focus,
|
192
|
+
&:active,
|
193
|
+
&.active,
|
194
|
+
.open > &.dropdown-toggle {
|
195
|
+
color: $link-hover-color !important;
|
196
|
+
background-color: transparent !important;
|
197
|
+
border-color: transparent !important;
|
198
|
+
background-image: none;
|
199
|
+
}
|
200
|
+
}
|
177
201
|
|
178
202
|
|
179
203
|
|
@@ -171,5 +171,30 @@ form.corset, .form {
|
|
171
171
|
}
|
172
172
|
}
|
173
173
|
|
174
|
+
.form-control + .form-control {
|
175
|
+
margin-top: 10px;
|
176
|
+
}
|
177
|
+
|
178
|
+
|
179
|
+
@include all_form_elements {
|
180
|
+
&.form-control.half { @include horizontal-margin( auto ); width: 50%; }
|
181
|
+
}
|
182
|
+
|
183
|
+
form, .form {
|
184
|
+
|
185
|
+
@include all_form_elements {
|
186
|
+
&.form-control { margin-bottom: 10px; }
|
187
|
+
}
|
188
|
+
.btn-divided, .btn-splited, .btn-block { margin-bottom: 10px; }
|
189
|
+
|
190
|
+
.row > * {
|
191
|
+
margin-bottom: 10px;
|
192
|
+
@include all_form_elements { &.form-control { margin-bottom: 0; } }
|
193
|
+
.btn-divided, .btn-splited, .btn-block { margin-bottom: 0; }
|
194
|
+
}
|
195
|
+
|
196
|
+
}
|
197
|
+
|
198
|
+
|
174
199
|
|
175
200
|
|
@@ -136,6 +136,10 @@ textarea.form-control {
|
|
136
136
|
max-width: 100%;
|
137
137
|
}
|
138
138
|
|
139
|
+
.inpt-splited + .inpt-splited, .inpt-splited + .inpt-divided, .inpt-divided + .inpt-splited, .inpt-divided + .inpt-divided {
|
140
|
+
margin-top: 10px;
|
141
|
+
}
|
142
|
+
|
139
143
|
|
140
144
|
|
141
145
|
// Form control sizing
|
@@ -35,6 +35,69 @@
|
|
35
35
|
|
36
36
|
}
|
37
37
|
|
38
|
+
|
39
|
+
|
40
|
+
.navbar {
|
41
|
+
background: $white;
|
42
|
+
border-color: $main-border-color;
|
43
|
+
|
44
|
+
.corset, .container { background: inherit; }
|
45
|
+
.navbar-collapse { background: inherit; }
|
46
|
+
|
47
|
+
// default hight 50px
|
48
|
+
.navbar-nav {
|
49
|
+
background: inherit;
|
50
|
+
// a:not(.btn) { }
|
51
|
+
& > li > a, & > a {
|
52
|
+
padding: 15px 10px;
|
53
|
+
line-height: 20px;
|
54
|
+
|
55
|
+
&.btn {
|
56
|
+
margin: 9px 5px;
|
57
|
+
@include vertical-padding( 5px );
|
58
|
+
line-height: 20px;
|
59
|
+
&.btn-sm {
|
60
|
+
margin: 11px 5px;
|
61
|
+
@include vertical-padding( 3px );
|
62
|
+
}
|
63
|
+
&.btn-xs {
|
64
|
+
margin: 13px 5px;
|
65
|
+
@include vertical-padding( 1px );
|
66
|
+
}
|
67
|
+
&.btn-lg {
|
68
|
+
margin: 6px 5px;
|
69
|
+
@include vertical-padding( 8px );
|
70
|
+
}
|
71
|
+
}
|
72
|
+
}
|
73
|
+
|
74
|
+
}
|
75
|
+
|
76
|
+
@media (max-width: $grid-float-breakpoint-max) {
|
77
|
+
.corset .navbar-collapse { @include horizontal-margin( -10px ); }
|
78
|
+
}
|
79
|
+
|
80
|
+
&.navbar-xs { @include sized-navbar( 30px ); }
|
81
|
+
&.navbar-sm { @include sized-navbar( 40px ); }
|
82
|
+
&.navbar-lg { @include sized-navbar( 60px ); }
|
83
|
+
&.navbar-xl { @include sized-navbar( 80px ); }
|
84
|
+
|
85
|
+
}
|
86
|
+
|
87
|
+
|
88
|
+
body, #body, #container, .main-content, .main_content {
|
89
|
+
|
90
|
+
&.fixed-nav-xs { padding: 30px 0 0; }
|
91
|
+
&.fixed-nav-sm { padding: 40px 0 0; }
|
92
|
+
&.fixed-nav { padding: 50px 0 0; }
|
93
|
+
&.fixed-nav-lg { padding: 60px 0 0; }
|
94
|
+
&.fixed-nav-xl { padding: 80px 0 0; }
|
95
|
+
|
96
|
+
}
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
38
101
|
@media (max-width: $grid-float-breakpoint) {
|
39
102
|
.navbar {
|
40
103
|
&.navbar-slidebar {
|
@@ -54,6 +117,10 @@
|
|
54
117
|
|
55
118
|
&.fixed-top .navbar-collapse, &.navbar-fixed-top .navbar-collapse {
|
56
119
|
top: 50px;
|
120
|
+
&.navbar-xs { top: 30px; }
|
121
|
+
&.navbar-sm { top: 40px; }
|
122
|
+
&.navbar-lg { top: 60px; }
|
123
|
+
&.navbar-xl { top: 80px; }
|
57
124
|
}
|
58
125
|
}
|
59
126
|
}
|
@@ -1,5 +1,7 @@
|
|
1
1
|
.divider {
|
2
2
|
display: block; position: relative;
|
3
|
+
padding: 0;
|
4
|
+
// margin: floor($line-height-computed / 2) 0;
|
3
5
|
background: inherit;
|
4
6
|
text-align: center;
|
5
7
|
& > * {
|
@@ -11,42 +13,68 @@
|
|
11
13
|
&.dark { background: $dark-bg; }
|
12
14
|
&.main { background: $main-bg; }
|
13
15
|
&.soft { background: $main-bg; }
|
14
|
-
|
15
16
|
}
|
16
17
|
&:after {
|
17
18
|
display: block; position: absolute; content: "";
|
18
19
|
margin: -1px 0 0; padding: 0;
|
19
20
|
top: 50%; height: 0;
|
20
21
|
left: 0; right: 0;
|
21
|
-
border-top: solid 1px #ccc;
|
22
|
-
border-bottom: solid 1px $white;
|
23
22
|
z-index: 1;
|
24
23
|
}
|
25
24
|
}
|
26
25
|
|
26
|
+
hr {
|
27
|
+
display: block; position: relative;
|
28
|
+
// margin: floor($line-height-computed / 2) 0;
|
29
|
+
padding: 0;
|
30
|
+
height: 0;
|
31
|
+
border: none;
|
32
|
+
}
|
33
|
+
|
34
|
+
hr, .divider { margin: $line-height-computed 0; }
|
35
|
+
hr, .divider:after {
|
36
|
+
border-top: solid 1px $main-border-color;
|
37
|
+
border-bottom: solid 1px $white;
|
38
|
+
}
|
39
|
+
|
40
|
+
|
27
41
|
.section {
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
display: block; position: relative;
|
33
|
-
margin: 10px 0; padding: 0;
|
34
|
-
height: 0;
|
35
|
-
border: none;
|
36
|
-
border-top: solid 1px #ccc;
|
42
|
+
|
43
|
+
.divider & > * { background: $main-bg; }
|
44
|
+
hr, .divider:after {
|
45
|
+
border-top: solid 1px $main-border-color;
|
37
46
|
border-bottom: solid 1px $white;
|
38
47
|
}
|
48
|
+
|
49
|
+
|
39
50
|
|
40
51
|
&.dark {
|
41
|
-
|
42
|
-
.divider
|
43
|
-
|
52
|
+
.divider & > * { background: $dark-bg; }
|
53
|
+
hr, .divider:after {
|
54
|
+
border-top: solid 1px $gray;
|
55
|
+
border-bottom: solid 1px $white;
|
56
|
+
}
|
57
|
+
}
|
44
58
|
&.bright {
|
45
|
-
background: $
|
46
|
-
.divider
|
59
|
+
.divider & > * { background: $bright-bg; }
|
60
|
+
hr, .divider:after {
|
61
|
+
border-top: solid 1px $main-border-color;
|
62
|
+
border-bottom: solid 1px $white;
|
63
|
+
}
|
64
|
+
}
|
65
|
+
&.brand {
|
66
|
+
.divider & > * { background: $brand-bg; }
|
67
|
+
hr, .divider:after {
|
68
|
+
border-top: solid 1px $main-border-color;
|
69
|
+
border-bottom: solid 1px $white;
|
70
|
+
}
|
47
71
|
}
|
48
|
-
&.
|
49
|
-
background: $
|
50
|
-
.divider
|
72
|
+
&.soft {
|
73
|
+
.divider & > * { background: $soft-bg; }
|
74
|
+
hr, .divider:after {
|
75
|
+
border-top: solid 1px $main-border-color;
|
76
|
+
border-bottom: solid 1px $white;
|
77
|
+
}
|
51
78
|
}
|
79
|
+
|
52
80
|
}
|
@@ -8,10 +8,11 @@
|
|
8
8
|
z-index: 1;
|
9
9
|
font-size: $font-size-base;
|
10
10
|
.corset, .container { background: inherit; }
|
11
|
+
|
11
12
|
|
12
|
-
h1, h2, h3, h4, h5, h6, p {
|
13
|
-
|
14
|
-
}
|
13
|
+
// h1, h2, h3, h4, h5, h6, p {
|
14
|
+
// margin-bottom: 10px;
|
15
|
+
// }
|
15
16
|
|
16
17
|
&.shine-top {
|
17
18
|
overflow: hidden;
|
@@ -57,39 +58,24 @@
|
|
57
58
|
&.fatter { padding-top: 120px; padding-bottom: 120px; }
|
58
59
|
|
59
60
|
|
60
|
-
|
61
|
+
@include all_form_elements { background: $white; }
|
61
62
|
|
62
|
-
.divider {
|
63
|
-
|
64
|
-
span { background: $main-bg; }
|
65
|
-
}
|
66
|
-
hr {
|
67
|
-
display: block; position: relative;
|
68
|
-
margin: 10px 0; padding: 0;
|
69
|
-
height: 0;
|
70
|
-
border: none;
|
71
|
-
border-top: solid 1px #ccc;
|
72
|
-
border-bottom: solid 1px $white;
|
73
|
-
}
|
74
|
-
|
75
63
|
&.dark {
|
76
|
-
|
77
|
-
.
|
78
|
-
|
79
|
-
input.half, textarea.half, textarea { background: $white; }
|
80
|
-
@include all_inputs {
|
81
|
-
background: $white;
|
82
|
-
}
|
64
|
+
background: $dark-bg;
|
65
|
+
.three-previews .preview { border-color: $main-border-color; }
|
66
|
+
@include all_form_elements { background: $white; }
|
83
67
|
}
|
84
68
|
&.bright {
|
85
|
-
background: $
|
86
|
-
|
87
|
-
@include all_inputs { background: $main-bg; }
|
88
|
-
textarea { background: $dark-bg; }
|
69
|
+
background: $bright-bg;
|
70
|
+
@include all_form_elements { background: $main-bg; }
|
89
71
|
}
|
90
72
|
&.brand {
|
91
73
|
background: $brand-color;
|
92
|
-
|
74
|
+
@include all_form_elements { background: $white; }
|
75
|
+
}
|
76
|
+
&.soft {
|
77
|
+
background: $soft-bg;
|
78
|
+
@include all_form_elements { background: $white; }
|
93
79
|
}
|
94
80
|
&.blank { background: transparent; }
|
95
81
|
|
@@ -106,6 +92,19 @@
|
|
106
92
|
small { color: #999; }
|
107
93
|
}
|
108
94
|
}
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
// kill margin of child elements, to avoid unwanted sizing
|
100
|
+
&, & > .corset, & > .container {
|
101
|
+
& > *, & > .row, & > .row > *, & > .row > * > * {
|
102
|
+
&:first-child { margin-top: 0; }
|
103
|
+
&:last-child { margin-bottom: 0; }
|
104
|
+
}
|
105
|
+
}
|
106
|
+
|
107
|
+
|
109
108
|
}
|
110
109
|
|
111
110
|
|
@@ -122,8 +121,9 @@
|
|
122
121
|
|
123
122
|
.section {
|
124
123
|
.half, .btn.half, input.half, select.half, textarea.half {
|
125
|
-
|
126
|
-
|
124
|
+
// margin: 0 auto 10px;
|
125
|
+
@include horizontal-margin( auto );
|
126
|
+
width: 50%;
|
127
127
|
}
|
128
128
|
}
|
129
129
|
|
@@ -133,7 +133,8 @@
|
|
133
133
|
|
134
134
|
.section {
|
135
135
|
.half, .btn.half, input.half, select.half, textarea.half {
|
136
|
-
margin: 0 auto 10px;
|
136
|
+
// margin: 0 auto 10px;
|
137
|
+
@include horizontal-margin( auto );
|
137
138
|
width: 40%;
|
138
139
|
}
|
139
140
|
}
|
@@ -109,3 +109,71 @@
|
|
109
109
|
background-color: $color;
|
110
110
|
}
|
111
111
|
}
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
@mixin sized-navbar( $navHeight: 50px ) {
|
116
|
+
$padHorizontal: floor(($navHeight - $line-height-computed) / 2);
|
117
|
+
$lineHeight: $navHeight - $padHorizontal * 2;
|
118
|
+
|
119
|
+
height: $navHeight + 1;
|
120
|
+
min-height: $navHeight + 1;
|
121
|
+
|
122
|
+
.navbar-brand {
|
123
|
+
padding: $padHorizontal $navbar-padding-horizontal;
|
124
|
+
line-height: $lineHeight;
|
125
|
+
height: $navHeight;
|
126
|
+
}
|
127
|
+
.navbar-header { height: #{$navHeight}; }
|
128
|
+
|
129
|
+
.navbar-toggle {
|
130
|
+
@if ( 16px + 14 ) > ($navHeight - 5) {
|
131
|
+
margin: 4px 15px;
|
132
|
+
@include vertical-padding( $padHorizontal - 3px );
|
133
|
+
line-height: 16px;
|
134
|
+
} @else {
|
135
|
+
margin: #{$padHorizontal - 6px} 15px;
|
136
|
+
@include vertical-padding( 7px );
|
137
|
+
line-height: 16px;
|
138
|
+
}
|
139
|
+
}
|
140
|
+
|
141
|
+
.navbar-nav {
|
142
|
+
// a:not(.btn) { }
|
143
|
+
& > li > a, & > a {
|
144
|
+
padding: $padHorizontal $navbar-padding-horizontal;
|
145
|
+
line-height: $lineHeight;
|
146
|
+
|
147
|
+
&.btn {
|
148
|
+
@if ($lineHeight + 10) > ($navHeight - 5) {
|
149
|
+
margin: 4px 5px;
|
150
|
+
@include vertical-padding( $padHorizontal - 5px );
|
151
|
+
line-height: $lineHeight;
|
152
|
+
} @else {
|
153
|
+
margin: #{$padHorizontal - 6px} 5px;
|
154
|
+
@include vertical-padding( 5px );
|
155
|
+
line-height: $lineHeight;
|
156
|
+
|
157
|
+
@if ($lineHeight + 16) < ($navHeight - 5) {
|
158
|
+
&.btn-lg {
|
159
|
+
margin: #{$padHorizontal - 9px} 5px;
|
160
|
+
@include vertical-padding( 8px );
|
161
|
+
}
|
162
|
+
}
|
163
|
+
|
164
|
+
&.btn-sm {
|
165
|
+
margin: #{$padHorizontal - 4px} 5px;
|
166
|
+
@include vertical-padding( 3px );
|
167
|
+
}
|
168
|
+
&.btn-xs {
|
169
|
+
margin: #{$padHorizontal - 2px} 5px;
|
170
|
+
@include vertical-padding( 1px );
|
171
|
+
}
|
172
|
+
|
173
|
+
}
|
174
|
+
}
|
175
|
+
}
|
176
|
+
}
|
177
|
+
}
|
178
|
+
|
179
|
+
|