ama_layout 3.2.2 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ama_layout.gemspec +2 -1
- data/app/assets/images/ama-logo-blue.svg +44 -0
- data/app/assets/images/ama-logo.png +0 -0
- data/app/assets/javascripts/ama_layout/desktop/foundation-custom.js +21 -0
- data/app/assets/javascripts/ama_layout/desktop/foundation-equalizer-reflow.coffee +5 -0
- data/app/assets/javascripts/ama_layout/desktop/foundation-ready.coffee +2 -0
- data/app/assets/javascripts/ama_layout/desktop/index.js +2 -8
- data/app/assets/stylesheets/ama_layout/_settings.scss +66 -66
- data/app/assets/stylesheets/ama_layout/application.scss +0 -1
- data/app/assets/stylesheets/ama_layout/foundation_and_overrides.scss +1 -24
- data/app/assets/stylesheets/ama_layout/layout/base-styles.scss +2 -72
- data/app/assets/stylesheets/ama_layout/layout/helper-classes.scss +98 -43
- data/app/assets/stylesheets/ama_layout/layout/index.scss +2 -0
- data/app/assets/stylesheets/ama_layout/layout/mixins-grid.scss +847 -0
- data/app/assets/stylesheets/ama_layout/layout/print.scss +23 -0
- data/app/assets/stylesheets/ama_layout/layout/variables.scss +20 -4
- data/app/assets/stylesheets/ama_layout/layout_components/accordions.scss +32 -14
- data/app/assets/stylesheets/ama_layout/layout_components/banner.scss +17 -0
- data/app/assets/stylesheets/ama_layout/layout_components/blue-boxes.scss +81 -4
- data/app/assets/stylesheets/ama_layout/layout_components/breadcrumbs.scss +10 -0
- data/app/assets/stylesheets/ama_layout/layout_components/button-grouping.scss +111 -0
- data/app/assets/stylesheets/ama_layout/layout_components/buttons.scss +14 -0
- data/app/assets/stylesheets/ama_layout/layout_components/callouts.scss +106 -0
- data/app/assets/stylesheets/ama_layout/layout_components/cart.scss +98 -43
- data/app/assets/stylesheets/ama_layout/layout_components/comparison-radios.scss +113 -0
- data/app/assets/stylesheets/ama_layout/layout_components/content-toggle.scss +15 -0
- data/app/assets/stylesheets/ama_layout/layout_components/error-page.scss +3 -3
- data/app/assets/stylesheets/ama_layout/layout_components/footer.scss +65 -0
- data/app/assets/stylesheets/ama_layout/layout_components/forms.scss +141 -43
- data/app/assets/stylesheets/ama_layout/layout_components/graph.scss +8 -7
- data/app/assets/stylesheets/ama_layout/layout_components/index.scss +13 -1
- data/app/assets/stylesheets/ama_layout/layout_components/link-list.scss +53 -0
- data/app/assets/stylesheets/ama_layout/layout_components/links.scss +8 -0
- data/app/assets/stylesheets/ama_layout/layout_components/notification.scss +27 -1
- data/app/assets/stylesheets/ama_layout/layout_components/progress-bar.scss +137 -0
- data/app/assets/stylesheets/ama_layout/layout_components/reveal-modal.scss +15 -0
- data/app/assets/stylesheets/ama_layout/layout_components/sections.scss +202 -0
- data/app/assets/stylesheets/ama_layout/layout_components/sidebar.scss +45 -119
- data/app/assets/stylesheets/ama_layout/layout_components/siteheader.scss +70 -73
- data/app/assets/stylesheets/ama_layout/layout_components/tab-accordions.scss +1 -19
- data/app/assets/stylesheets/ama_layout/layout_components/tables.scss +96 -0
- data/app/assets/stylesheets/ama_layout/media_queries/mobile-and-tablet.scss +2 -2
- data/app/assets/stylesheets/ama_layout/media_queries/mobile.scss +2 -49
- data/app/assets/stylesheets/ama_layout/media_queries/tablet.scss +2 -10
- data/app/helpers/ama_layout_breadcrumb_helper.rb +5 -0
- data/app/views/ama_layout/_alert.html.erb +4 -2
- data/app/views/ama_layout/_breadcrumbs.html.erb +3 -0
- data/app/views/ama_layout/_footer.html.erb +68 -1
- data/app/views/ama_layout/_main_nav_item.html.erb +2 -3
- data/app/views/ama_layout/_notice.html.erb +2 -2
- data/app/views/ama_layout/_sidebar.html.erb +6 -9
- data/app/views/ama_layout/_siteheader.html.erb +40 -28
- data/app/views/ama_layout/_sub_nav.html.erb +1 -1
- data/app/views/ama_layout/_sub_nav_item.html.erb +2 -2
- data/app/views/ama_layout/_top_nav.html.erb +4 -4
- data/lib/ama_layout.rb +2 -0
- data/lib/ama_layout/breadcrumb_builder.rb +23 -0
- data/lib/ama_layout/decorators/navigation_decorator.rb +10 -2
- data/lib/ama_layout/decorators/navigation_item_decorator.rb +8 -2
- data/lib/ama_layout/moneris/textbox.txt +11 -15
- data/lib/ama_layout/navigation.rb +7 -2
- data/lib/ama_layout/navigation.yml +8 -13
- data/lib/ama_layout/version.rb +1 -1
- data/spec/ama_layout/breadcrumb_builder_spec.rb +32 -0
- data/spec/ama_layout/decorators/moneris_decorator_spec.rb +11 -15
- data/spec/ama_layout/decorators/navigation_decorator_spec.rb +37 -0
- data/spec/ama_layout/decorators/navigation_item_decorator_spec.rb +18 -3
- data/spec/ama_layout/navigation_spec.rb +19 -88
- data/spec/helpers/ama_layout_breadcrumb_helper_spec.rb +9 -0
- data/styles.scss +0 -0
- metadata +46 -16
- data/app/assets/javascripts/ama_layout/desktop/drop_down.coffee +0 -46
- data/app/assets/javascripts/ama_layout/desktop/foundation-namespace.coffee +0 -2
- data/app/assets/javascripts/ama_layout/desktop/header_menu.coffee +0 -7
- data/app/assets/javascripts/ama_layout/desktop/ready.coffee +0 -3
- data/app/assets/javascripts/ama_layout/desktop/sidebar.coffee +0 -4
- data/app/assets/javascripts/ama_layout/desktop/sticky-footer.coffee +0 -33
- data/app/assets/javascripts/ama_layout/desktop/toggle_menu.coffee +0 -8
- data/app/assets/stylesheets/ama_layout/layout_components/show-hide-content-box.scss +0 -11
- data/app/assets/stylesheets/ama_layout/old-ie.scss +0 -74
- data/app/assets/stylesheets/ama_layout/webfonts/ss-symbolicons.js +0 -84
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@media screen and #{breakpoint(medium down)}{
|
|
2
2
|
.skip{
|
|
3
|
-
margin-top: $base-margin
|
|
3
|
+
margin-top: $base-margin;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
.join-radio{
|
|
@@ -11,6 +11,6 @@
|
|
|
11
11
|
|
|
12
12
|
.error-pg-num-border{
|
|
13
13
|
border-left: 0;
|
|
14
|
-
margin-top: $base-margin
|
|
14
|
+
margin-top: $base-margin;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -1,55 +1,8 @@
|
|
|
1
1
|
@media screen and #{breakpoint(small only)}{
|
|
2
|
-
.page-steps h3{
|
|
3
|
-
color: $slate;
|
|
4
|
-
font-style: italic;
|
|
5
|
-
font-size: $base-font-size;
|
|
6
|
-
margin: $base-margin*2 0 0;
|
|
7
|
-
text-align: right;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
input[type="text"],
|
|
11
|
-
input[type="password"],
|
|
12
|
-
input[type="date"],
|
|
13
|
-
input[type="datetime"],
|
|
14
|
-
input[type="datetime-local"],
|
|
15
|
-
input[type="month"],
|
|
16
|
-
input[type="week"],
|
|
17
|
-
input[type="email"],
|
|
18
|
-
input[type="number"],
|
|
19
|
-
input[type="search"],
|
|
20
|
-
input[type="tel"],
|
|
21
|
-
input[type="time"],
|
|
22
|
-
input[type="url"],
|
|
23
|
-
input[type="color"],
|
|
24
|
-
textarea{
|
|
25
|
-
margin: 0 0 0.5em 0;
|
|
26
|
-
margin: 0 0 0.5rem 0;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
label.inline{
|
|
30
|
-
margin: 0;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
h4{
|
|
34
|
-
margin-top: $base-margin*6;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.membership-card-radio,
|
|
38
|
-
.membership-card-radio-plus-primary,
|
|
39
|
-
.membership-card-label{
|
|
40
|
-
width: 100%;
|
|
41
|
-
margin-left: 0;
|
|
42
|
-
margin-right: 0;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
2
|
.cart-totals{
|
|
46
3
|
text-align: left;
|
|
47
4
|
}
|
|
48
5
|
|
|
49
|
-
footer{
|
|
50
|
-
margin-top: $base-margin*4;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
6
|
%white-trans{
|
|
54
7
|
background-color: rgba(255,255,255,0.8);
|
|
55
8
|
}
|
|
@@ -57,7 +10,7 @@
|
|
|
57
10
|
%inputs-thirds{
|
|
58
11
|
max-width: 100%;
|
|
59
12
|
float: none;
|
|
60
|
-
margin: $base-margin
|
|
13
|
+
margin: $base-margin/2 0;
|
|
61
14
|
}
|
|
62
15
|
|
|
63
16
|
.credit-card-year{
|
|
@@ -76,6 +29,6 @@
|
|
|
76
29
|
|
|
77
30
|
.hour,
|
|
78
31
|
.minute{
|
|
79
|
-
margin: $base-margin
|
|
32
|
+
margin: $base-margin/2 0;
|
|
80
33
|
}
|
|
81
34
|
}
|
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
@media screen and #{breakpoint(medium only)}{
|
|
2
2
|
.main-content-container{
|
|
3
|
-
padding: $base-padding
|
|
3
|
+
padding: $base-padding 0 0;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
.site-header img{
|
|
7
|
-
padding-left: $base-padding
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.membership-card-radio,
|
|
11
|
-
.membership-card-radio-plus-primary,
|
|
12
|
-
.membership-card-label{
|
|
13
|
-
width: 100%;
|
|
14
|
-
margin-left: 0;
|
|
15
|
-
margin-right: 0;
|
|
7
|
+
padding-left: $base-padding;
|
|
16
8
|
}
|
|
17
9
|
}
|
|
@@ -1,2 +1,69 @@
|
|
|
1
|
-
<footer>
|
|
1
|
+
<footer class="page-footer">
|
|
2
|
+
<div class="page-footer__container">
|
|
3
|
+
<div class="page-footer__col">
|
|
4
|
+
<div class="page-footer__col-header">
|
|
5
|
+
About Us
|
|
6
|
+
</div>
|
|
7
|
+
<ul class="link-list">
|
|
8
|
+
<li class="link-list__item">
|
|
9
|
+
<%= link_to "About AMA", "https://ama.ab.ca/about-ama/", class: "link-list__link--white" %>
|
|
10
|
+
</li>
|
|
11
|
+
<li class="link-list__item">
|
|
12
|
+
<%= link_to "Careers", "http://careers.ama.ab.ca/", class: "link-list__link--white" %>
|
|
13
|
+
</li>
|
|
14
|
+
<li class="link-list__item">
|
|
15
|
+
<%= link_to "Media Inquiries", "http://news.ama.ab.ca/", class: "link-list__link--white" %>
|
|
16
|
+
</li>
|
|
17
|
+
</ul>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="page-footer__col">
|
|
20
|
+
<div class="page-footer__col-header">
|
|
21
|
+
Get in Touch
|
|
22
|
+
</div>
|
|
23
|
+
<ul class="link-list">
|
|
24
|
+
<li class="link-list__item">
|
|
25
|
+
<%= link_to "Contact Us", "https://ama.ab.ca/about-ama/contact-us/", class: "link-list__link--white" %>
|
|
26
|
+
</li>
|
|
27
|
+
<li class="link-list__item">
|
|
28
|
+
<%= link_to "Locations", "https://ama.ab.ca/centre-locations-hours/", class: "link-list__link--white" %>
|
|
29
|
+
</li>
|
|
30
|
+
<li class="link-list__item">
|
|
31
|
+
<%= link_to "Social Media", "https://ama.ab.ca/about-ama/social-media/", class: "link-list__link--white" %>
|
|
32
|
+
</li>
|
|
33
|
+
</ul>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="page-footer__col">
|
|
36
|
+
<div class="page-footer__col-header">
|
|
37
|
+
Quick Links
|
|
38
|
+
</div>
|
|
39
|
+
<ul class="link-list">
|
|
40
|
+
<li class="link-list__item">
|
|
41
|
+
<%= link_to "Blog", "https://ama.ab.ca/blog/", class: "link-list__link--white" %>
|
|
42
|
+
</li>
|
|
43
|
+
<li class="link-list__item">
|
|
44
|
+
<%= link_to "Knowledge Base", "https://ama.ab.ca/knowledge-base/", class: "link-list__link--white" %>
|
|
45
|
+
</li>
|
|
46
|
+
<li class="link-list__item">
|
|
47
|
+
<%= link_to "Email Newsletters", "https://forms.ama.ab.ca/subscriptions", class: "link-list__link--white" %>
|
|
48
|
+
</li>
|
|
49
|
+
<li class="link-list__item">
|
|
50
|
+
<%= link_to "Site Map", "https://ama.ab.ca/about-ama/site-map/", class: "link-list__link--white" %>
|
|
51
|
+
</li>
|
|
52
|
+
</ul>
|
|
53
|
+
</div>
|
|
54
|
+
<div class="page-footer__col">
|
|
55
|
+
<div class="page-footer__col-header">
|
|
56
|
+
Interesting Fine Print
|
|
57
|
+
</div>
|
|
58
|
+
<ul class="link-list">
|
|
59
|
+
<li class="link-list__item">
|
|
60
|
+
<%= link_to "Privacy Policy", "https://ama.ab.ca/about-ama/privacy-policy/", class: "link-list__link--white" %>
|
|
61
|
+
</li>
|
|
62
|
+
<li class="link-list__item">
|
|
63
|
+
<%= link_to "Terms & Conditions", "https://ama.ab.ca/about-ama/terms-conditions/", class: "link-list__link--white" %>
|
|
64
|
+
</li>
|
|
65
|
+
</ul>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
<div class="racetrack"></div>
|
|
2
69
|
</footer>
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
<li class="
|
|
2
|
-
<span class="nav-icon fa <%= nav_item.icon %> <%= nav_item.active_class %>"></span>
|
|
1
|
+
<li class="side-nav__item">
|
|
3
2
|
<%= link_to nav_item.text, nav_item.link,
|
|
4
3
|
target: nav_item.target, alt: nav_item.alt,
|
|
5
|
-
class:
|
|
4
|
+
class: 'side-nav__link' %>
|
|
6
5
|
<%= nav_item.sidebar_sub_nav %>
|
|
7
6
|
</li>
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
<
|
|
2
|
-
<
|
|
3
|
-
|
|
1
|
+
<aside class="side-nav" data-equalizer-watch="page-container-equalize">
|
|
2
|
+
<h2 class="side-nav__header">Online Account</h2>
|
|
3
|
+
<div class="side-nav__content">
|
|
4
|
+
<ul class="side-nav__list">
|
|
4
5
|
<%= render partial: "ama_layout/main_nav_item", collection: navigation.items, as: :nav_item %>
|
|
5
|
-
|
|
6
|
-
<span class="nav-icon fa fa-power-off"></span>
|
|
7
|
-
<%= link_to "Sign Out", "/logout" %>
|
|
8
|
-
</li>
|
|
9
|
-
</div>
|
|
6
|
+
</ul>
|
|
10
7
|
</div>
|
|
11
|
-
</
|
|
8
|
+
</aside>
|
|
@@ -1,35 +1,47 @@
|
|
|
1
|
-
<div
|
|
2
|
-
<div class="
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
<div class="header">
|
|
2
|
+
<div class="title-bar" data-responsive-toggle="main-menu" data-hide-for="large">
|
|
3
|
+
<button class="menu-icon" type="button" data-toggle="offCanvasLeft"></button>
|
|
4
|
+
<%= link_to(image_tag("ama-logo.png", class: "title-bar__logo"), "https://www.ama.ab.ca") %>
|
|
5
|
+
</div>
|
|
6
|
+
<div class="top-bar" id="main-menu">
|
|
7
|
+
<div class="top-bar-left">
|
|
8
|
+
<%= link_to(image_tag("ama-logo.png", class: "top-bar__logo"), "https://www.ama.ab.ca") %>
|
|
6
9
|
</div>
|
|
7
|
-
<div class="top-bar
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<
|
|
13
|
-
<%=
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
<li>
|
|
18
|
-
<a href="<%= Rails.configuration.amaabca_site %>/membership/contact-us--centre-locations-hours-and-contact-information">Contact Us</a>
|
|
19
|
-
</li>
|
|
20
|
-
<%= navigation.top_nav %>
|
|
21
|
-
<li class="show-for-small-only">
|
|
22
|
-
<a href="<%= Rails.configuration.amaabca_site %>">AMA Website</a>
|
|
23
|
-
</li>
|
|
24
|
-
<li class="show-for-small-only">
|
|
25
|
-
<a href="http://amaroadreports.ca/">AMA Road Reports</a>
|
|
26
|
-
</li>
|
|
27
|
-
<%= navigation.sign_out_link %>
|
|
28
|
-
</ul>
|
|
29
|
-
</div>
|
|
10
|
+
<div class="top-bar-right">
|
|
11
|
+
<ul class="menu" data-responsive-menu="drilldown medium-dropdown">
|
|
12
|
+
<li>
|
|
13
|
+
<a href="<%= Rails.configuration.gatekeeper_site %>/help" target="_blank">Help</a>
|
|
14
|
+
</li>
|
|
15
|
+
<li>
|
|
16
|
+
<a href="<%= Rails.configuration.amaabca_site %>/membership/contact-us--centre-locations-hours-and-contact-information">Contact Us</a>
|
|
17
|
+
</li>
|
|
18
|
+
<%= navigation.top_nav %>
|
|
19
|
+
</ul>
|
|
30
20
|
</div>
|
|
31
21
|
</div>
|
|
32
22
|
</div>
|
|
23
|
+
<div class="off-canvas position-left" id="offCanvasLeft" data-off-canvas>
|
|
24
|
+
<h2 class="side-nav__header">Online Account</h2>
|
|
25
|
+
<div class="side-nav__content">
|
|
26
|
+
<ul class="side-nav__list">
|
|
27
|
+
<%= render partial: "ama_layout/main_nav_item", collection: navigation.items, as: :nav_item %>
|
|
28
|
+
<li class="side-nav__item">
|
|
29
|
+
<a class="side-nav__link" href="<%= Rails.configuration.amaabca_site %>">AMA Website</a>
|
|
30
|
+
</li>
|
|
31
|
+
<li class="side-nav__item">
|
|
32
|
+
<a class="side-nav__link" href="http://amaroadreports.ca/">AMA Road Reports</a>
|
|
33
|
+
</li>
|
|
34
|
+
<li class="side-nav__item">
|
|
35
|
+
<a class="side-nav__link" href="<%= Rails.configuration.gatekeeper_site %>/help" target="_blank">Help</a>
|
|
36
|
+
</li>
|
|
37
|
+
<li class="side-nav__item">
|
|
38
|
+
<a class="side-nav__link" href="<%= Rails.configuration.amaabca_site %>/membership/contact-us--centre-locations-hours-and-contact-information">Contact Us</a>
|
|
39
|
+
</li>
|
|
40
|
+
<%= navigation.sign_out_link %>
|
|
41
|
+
</ul>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
33
45
|
<div class="javascript_errors error_notification" hidden></div>
|
|
34
46
|
<noscript>
|
|
35
47
|
<div class="mt1 large-12 columns text-center error_notification">
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<li>
|
|
2
|
-
<%= link_to nav_item.text, nav_item.link, class: "
|
|
1
|
+
<li class="side-nav__child-item">
|
|
2
|
+
<%= link_to nav_item.text, nav_item.link, class: "side-nav__child-link #{nav_item.active_class}" %>
|
|
3
3
|
</li>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<li class="has-submenu
|
|
2
|
-
|
|
1
|
+
<li class="has-submenu">
|
|
2
|
+
<%= link_to navigation.display_name_text, '#' %>
|
|
3
3
|
<ul class="submenu menu vertical">
|
|
4
|
-
<li
|
|
4
|
+
<li><%= link_to 'AMA Website', Rails.configuration.amaabca_site %></li>
|
|
5
5
|
<li><a href="http://amaroadreports.ca/">AMA Road Reports</a></li>
|
|
6
|
-
|
|
6
|
+
<%= navigation.sign_out_link %>
|
|
7
7
|
</ul>
|
|
8
8
|
</li>
|
data/lib/ama_layout.rb
CHANGED
|
@@ -5,6 +5,8 @@ require "sass-rails"
|
|
|
5
5
|
require "font-awesome-sass"
|
|
6
6
|
require "draper"
|
|
7
7
|
require "browser"
|
|
8
|
+
require "breadcrumbs_on_rails"
|
|
9
|
+
require "ama_layout/breadcrumb_builder"
|
|
8
10
|
require "ama_layout/moneris"
|
|
9
11
|
require "ama_layout/navigation"
|
|
10
12
|
require "ama_layout/navigation_item"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
module AmaLayout
|
|
2
|
+
class BreadcrumbBuilder < BreadcrumbsOnRails::Breadcrumbs::Builder
|
|
3
|
+
def render
|
|
4
|
+
@elements.map { |e| render_element(e) }.join(@options[:separator])
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
private
|
|
8
|
+
|
|
9
|
+
def render_element(element)
|
|
10
|
+
name = compute_name(element)
|
|
11
|
+
path = element.path && compute_path(element) || '#'
|
|
12
|
+
render_list_element(name, path, element)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def render_list_element(name, path, element)
|
|
16
|
+
if element.options.delete(:disabled)
|
|
17
|
+
@context.content_tag :li, @context.link_to(name, '#', class: 'breadcrumbs__link--disabled', rel: 'nofollow')
|
|
18
|
+
else
|
|
19
|
+
@context.content_tag :li, @context.link_to(name, path, element.options)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -6,10 +6,14 @@ module AmaLayout
|
|
|
6
6
|
object.items.map { |i| i.decorate }
|
|
7
7
|
end
|
|
8
8
|
|
|
9
|
+
def display_name_text
|
|
10
|
+
name_or_email.truncate(30)
|
|
11
|
+
end
|
|
12
|
+
|
|
9
13
|
def sign_out_link
|
|
10
14
|
return "" unless user
|
|
11
|
-
h.content_tag :li, class: "
|
|
12
|
-
h.concat h.link_to "Sign Out", "/logout"
|
|
15
|
+
h.content_tag :li, class: "side-nav__item" do
|
|
16
|
+
h.concat h.link_to "Sign Out", "/logout", class: "side-nav__link"
|
|
13
17
|
end
|
|
14
18
|
end
|
|
15
19
|
|
|
@@ -20,5 +24,9 @@ module AmaLayout
|
|
|
20
24
|
def sidebar
|
|
21
25
|
h.render partial: "ama_layout/sidebar", locals: { navigation: self } if items.any?
|
|
22
26
|
end
|
|
27
|
+
|
|
28
|
+
def name_or_email
|
|
29
|
+
display_name.present? ? "Welcome, #{display_name.titleize}" : email
|
|
30
|
+
end
|
|
23
31
|
end
|
|
24
32
|
end
|
|
@@ -19,12 +19,18 @@ module AmaLayout
|
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
def active_class
|
|
22
|
-
"
|
|
22
|
+
"side-nav__child-link--active-page" if active_link?
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
private
|
|
26
26
|
def active_link?
|
|
27
|
-
sub_nav.map(&:link).push(link).include?
|
|
27
|
+
sub_nav.map(&:link).push(link).include? current_url_without_query
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def current_url_without_query
|
|
31
|
+
URI.parse(current_url).tap { |uri| uri.query = nil }.to_s
|
|
32
|
+
rescue URI::InvalidURIError
|
|
33
|
+
current_url
|
|
28
34
|
end
|
|
29
35
|
end
|
|
30
36
|
end
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
-webkit-appearance: none;
|
|
2
|
-
-webkit-box-shadow:
|
|
2
|
+
-webkit-box-shadow: none;
|
|
3
3
|
-webkit-rtl-ordering: logical;
|
|
4
4
|
-webkit-transition-delay: 0s, 0s;
|
|
5
5
|
-webkit-transition-duration: 0.45s, 0.45s;
|
|
@@ -8,28 +8,24 @@
|
|
|
8
8
|
-webkit-user-select: text;
|
|
9
9
|
-webkit-writing-mode: horizontal-tb;
|
|
10
10
|
background-color: rgb(255, 255, 255);
|
|
11
|
-
border-bottom-color: rgb(
|
|
12
|
-
border-bottom-left-radius: 3px;
|
|
13
|
-
border-bottom-right-radius: 3px;
|
|
11
|
+
border-bottom-color: rgb(229, 229, 229);
|
|
14
12
|
border-bottom-style: solid;
|
|
15
|
-
border-bottom-width:
|
|
13
|
+
border-bottom-width: 2px;
|
|
16
14
|
border-image-outset: 0px;
|
|
17
15
|
border-image-repeat: stretch;
|
|
18
16
|
border-image-slice: 100%;
|
|
19
17
|
border-image-source: none;
|
|
20
18
|
border-image-width: 1;
|
|
21
|
-
border-left-color: rgb(
|
|
19
|
+
border-left-color: rgb(229, 229, 229);
|
|
22
20
|
border-left-style: solid;
|
|
23
|
-
border-left-width:
|
|
24
|
-
border-right-color: rgb(
|
|
21
|
+
border-left-width: 2px;
|
|
22
|
+
border-right-color: rgb(229, 229, 229);
|
|
25
23
|
border-right-style: solid;
|
|
26
|
-
border-right-width:
|
|
27
|
-
border-top-color: rgb(
|
|
28
|
-
border-top-left-radius: 3px;
|
|
29
|
-
border-top-right-radius: 3px;
|
|
24
|
+
border-right-width: 2px;
|
|
25
|
+
border-top-color: rgb(229, 229, 229);
|
|
30
26
|
border-top-style: solid;
|
|
31
|
-
border-top-width:
|
|
32
|
-
box-shadow:
|
|
27
|
+
border-top-width: 2px;
|
|
28
|
+
box-shadow: none;
|
|
33
29
|
box-sizing: border-box;
|
|
34
30
|
color: rgba(0, 0, 0, 0.74902);
|
|
35
31
|
cursor: auto;
|
|
@@ -37,7 +33,7 @@ display: block;
|
|
|
37
33
|
font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;font-size: 14px;
|
|
38
34
|
font-style: normal;font-variant: normal;
|
|
39
35
|
font-weight: normal;
|
|
40
|
-
height:
|
|
36
|
+
height: 44px;
|
|
41
37
|
letter-spacing: normal;
|
|
42
38
|
line-height: normal;
|
|
43
39
|
margin-bottom: 0px;
|