ama_layout 3.2.2 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/ama_layout.gemspec +2 -1
  3. data/app/assets/images/ama-logo-blue.svg +44 -0
  4. data/app/assets/images/ama-logo.png +0 -0
  5. data/app/assets/javascripts/ama_layout/desktop/foundation-custom.js +21 -0
  6. data/app/assets/javascripts/ama_layout/desktop/foundation-equalizer-reflow.coffee +5 -0
  7. data/app/assets/javascripts/ama_layout/desktop/foundation-ready.coffee +2 -0
  8. data/app/assets/javascripts/ama_layout/desktop/index.js +2 -8
  9. data/app/assets/stylesheets/ama_layout/_settings.scss +66 -66
  10. data/app/assets/stylesheets/ama_layout/application.scss +0 -1
  11. data/app/assets/stylesheets/ama_layout/foundation_and_overrides.scss +1 -24
  12. data/app/assets/stylesheets/ama_layout/layout/base-styles.scss +2 -72
  13. data/app/assets/stylesheets/ama_layout/layout/helper-classes.scss +98 -43
  14. data/app/assets/stylesheets/ama_layout/layout/index.scss +2 -0
  15. data/app/assets/stylesheets/ama_layout/layout/mixins-grid.scss +847 -0
  16. data/app/assets/stylesheets/ama_layout/layout/print.scss +23 -0
  17. data/app/assets/stylesheets/ama_layout/layout/variables.scss +20 -4
  18. data/app/assets/stylesheets/ama_layout/layout_components/accordions.scss +32 -14
  19. data/app/assets/stylesheets/ama_layout/layout_components/banner.scss +17 -0
  20. data/app/assets/stylesheets/ama_layout/layout_components/blue-boxes.scss +81 -4
  21. data/app/assets/stylesheets/ama_layout/layout_components/breadcrumbs.scss +10 -0
  22. data/app/assets/stylesheets/ama_layout/layout_components/button-grouping.scss +111 -0
  23. data/app/assets/stylesheets/ama_layout/layout_components/buttons.scss +14 -0
  24. data/app/assets/stylesheets/ama_layout/layout_components/callouts.scss +106 -0
  25. data/app/assets/stylesheets/ama_layout/layout_components/cart.scss +98 -43
  26. data/app/assets/stylesheets/ama_layout/layout_components/comparison-radios.scss +113 -0
  27. data/app/assets/stylesheets/ama_layout/layout_components/content-toggle.scss +15 -0
  28. data/app/assets/stylesheets/ama_layout/layout_components/error-page.scss +3 -3
  29. data/app/assets/stylesheets/ama_layout/layout_components/footer.scss +65 -0
  30. data/app/assets/stylesheets/ama_layout/layout_components/forms.scss +141 -43
  31. data/app/assets/stylesheets/ama_layout/layout_components/graph.scss +8 -7
  32. data/app/assets/stylesheets/ama_layout/layout_components/index.scss +13 -1
  33. data/app/assets/stylesheets/ama_layout/layout_components/link-list.scss +53 -0
  34. data/app/assets/stylesheets/ama_layout/layout_components/links.scss +8 -0
  35. data/app/assets/stylesheets/ama_layout/layout_components/notification.scss +27 -1
  36. data/app/assets/stylesheets/ama_layout/layout_components/progress-bar.scss +137 -0
  37. data/app/assets/stylesheets/ama_layout/layout_components/reveal-modal.scss +15 -0
  38. data/app/assets/stylesheets/ama_layout/layout_components/sections.scss +202 -0
  39. data/app/assets/stylesheets/ama_layout/layout_components/sidebar.scss +45 -119
  40. data/app/assets/stylesheets/ama_layout/layout_components/siteheader.scss +70 -73
  41. data/app/assets/stylesheets/ama_layout/layout_components/tab-accordions.scss +1 -19
  42. data/app/assets/stylesheets/ama_layout/layout_components/tables.scss +96 -0
  43. data/app/assets/stylesheets/ama_layout/media_queries/mobile-and-tablet.scss +2 -2
  44. data/app/assets/stylesheets/ama_layout/media_queries/mobile.scss +2 -49
  45. data/app/assets/stylesheets/ama_layout/media_queries/tablet.scss +2 -10
  46. data/app/helpers/ama_layout_breadcrumb_helper.rb +5 -0
  47. data/app/views/ama_layout/_alert.html.erb +4 -2
  48. data/app/views/ama_layout/_breadcrumbs.html.erb +3 -0
  49. data/app/views/ama_layout/_footer.html.erb +68 -1
  50. data/app/views/ama_layout/_main_nav_item.html.erb +2 -3
  51. data/app/views/ama_layout/_notice.html.erb +2 -2
  52. data/app/views/ama_layout/_sidebar.html.erb +6 -9
  53. data/app/views/ama_layout/_siteheader.html.erb +40 -28
  54. data/app/views/ama_layout/_sub_nav.html.erb +1 -1
  55. data/app/views/ama_layout/_sub_nav_item.html.erb +2 -2
  56. data/app/views/ama_layout/_top_nav.html.erb +4 -4
  57. data/lib/ama_layout.rb +2 -0
  58. data/lib/ama_layout/breadcrumb_builder.rb +23 -0
  59. data/lib/ama_layout/decorators/navigation_decorator.rb +10 -2
  60. data/lib/ama_layout/decorators/navigation_item_decorator.rb +8 -2
  61. data/lib/ama_layout/moneris/textbox.txt +11 -15
  62. data/lib/ama_layout/navigation.rb +7 -2
  63. data/lib/ama_layout/navigation.yml +8 -13
  64. data/lib/ama_layout/version.rb +1 -1
  65. data/spec/ama_layout/breadcrumb_builder_spec.rb +32 -0
  66. data/spec/ama_layout/decorators/moneris_decorator_spec.rb +11 -15
  67. data/spec/ama_layout/decorators/navigation_decorator_spec.rb +37 -0
  68. data/spec/ama_layout/decorators/navigation_item_decorator_spec.rb +18 -3
  69. data/spec/ama_layout/navigation_spec.rb +19 -88
  70. data/spec/helpers/ama_layout_breadcrumb_helper_spec.rb +9 -0
  71. data/styles.scss +0 -0
  72. metadata +46 -16
  73. data/app/assets/javascripts/ama_layout/desktop/drop_down.coffee +0 -46
  74. data/app/assets/javascripts/ama_layout/desktop/foundation-namespace.coffee +0 -2
  75. data/app/assets/javascripts/ama_layout/desktop/header_menu.coffee +0 -7
  76. data/app/assets/javascripts/ama_layout/desktop/ready.coffee +0 -3
  77. data/app/assets/javascripts/ama_layout/desktop/sidebar.coffee +0 -4
  78. data/app/assets/javascripts/ama_layout/desktop/sticky-footer.coffee +0 -33
  79. data/app/assets/javascripts/ama_layout/desktop/toggle_menu.coffee +0 -8
  80. data/app/assets/stylesheets/ama_layout/layout_components/show-hide-content-box.scss +0 -11
  81. data/app/assets/stylesheets/ama_layout/old-ie.scss +0 -74
  82. data/app/assets/stylesheets/ama_layout/webfonts/ss-symbolicons.js +0 -84
@@ -6,10 +6,12 @@
6
6
 
7
7
  &__blue-icon{
8
8
  color: $brand-blue-light;
9
+ font-size: 1.75rem;
9
10
  }
10
11
 
11
12
  &__grey-icon{
12
13
  color: $smoke;
14
+ font-size: 1.75rem;
13
15
  }
14
16
  }
15
17
 
@@ -76,19 +78,17 @@
76
78
  &__middle-text{
77
79
  color: $slate;
78
80
  position: absolute;
79
- right: 0;
81
+ left: 20%;
82
+ width: 80%;
80
83
  font-size: .85rem;
81
- display: table;
84
+ text-align: center;
82
85
  z-index: 5;
83
- margin-top: 15px;
84
- margin-bottom: 15px;
85
- vertical-align: middle;
86
+ @include vertical-center;
86
87
 
87
88
  &--half{
88
89
  @extend .graph__middle-text;
89
90
  width: 47%;
90
- margin-top: $base-margin;
91
- margin-bottom: $base-margin;
91
+ left: 53%;
92
92
  }
93
93
 
94
94
  &--full{
@@ -96,6 +96,7 @@
96
96
  color: $white;
97
97
  width: 100%;
98
98
  text-align: center;
99
+ left: 0;
99
100
  }
100
101
  }
101
102
 
@@ -7,7 +7,19 @@
7
7
  @import "responsive-table";
8
8
  @import "accordions";
9
9
  @import "tab-accordions";
10
- @import "show-hide-content-box";
10
+ @import "content-toggle";
11
11
  @import "cart";
12
12
  @import "reveal-modal";
13
+ @import "sections";
14
+ @import "link-list";
15
+ @import "button-grouping";
16
+ @import "breadcrumbs";
17
+ @import "callouts";
13
18
  @import "graph";
19
+ @import "tables";
20
+ @import "banner";
21
+ @import "progress-bar";
22
+ @import "comparison-radios";
23
+ @import "footer";
24
+ @import "links";
25
+ @import "buttons";
@@ -0,0 +1,53 @@
1
+ .link-list{
2
+ list-style-type: none;
3
+
4
+ &__item{
5
+ &--bordered{
6
+ border-bottom: 2px solid $sky;
7
+ padding-bottom: $base-padding/2;
8
+
9
+ &:not(:first-child){
10
+ padding-top: $base-padding/2;
11
+ }
12
+ }
13
+ }
14
+
15
+ &__link{
16
+ &--white{
17
+ color: $white;
18
+ }
19
+ }
20
+ }
21
+
22
+ .link-list-horizontal{
23
+ list-style-type: none;
24
+
25
+ &__item{
26
+ display: inline;
27
+ }
28
+ }
29
+
30
+ .icon-link-list{
31
+ list-style-type: none;
32
+
33
+ &__item{
34
+ border-bottom: 1px solid $smoke;
35
+ margin-top: 7.5px;
36
+ }
37
+
38
+ &__icon{
39
+ padding: 8.5px 13px;
40
+ color: $white;
41
+ font-size: 1.2rem;
42
+ text-align: center;
43
+ vertical-align: middle;
44
+ margin-right: 1.875rem;
45
+ width: 57px;
46
+ display: inline-block;
47
+ background: $brand-blue-light;
48
+ }
49
+
50
+ &__link{
51
+ display: inline;
52
+ }
53
+ }
@@ -0,0 +1,8 @@
1
+ .link--white{
2
+ color: $white;
3
+ text-decoration: underline;
4
+
5
+ &:hover{
6
+ color: $white;
7
+ }
8
+ }
@@ -1,5 +1,5 @@
1
1
  .notice_notification{
2
- padding: $base-padding*2 $base-padding*3 $base-padding*2 $base-padding*3;
2
+ padding: $base-padding/2 $base-padding;
3
3
  background-color: $brand-blue-insurance;
4
4
  color: $white;
5
5
  }
@@ -40,3 +40,29 @@
40
40
  margin: 0 auto;
41
41
  display: block;
42
42
  }
43
+
44
+ .notice{
45
+ color: $white;
46
+ padding: $base-padding;
47
+ margin-bottom: $base-margin;
48
+ overflow: auto;
49
+
50
+ &--warning{
51
+ @extend .notice;
52
+ background: $orange;
53
+ }
54
+
55
+ &__icon-wrapper{
56
+ @include small-2;
57
+ }
58
+
59
+ &__icon{
60
+ font-size: 2em;
61
+ width: 100%;
62
+ text-align: center;
63
+ }
64
+
65
+ &__text-wrapper{
66
+ @include small-10;
67
+ }
68
+ }
@@ -0,0 +1,137 @@
1
+ .progress-bar{
2
+ @include hide-for(small only);
3
+ overflow: auto;
4
+
5
+ &__section{
6
+ &--active{
7
+ background: $cerulean;
8
+ }
9
+
10
+ &--inactive{
11
+ background: $brand-blue-light;
12
+ }
13
+
14
+ &--completed{
15
+ background: $brand-blue-dark;
16
+ }
17
+ }
18
+
19
+ &--selected{
20
+ background: $cerulean;
21
+ color: $white;
22
+ }
23
+
24
+ &--completed{
25
+ color: $white;
26
+ background: $brand-blue-dark;
27
+ }
28
+
29
+ &__section-quarter{
30
+ @include medium-3;
31
+ position: relative;
32
+ color: $white;
33
+ overflow: hidden;
34
+ padding: 6px 0;
35
+ }
36
+ &__section-title{
37
+
38
+ }
39
+
40
+ &__section-info{
41
+ display: block;
42
+ }
43
+
44
+ &__arrow{
45
+ width: 32px;
46
+ height: 32px;
47
+ position: absolute;
48
+ right: -20px;
49
+ top: -4px;
50
+
51
+ @include breakpoint(medium down){
52
+ display: none;
53
+ }
54
+
55
+ &:after{
56
+ content: '';
57
+ position: absolute;
58
+ right: 0;
59
+ border-color: transparent transparent transparent $brand-blue-light;
60
+ border-style: solid;
61
+ border-width: 35px;
62
+ }
63
+
64
+ &:before{
65
+ content: '';
66
+ position: absolute;
67
+ right: -4px; //this controls the thickness of the arrow
68
+ border-color: transparent transparent transparent $white;
69
+ background: $brand-blue-light;
70
+ border-style: solid;
71
+ border-width: 35px;
72
+ }
73
+
74
+ &--selected:after{
75
+ content: '';
76
+ color: $white;
77
+ position: absolute;
78
+ right: 0;
79
+ border-color: transparent transparent transparent $cerulean;
80
+ border-style: solid;
81
+ border-width: 35px;
82
+ }
83
+
84
+ &--selected:before{
85
+ content: '';
86
+ color: $white;
87
+ position: absolute;
88
+ right: -4px; //this controls the thickness of the arrow
89
+ border-color: transparent transparent transparent $white;
90
+ background: $brand-blue-light;
91
+ border-style: solid;
92
+ border-width: 35px;
93
+ }
94
+
95
+ &--completed:after{
96
+ content: '';
97
+ color: $white;
98
+ position: absolute;
99
+ right: 0;
100
+ border-color: transparent transparent transparent $brand-blue-dark;
101
+ border-style: solid;
102
+ border-width: 35px;
103
+ }
104
+
105
+ &--completed:before{
106
+ content: '';
107
+ color: $white;
108
+ position: absolute;
109
+ right: -4px; //this controls the thickness of the arrow
110
+ border-color: transparent transparent transparent $white;
111
+ background: $cerulean;
112
+ border-style: solid;
113
+ border-width: 35px;
114
+ }
115
+
116
+ &--very-completed:after{
117
+ content: '';
118
+ color: $white;
119
+ position: absolute;
120
+ right: 0;
121
+ border-color: transparent transparent transparent $brand-blue-dark;
122
+ border-style: solid;
123
+ border-width: 35px;
124
+ }
125
+
126
+ &--very-completed:before{
127
+ content: '';
128
+ color: $white;
129
+ position: absolute;
130
+ right: -4px; //this controls the thickness of the arrow
131
+ border-color: transparent transparent transparent $white;
132
+ background: $brand-blue-dark;
133
+ border-style: solid;
134
+ border-width: 35px;
135
+ }
136
+ }
137
+ }
@@ -10,6 +10,21 @@ dialog .close-reveal-modal{
10
10
  cursor: pointer;
11
11
  }
12
12
 
13
+ .reveal-modal{
14
+ max-width: 960px;
15
+
16
+ a{
17
+ text-decoration: none;
18
+ font-weight: normal;
19
+ }
20
+
21
+ @include breakpoint(small only){
22
+ top: 50px !important;
23
+ min-height: 240px;
24
+ position: fixed;
25
+ }
26
+ }
27
+
13
28
  @include breakpoint(small only){
14
29
  .reveal{
15
30
  padding: $global-padding $global-padding 51px $global-padding; // 51 pixels to offset the height of the top bar
@@ -0,0 +1,202 @@
1
+ .heading{
2
+ padding: $base-padding*.75 $base-padding;
3
+ color: $white;
4
+ }
5
+
6
+ .section{
7
+ margin-bottom: $base-margin;
8
+
9
+ &__sub-head{
10
+ margin-bottom: $base-margin;
11
+ color: $charcoal;
12
+ clear: both;
13
+ }
14
+
15
+ &__content-container{
16
+ @include grid-row-nest;
17
+ }
18
+
19
+ &__content-two-thirds{
20
+ @include large-8;
21
+
22
+ &>*:last-child{
23
+ margin-bottom: 0;
24
+ }
25
+ }
26
+ }
27
+
28
+ .section-nested{
29
+ @include grid-row-nest;
30
+ @include clearfix;
31
+ }
32
+
33
+ .section-heading{
34
+ @extend .heading;
35
+ background: $brand-blue-light;
36
+
37
+ &--no-bg{
38
+ padding-bottom: $base-padding;
39
+ }
40
+
41
+ &--no-padding{
42
+ background: $brand-blue-light;
43
+ color: $white;
44
+ }
45
+
46
+ &--grey-bg{
47
+ @extend .heading;
48
+ background: $slate;
49
+ }
50
+
51
+ &--dark-blue-bg{
52
+ @extend .heading;
53
+ background: $brand-blue-dark;
54
+ }
55
+ }
56
+
57
+ .section-heading--accordion{
58
+ @extend .heading;
59
+ overflow: auto;
60
+ display: block;
61
+ }
62
+
63
+ .section-heading--green{
64
+ @extend .heading;
65
+ background: $brand-green;
66
+ }
67
+
68
+ .section-quarter{
69
+ @extend .section;
70
+ @include large-3;
71
+ }
72
+
73
+ .section-heading--blue{
74
+ @extend .heading;
75
+ background: $brand-blue-light;
76
+ }
77
+
78
+ .section-half{
79
+ @extend .section;
80
+ @include large-6;
81
+ }
82
+
83
+ .section-full{
84
+ @extend .section;
85
+ @include large-12;
86
+
87
+ &--max-width{
88
+ @extend .section-full;
89
+ max-width: 1080px;
90
+ }
91
+ }
92
+
93
+ .section-third{
94
+ @extend .section;
95
+ @include large-4;
96
+ @include clearfix;
97
+ }
98
+
99
+ .section-quarter{
100
+ @extend .section;
101
+ @include large-3;
102
+ }
103
+
104
+ .section-two-thirds{
105
+ @extend .section;
106
+ @include large-8;
107
+ @include grid-column-end;
108
+ @include clearfix;
109
+
110
+ &:last-child:not(.section-content){
111
+ margin-bottom: 0;
112
+ }
113
+ }
114
+
115
+ .section-centered{
116
+ &--half{
117
+ @extend .section;
118
+ @include large-6;
119
+ @include large-centered;
120
+
121
+ &:last-child:not(:first-child){
122
+ float: none;
123
+ }
124
+ }
125
+ }
126
+
127
+ .section-content{
128
+ padding: $base-padding;
129
+ background: $white;
130
+ @include clearfix;
131
+
132
+ &>*:last-child{
133
+ margin-bottom: 0;
134
+ /*override so that the last child element always has margin-bottom of zero
135
+ (because the container has bottom padding)
136
+ the alternative is to set the elements themselves to ONLY have bottom-margin
137
+ if they're not the :last-child, but Foundation adds bottom margin to everything by default
138
+ so we would have to change each element individually in the _settings file.
139
+ */
140
+
141
+ &>*:last-child{
142
+ margin-bottom: 0;
143
+ /* the same as above, but for nested elements within sections */
144
+ }
145
+ }
146
+
147
+ &--grey-bg{
148
+ padding: $base-padding;
149
+ background: lighten($stormcloud, 5%);
150
+ color: $white;
151
+ }
152
+
153
+ &--smoke-bg{
154
+ padding: $base-padding;
155
+ background: lighten($smoke, 5%);
156
+ }
157
+
158
+ &--blue-bg{
159
+ padding: $base-padding;
160
+ background: $brand-blue-light;
161
+ color: $white;
162
+ @include clearfix;
163
+
164
+ label{
165
+ color: $white;
166
+ }
167
+ }
168
+ }
169
+
170
+ @function set-hint-color($color) {
171
+ @if (lightness($color) > 50) {
172
+ @return $smoke; // Lighter backgorund, return dark color
173
+ } @else {
174
+ @return $white; // Darker background, return light color
175
+ }
176
+ }
177
+
178
+ .page-container{
179
+ @include grid-row;
180
+ position: relative;
181
+ }
182
+
183
+ .main-container{
184
+ // using grid-column in place of large-10 so that we can set the gutters to 0
185
+ @include grid-column(10,0);
186
+ background: $stone;
187
+ @include clearfix;
188
+
189
+ @include breakpoint(medium down){
190
+ @include grid-column(12,0);
191
+ }
192
+ }
193
+
194
+ .main-container-full{
195
+ // using grid-column in place of large-10 so that we can set the gutters to 0
196
+ @include grid-column(12,0);
197
+ background: $stone;
198
+
199
+ @include breakpoint(medium down){
200
+ @include grid-column(12,0);
201
+ }
202
+ }