cloudrider 0.2.5 → 0.2.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 03060f9be1960c9c0efbf42c8e9c70ded3d12597
4
- data.tar.gz: d29bad6873347937457febd5994547d7eb1fc195
3
+ metadata.gz: a21c870b26868c59d6eccce55be82d668a82f964
4
+ data.tar.gz: f2192dba425b9fb71a0fd47986f7acd780c3d8e4
5
5
  SHA512:
6
- metadata.gz: 5f1f856e646d165cdd3acca7edf7faa5e3d290e58aac4c1f7f77dde0dede00bf5b0b1bb319ab496e2651cc99699f08a4669037622514435889a4e4bb5955f171
7
- data.tar.gz: 817ae43bec67630191acfdb84cb957c6cf7c653e15ebe4747f42f81076020d2a1cd6ad1591c38f9e799fb05f2b5990bce265bfe34209e20af1139625d0a1ab56
6
+ metadata.gz: 117df064c925017280ed1d621e8d70c16567272b8f261923d5ce5bfe010cddce30cd3c4631bbd3a9ddc08f95501c4e458c72d90ed0a0309e07bb69545e4d305d
7
+ data.tar.gz: c3be82471de878083883bbd5181b07f299f36c32b3d3dfd62947c1dfd8c964e4cfc42aff5433c90baf74e5ff92711c5907fb22a701317f2968eb497ce0da489c
@@ -8,9 +8,7 @@ class Apiv1.PreloadImageComponent extends Ember.Component
8
8
  manageSourcePreloading: ->
9
9
  return if @alreadyQueuedPreloader or Ember.isBlank @source
10
10
  @alreadyQueuedPreloader = true
11
- Apiv1.ImagePreloader.registerImage @source, (img) =>
12
- console.log img
13
- @src = img.src
11
+ Apiv1.ImagePreloader.registerImage @source, (img) => @src = img.src
14
12
 
15
13
  didInsertElement: ->
16
14
  @manageSourcePreloading()
@@ -1,3 +1,25 @@
1
1
  class Apiv1.SiteNavComponent extends Ember.Component
2
2
  classNames: ["site-nav"]
3
- tagName: "nav"
3
+ tagName: "nav"
4
+
5
+ scrolling: (evt) ->
6
+ return @showStickyNav() if @scrollPosition() > 0
7
+ @hideStickyNav()
8
+
9
+ showStickyNav: ->
10
+ return if @$().hasClass "sticky-naved"
11
+ @$().addClass "sticky-naved"
12
+
13
+ scrollPosition: ->
14
+ 0 - $(".site-content").position().top
15
+
16
+ hideStickyNav: ->
17
+ return @$().removeClass "sticky-naved" if @$().hasClass "sticky-naved"
18
+
19
+ didInsertElement: ->
20
+ $("#page-wrapper").bind "touchmove", _.bind(@scrolling, @)
21
+ $("#page-wrapper").bind "scroll", _.bind(@scrolling, @)
22
+
23
+ willDestroyElement: ->
24
+ $("#page-wrapper").unbind "touchmove"
25
+ $("#page-wrapper").unbind "scroll"
@@ -7,14 +7,13 @@ class Apiv1.IndexController extends Ember.ObjectController
7
7
  return @smoothScrollTo 0 unless _.contains ["about", "products", "contacts"], @anchor
8
8
  Ember.run.schedule 'afterRender', @, =>
9
9
  el$ = $('#' + @anchor)
10
- if el$.length > 0
11
- @smoothScrollTo @topOffset el$
12
-
10
+ @smoothScrollTo @topOffset el$ if el$.length > 0
11
+
13
12
  smoothScrollTo: (y) ->
14
13
  $("#page-wrapper").animate scrollTop: y if y?
15
14
 
16
15
  topOffset: (el$) ->
17
- window.p1 = $(".site-content").position()
18
- window.p2 = el$.position()
16
+ p1 = $(".site-content").position()
17
+ p2 = el$.position()
19
18
  return unless p1? and p2?
20
19
  p2.top - p1.top
@@ -1,35 +1,36 @@
1
- .row
2
- .small-12.columns
3
- h1.capitalize
4
- link-to "admin.index"
5
- tr-span en="admin panel"
1
+ section#admin
2
+ .row
3
+ .small-12.columns
4
+ h1.capitalize
5
+ link-to "admin.index"
6
+ tr-span en="admin panel"
6
7
 
7
- .row.admin-nav-tabs
8
- .small-6.medium-4.large-2.columns
9
- link-to "admin" class="admin-nav-tab"
10
- span.capitalize
11
- tr-span en="dashboard"
12
- .small-6.medium-4.large-2.columns
13
- link-to "admin.products.index" class="admin-nav-tab"
14
- span.capitalize
15
- tr-span en="products"
16
- .small-6.medium-4.large-2.columns
17
- link-to "admin.employees.index" class="admin-nav-tab"
18
- span.capitalize
19
- tr-span en="contacts"
20
- .small-6.medium-4.large-2.columns
21
- link-to "admin.translations" class="admin-nav-tab"
22
- span.capitalize
23
- tr-span en="translations"
24
- .small-6.medium-4.large-2.columns
25
- link-to "admin.taxons.index" class="admin-nav-tab"
26
- span.capitalize
27
- tr-span en="categories"
28
- .small-6.medium-4.large-2.columns
29
- link-to "admin.messages.index" class="admin-nav-tab"
30
- span.capitalize
31
- tr-span en="messages"
8
+ .row.admin-nav-tabs
9
+ .small-6.medium-4.large-2.columns
10
+ link-to "admin" class="admin-nav-tab"
11
+ span.capitalize
12
+ tr-span en="dashboard"
13
+ .small-6.medium-4.large-2.columns
14
+ link-to "admin.products.index" class="admin-nav-tab"
15
+ span.capitalize
16
+ tr-span en="products"
17
+ .small-6.medium-4.large-2.columns
18
+ link-to "admin.employees.index" class="admin-nav-tab"
19
+ span.capitalize
20
+ tr-span en="contacts"
21
+ .small-6.medium-4.large-2.columns
22
+ link-to "admin.translations" class="admin-nav-tab"
23
+ span.capitalize
24
+ tr-span en="translations"
25
+ .small-6.medium-4.large-2.columns
26
+ link-to "admin.taxons.index" class="admin-nav-tab"
27
+ span.capitalize
28
+ tr-span en="categories"
29
+ .small-6.medium-4.large-2.columns
30
+ link-to "admin.messages.index" class="admin-nav-tab"
31
+ span.capitalize
32
+ tr-span en="messages"
32
33
 
33
- .row
34
- .small-12.columns
35
- == outlet
34
+ .row
35
+ .small-12.columns
36
+ == outlet
@@ -1,7 +1,8 @@
1
1
  /# leftCanvas
2
2
  /# == partial "components/site-nav/left-nav"
3
3
  /# topBar
4
- == partial "components/site-nav/top-nav"
4
+ /# == partial "components/site-nav/top-nav"
5
5
  /# topBarContained
6
6
  /# topChunks
7
- /# uglyBanner
7
+ /# uglyBanner
8
+ == partial "components/site-nav/material-nav"
@@ -0,0 +1,29 @@
1
+ .row.collapse
2
+ link-to "index" (query-params anchor="") class="small-3 medium-6 large-9 columns"
3
+ .title-area
4
+ span.hide-for-medium-up
5
+ i.fa.fa-home
6
+ span.company-name.show-for-medium-up
7
+ i.fa.fa-rocket
8
+
9
+
10
+ link-to "index" (query-params anchor="about") class="small-3 medium-2 large-1 columns"
11
+ .menu-tab
12
+ span.hide-for-medium-up
13
+ i.fa.fa-info-circle
14
+ span.menu-nav.show-for-medium-up
15
+ tr-span en="about"
16
+
17
+ link-to "products.index" class="small-3 medium-2 large-1 columns"
18
+ .menu-tab
19
+ span.hide-for-medium-up
20
+ i.fa.fa-tags
21
+ span.menu-nav.show-for-medium-up
22
+ tr-span en="products"
23
+
24
+ link-to "index" (query-params anchor="contacts") class="small-3 medium-2 large-1 columns"
25
+ .menu-tab
26
+ span.hide-for-medium-up
27
+ i.fa.fa-envelope
28
+ span.menu-nav.show-for-medium-up
29
+ tr-span en="contacts"
@@ -1 +1 @@
1
- @import "apiv1/components/site-nav/top-nav";
1
+ @import "apiv1/components/site-nav/material-nav";
@@ -0,0 +1,75 @@
1
+ $company-title-font-size: 1.35rem;
2
+ $nav-bar-bg-color: fade-out(#444, 0.25);
3
+ $title-font-color: #eee;
4
+ $tab-font-default-color: #333;
5
+ $tab-bg-default-color: #e7e7e7;
6
+ $tab-bg-active-color: #008cba;
7
+ $tab-font-active-color: #fff;
8
+ $tab-bg-hover-color: darken(#008cba, 10%);
9
+ $tab-font-hover-color: #ddd;
10
+ #canvas-menu-top {
11
+ position: absolute;
12
+ width: 100%;
13
+ z-index: 9999;
14
+ }
15
+ #page-wrapper {
16
+ position: absolute;
17
+ width: 100%;
18
+ height: 100%;
19
+ overflow-y: auto;
20
+ }
21
+ #admin {
22
+ margin-top: 65px;
23
+ }
24
+ nav.site-nav {
25
+ @include display-flex;
26
+ @include justify-content(center);
27
+ @include align-items(center);
28
+ @include flex-direction(row);
29
+ @include transition-property(box-shadow);
30
+ @include transition-property(background-color);
31
+ @include transition-duration(200ms);
32
+ @include transition-timing-function(ease-in);
33
+
34
+ width: 100%;
35
+ &.sticky-naved {
36
+ @include box-shadow(black 0px 5px 10px);
37
+ position: fixed;
38
+ top: 0px;
39
+ left: 0px;
40
+ background-color: white;
41
+ }
42
+ .possible-container {
43
+ width: $row-width;
44
+ }
45
+ .title-area {
46
+ padding-left: 15px;
47
+ font-size: 2rem;
48
+ }
49
+ .title-area,
50
+ .menu-tab {
51
+ @include display-flex;
52
+ @include justify-content(center);
53
+ @include flex-direction(column);
54
+ height: 65px;
55
+ }
56
+ .menu-tab {
57
+ @include align-items(center);
58
+ }
59
+ .menu-tab {
60
+ @include transition-property(background-color);
61
+ @include transition-duration(300ms);
62
+ @include transition-timing-function(ease-out);
63
+ font-size: $company-title-font-size;
64
+ color: $tab-font-default-color;
65
+ text-align: center;
66
+ &.active {
67
+ background-color: $tab-bg-active-color;
68
+ color: $tab-font-active-color;
69
+ }
70
+ &:hover {
71
+ background-color: $tab-bg-hover-color;
72
+ color: $tab-font-hover-color;
73
+ }
74
+ }
75
+ }
@@ -1,28 +1,29 @@
1
- .application-container.toggle-shift.shifted
1
+ preload-billboard
2
+ .application-container.toggle-shift.shifted
2
3
  <% case nav_style %>
3
4
  <% when :top %>
4
- #canvas-menu-top
5
- site-nav
6
- #page-wrapper
7
- .site-content
8
- .not-site-footer
9
- == outlet
10
- site-footer action="displayModal"
5
+ #canvas-menu-top
6
+ site-nav
7
+ #page-wrapper
8
+ .site-content
9
+ .not-site-footer
10
+ == outlet
11
+ site-footer action="displayModal"
11
12
  <% when :left %>
12
- #canvas-menu-left
13
- site-nav
14
- #page-wrapper
15
- .small-time-header.hide-for-large-up.pointer click=toggleCanvasShift
16
- i.fa.fa-bars.fa-3x
17
- .site-content
18
- .not-site-footer
19
- == outlet
20
- site-footer
13
+ #canvas-menu-left
14
+ site-nav
15
+ #page-wrapper
16
+ .small-time-header.hide-for-large-up.pointer click=toggleCanvasShift
17
+ i.fa.fa-bars.fa-3x
18
+ .site-content
19
+ .not-site-footer
20
+ == outlet
21
+ site-footer
21
22
  <% end %>
22
23
 
23
- #fixed-bottom
24
- .row
25
- flash-message
26
- .modal-background
27
- .modal-vertical-container
28
- == outlet "modal"
24
+ #fixed-bottom
25
+ .row
26
+ flash-message
27
+ .modal-background
28
+ .modal-vertical-container
29
+ == outlet "modal"
@@ -43,5 +43,35 @@
43
43
  .menu-nav.show-for-medium-up
44
44
  tr-span en="contacts"
45
45
 
46
- <% when :mid %>
46
+ <% when :material %>
47
+ .row.collapse
48
+ link-to "index" (query-params anchor="") class="small-3 medium-6 large-9 columns"
49
+ .title-area
50
+ span.hide-for-medium-up
51
+ i.fa.fa-home
52
+ span.company-name.show-for-medium-up
53
+ i.fa.fa-rocket
54
+
55
+
56
+ link-to "index" (query-params anchor="about") class="small-3 medium-2 large-1 columns"
57
+ .menu-tab
58
+ span.hide-for-medium-up
59
+ i.fa.fa-info-circle
60
+ span.menu-nav.show-for-medium-up
61
+ tr-span en="about"
62
+
63
+ link-to "products.index" class="small-3 medium-2 large-1 columns"
64
+ .menu-tab
65
+ span.hide-for-medium-up
66
+ i.fa.fa-tags
67
+ span.menu-nav.show-for-medium-up
68
+ tr-span en="products"
69
+
70
+ link-to "index" (query-params anchor="contacts") class="small-3 medium-2 large-1 columns"
71
+ .menu-tab
72
+ span.hide-for-medium-up
73
+ i.fa.fa-envelope
74
+ span.menu-nav.show-for-medium-up
75
+ tr-span en="contacts"
76
+
47
77
  <% end %>
@@ -1,213 +1,8 @@
1
1
  <% case nav_style %>
2
2
  <% when :left %>
3
- //# ruby
4
- $canvas-menu-bg-color: #666;
5
- $menu-bar-icon-color: fade-out(#fff, 0.7);
6
- $nav-button-text-align: center;
7
- $button-horizontal-padding: 15px;
8
- $button-vertical-padding: 25px;
9
- $button-font-size: 1.25rem;
10
- $button-border-bottom: 1px solid darken($canvas-menu-bg-color, 10%);
11
- $button-default-color: #e7e7e7;
12
- $button-active-color: #008cba;
13
- $button-active-font-color: #fff;
14
- $button-hover-color: darken(#008cba, 10%);
15
- $button-hover-font-color: #fff;
16
- $button-font-color: invert($button-default-color);
17
- $canvas-menu-bg-image: url(hero-splash/seaweed.png);
18
- //# end
19
- .application-container {
20
- @include display-flex;
21
- @include justify-content(flex-start);
22
- @include transition-property(left);
23
- @include transition-duration(0.3s);
24
- @include transition-timing-function(ease);
25
- position: absolute;
26
- top: 0px;
27
- height: 100%;
28
- @media #{$small-only} {
29
- width: 150%;
30
- }
31
- @media #{$medium-only} {
32
- width: 125%;
33
- }
34
- @media #{$large-up} {
35
- width: 100%;
36
- left: 0px;
37
- }
38
- }
39
- .shifted {
40
- @media #{$medium-only} {
41
- left: -25%;
42
- }
43
- @media #{$small-only} {
44
- left: -50%;
45
- }
46
- }
47
- #canvas-menu-left {
48
- @media #{$small-only} {
49
- width: 50%;
50
- }
51
- @media #{$medium-only} {
52
- width: 25%;
53
- }
54
- @media #{$large-up} {
55
- width: 15%;
56
- }
57
- height: 100%;
58
- background: {
59
- color: $canvas-menu-bg-color;
60
- image: $canvas-menu-bg-image;
61
- position: left bottom;
62
- size: contain;
63
- repeat: no-repeat;
64
- }
65
- }
66
- #page-wrapper {
67
- width: 100%;
68
- @media #{$large-up} {
69
- width: 85%;
70
- }
71
- height: 100%;
72
- overflow-y: auto;
73
- }
74
- .small-time-header {
75
- position: absolute;
76
- padding: 15px;
77
- background-color: $menu-bar-icon-color;
78
- }
79
- .site-nav {
80
- .nav-button {
81
- width: 100%;
82
- text-align: $nav-button-text-align;
83
- }
84
- .side-nav {
85
- @include transition-property(background-color);
86
- @include transition-duration(300ms);
87
- @include transition-timing-function(ease-out);
88
- margin-bottom: 0px;
89
- padding-left: $button-horizontal-padding;
90
- padding-right: $button-horizontal-padding;
91
- padding-top: $button-vertical-padding;
92
- padding-bottom: $button-vertical-padding;
93
- font-size: $button-font-size;
94
- color: $button-font-color;
95
- border-bottom: $button-border-bottom;
96
- background-color: $button-default-color;
97
- &.active {
98
- background-color: $button-active-color;
99
- color: $button-active-font-color;
100
- }
101
- &:hover {
102
- background-color: $button-hover-color;
103
- color: $button-hover-font-color;
104
- }
105
- }
106
- }
3
+ <%= render template: "stylesheets/apiv1/components/site-nav/left", context: self %>
107
4
  <% when :top %>
108
- //# ruby
109
- $standard-container-height: 75px;
110
- $menu-tab-width: 125px;
111
- $company-title-font-size: 1.35rem;
112
- $nav-bar-bg-color: fade-out(#444, 0.25);
113
- $tab-vertical-padding: 15px;
114
- $tab-horizontal-padding: 15px;
115
- $tab-border: 1px solid #666;
116
- $title-font-color: #eee;
117
- $tab-font-default-color: #333;
118
- $tab-bg-default-color: #e7e7e7;
119
- $tab-bg-active-color: #008cba;
120
- $tab-font-active-color: #fff;
121
- $tab-bg-hover-color: darken(#008cba, 10%);
122
- $tab-font-hover-color: invert($tab-bg-default-color);
123
- //# end
124
- .application-container,
125
- #canvas-menu-top,
126
- #page-wrapper {
127
- position: absolute;
128
- }
129
- .application-container,
130
- #canvas-menu-top {
131
- top: 0px;
132
- }
133
- .application-container,
134
- #page-wrapper {
135
- height: 100%;
136
- width: 100%;
137
- }
138
-
139
- #page-wrapper {
140
- padding-top: $standard-container-height;
141
- overflow-y: auto;
142
- }
143
-
144
- nav.site-nav {
145
- position: fixed;
146
- z-index: 9999;
147
- top: 0px;
148
- left: 0px;
149
- width: 100%;
150
- @include display-flex;
151
- @include justify-content(center);
152
- background: {
153
- color: $nav-bar-bg-color;
154
- }
155
- .possible-container {
156
- @include display-flex;
157
- @include justify-content(space-between);
158
- width: $row-width;
159
- height: $standard-container-height;
160
- }
161
- .options-menu {
162
- @include display-flex;
163
- @include justify-content(flex-end);
164
- @include align-items(stretch);
165
- width: 80%;
166
- height: 100%;
167
- }
168
- .title-area {
169
- // padding-top: $tab-vertical-padding;
170
- // padding-bottom: $tab-vertical-padding;
171
- @include display-flex;
172
- @include flex-direction(column);
173
- @include justify-content(center);
174
- padding-left: $tab-horizontal-padding;
175
- font-size: $company-title-font-size;
176
- color: $title-font-color;
177
- width: 20%;
178
- height: 100%;
179
- }
180
- .menu-tab {
181
- // padding-top: $tab-vertical-padding;
182
- // padding-bottom: $tab-vertical-padding;
183
- @include display-flex;
184
- @include flex-direction(column);
185
- @include justify-content(center);
186
- @include align-items(center);
187
- @include transition-property(background-color);
188
- @include transition-duration(300ms);
189
- @include transition-timing-function(ease-out);
190
- font-size: $company-title-font-size;
191
- width: $menu-tab-width;
192
- border-left: $tab-border;
193
- color: $tab-font-default-color;
194
- background: {
195
- color: $tab-bg-default-color;
196
- }
197
- .menu-nav {
198
- text-align: center;
199
- }
200
- &:last-child {
201
- border-right: $tab-border;
202
- }
203
- &.active {
204
- background-color: $tab-bg-active-color;
205
- color: $tab-font-active-color;
206
- }
207
- &:hover {
208
- background-color: $tab-bg-hover-color;
209
- color: $tab-font-hover-color;
210
- }
211
- }
212
- }
5
+ <%= render template: "stylesheets/apiv1/components/site-nav/top", context: self %>
6
+ <% when :material %>
7
+ <%= render template: "stylesheets/apiv1/components/site-nav/material", context: self %>
213
8
  <% end %>
@@ -0,0 +1,104 @@
1
+ //# ruby
2
+ $canvas-menu-bg-color: #666;
3
+ $menu-bar-icon-color: fade-out(#fff, 0.7);
4
+ $nav-button-text-align: center;
5
+ $button-horizontal-padding: 15px;
6
+ $button-vertical-padding: 25px;
7
+ $button-font-size: 1.25rem;
8
+ $button-border-bottom: 1px solid darken($canvas-menu-bg-color, 10%);
9
+ $button-default-color: #e7e7e7;
10
+ $button-active-color: #008cba;
11
+ $button-active-font-color: #fff;
12
+ $button-hover-color: darken(#008cba, 10%);
13
+ $button-hover-font-color: #fff;
14
+ $button-font-color: invert($button-default-color);
15
+ $canvas-menu-bg-image: url(hero-splash/seaweed.png);
16
+ //# end
17
+ .application-container {
18
+ @include display-flex;
19
+ @include justify-content(flex-start);
20
+ @include transition-property(left);
21
+ @include transition-duration(0.3s);
22
+ @include transition-timing-function(ease);
23
+ position: absolute;
24
+ top: 0px;
25
+ height: 100%;
26
+ @media #{$small-only} {
27
+ width: 150%;
28
+ }
29
+ @media #{$medium-only} {
30
+ width: 125%;
31
+ }
32
+ @media #{$large-up} {
33
+ width: 100%;
34
+ left: 0px;
35
+ }
36
+ }
37
+ .shifted {
38
+ @media #{$medium-only} {
39
+ left: -25%;
40
+ }
41
+ @media #{$small-only} {
42
+ left: -50%;
43
+ }
44
+ }
45
+ #canvas-menu-left {
46
+ @media #{$small-only} {
47
+ width: 50%;
48
+ }
49
+ @media #{$medium-only} {
50
+ width: 25%;
51
+ }
52
+ @media #{$large-up} {
53
+ width: 15%;
54
+ }
55
+ height: 100%;
56
+ background: {
57
+ color: $canvas-menu-bg-color;
58
+ image: $canvas-menu-bg-image;
59
+ position: left bottom;
60
+ size: contain;
61
+ repeat: no-repeat;
62
+ }
63
+ }
64
+ #page-wrapper {
65
+ width: 100%;
66
+ @media #{$large-up} {
67
+ width: 85%;
68
+ }
69
+ height: 100%;
70
+ overflow-y: auto;
71
+ }
72
+ .small-time-header {
73
+ position: absolute;
74
+ padding: 15px;
75
+ background-color: $menu-bar-icon-color;
76
+ }
77
+ .site-nav {
78
+ .nav-button {
79
+ width: 100%;
80
+ text-align: $nav-button-text-align;
81
+ }
82
+ .side-nav {
83
+ @include transition-property(background-color);
84
+ @include transition-duration(300ms);
85
+ @include transition-timing-function(ease-out);
86
+ margin-bottom: 0px;
87
+ padding-left: $button-horizontal-padding;
88
+ padding-right: $button-horizontal-padding;
89
+ padding-top: $button-vertical-padding;
90
+ padding-bottom: $button-vertical-padding;
91
+ font-size: $button-font-size;
92
+ color: $button-font-color;
93
+ border-bottom: $button-border-bottom;
94
+ background-color: $button-default-color;
95
+ &.active {
96
+ background-color: $button-active-color;
97
+ color: $button-active-font-color;
98
+ }
99
+ &:hover {
100
+ background-color: $button-hover-color;
101
+ color: $button-hover-font-color;
102
+ }
103
+ }
104
+ }
@@ -0,0 +1,75 @@
1
+ $company-title-font-size: 1.35rem;
2
+ $nav-bar-bg-color: fade-out(#444, 0.25);
3
+ $title-font-color: #eee;
4
+ $tab-font-default-color: #333;
5
+ $tab-bg-default-color: #e7e7e7;
6
+ $tab-bg-active-color: #008cba;
7
+ $tab-font-active-color: #fff;
8
+ $tab-bg-hover-color: darken(#008cba, 10%);
9
+ $tab-font-hover-color: #ddd;
10
+ #canvas-menu-top {
11
+ position: absolute;
12
+ width: 100%;
13
+ z-index: 9999;
14
+ }
15
+ #page-wrapper {
16
+ position: absolute;
17
+ width: 100%;
18
+ height: 100%;
19
+ overflow-y: auto;
20
+ }
21
+ #admin {
22
+ margin-top: 65px;
23
+ }
24
+ nav.site-nav {
25
+ @include display-flex;
26
+ @include justify-content(center);
27
+ @include align-items(center);
28
+ @include flex-direction(row);
29
+ @include transition-property(box-shadow);
30
+ @include transition-property(background-color);
31
+ @include transition-duration(200ms);
32
+ @include transition-timing-function(ease-in);
33
+
34
+ width: 100%;
35
+ &.sticky-naved {
36
+ @include box-shadow(black 0px 5px 10px);
37
+ position: fixed;
38
+ top: 0px;
39
+ left: 0px;
40
+ background-color: white;
41
+ }
42
+ .possible-container {
43
+ width: $row-width;
44
+ }
45
+ .title-area {
46
+ padding-left: 15px;
47
+ font-size: 2rem;
48
+ }
49
+ .title-area,
50
+ .menu-tab {
51
+ @include display-flex;
52
+ @include justify-content(center);
53
+ @include flex-direction(column);
54
+ height: 65px;
55
+ }
56
+ .menu-tab {
57
+ @include align-items(center);
58
+ }
59
+ .menu-tab {
60
+ @include transition-property(background-color);
61
+ @include transition-duration(300ms);
62
+ @include transition-timing-function(ease-out);
63
+ font-size: $company-title-font-size;
64
+ color: $tab-font-default-color;
65
+ text-align: center;
66
+ &.active {
67
+ background-color: $tab-bg-active-color;
68
+ color: $tab-font-active-color;
69
+ }
70
+ &:hover {
71
+ background-color: $tab-bg-hover-color;
72
+ color: $tab-font-hover-color;
73
+ }
74
+ }
75
+ }
@@ -0,0 +1,105 @@
1
+ //# ruby
2
+ $standard-container-height: 75px;
3
+ $menu-tab-width: 125px;
4
+ $company-title-font-size: 1.35rem;
5
+ $nav-bar-bg-color: fade-out(#444, 0.25);
6
+ $tab-vertical-padding: 15px;
7
+ $tab-horizontal-padding: 15px;
8
+ $tab-border: 1px solid #666;
9
+ $title-font-color: #eee;
10
+ $tab-font-default-color: #333;
11
+ $tab-bg-default-color: #e7e7e7;
12
+ $tab-bg-active-color: #008cba;
13
+ $tab-font-active-color: #fff;
14
+ $tab-bg-hover-color: darken(#008cba, 10%);
15
+ $tab-font-hover-color: invert($tab-bg-default-color);
16
+ //# end
17
+ .application-container,
18
+ #canvas-menu-top,
19
+ #page-wrapper {
20
+ position: absolute;
21
+ }
22
+ .application-container,
23
+ #canvas-menu-top {
24
+ top: 0px;
25
+ }
26
+ .application-container,
27
+ #page-wrapper {
28
+ height: 100%;
29
+ width: 100%;
30
+ }
31
+
32
+ #page-wrapper {
33
+ padding-top: $standard-container-height;
34
+ overflow-y: auto;
35
+ }
36
+
37
+ nav.site-nav {
38
+ position: fixed;
39
+ z-index: 9999;
40
+ top: 0px;
41
+ left: 0px;
42
+ width: 100%;
43
+ @include display-flex;
44
+ @include justify-content(center);
45
+ background: {
46
+ color: $nav-bar-bg-color;
47
+ }
48
+ .possible-container {
49
+ @include display-flex;
50
+ @include justify-content(space-between);
51
+ width: $row-width;
52
+ height: $standard-container-height;
53
+ }
54
+ .options-menu {
55
+ @include display-flex;
56
+ @include justify-content(flex-end);
57
+ @include align-items(stretch);
58
+ width: 80%;
59
+ height: 100%;
60
+ }
61
+ .title-area {
62
+ // padding-top: $tab-vertical-padding;
63
+ // padding-bottom: $tab-vertical-padding;
64
+ @include display-flex;
65
+ @include flex-direction(column);
66
+ @include justify-content(center);
67
+ padding-left: $tab-horizontal-padding;
68
+ font-size: $company-title-font-size;
69
+ color: $title-font-color;
70
+ width: 20%;
71
+ height: 100%;
72
+ }
73
+ .menu-tab {
74
+ // padding-top: $tab-vertical-padding;
75
+ // padding-bottom: $tab-vertical-padding;
76
+ @include display-flex;
77
+ @include flex-direction(column);
78
+ @include justify-content(center);
79
+ @include align-items(center);
80
+ @include transition-property(background-color);
81
+ @include transition-duration(300ms);
82
+ @include transition-timing-function(ease-out);
83
+ font-size: $company-title-font-size;
84
+ width: $menu-tab-width;
85
+ border-left: $tab-border;
86
+ color: $tab-font-default-color;
87
+ background: {
88
+ color: $tab-bg-default-color;
89
+ }
90
+ .menu-nav {
91
+ text-align: center;
92
+ }
93
+ &:last-child {
94
+ border-right: $tab-border;
95
+ }
96
+ &.active {
97
+ background-color: $tab-bg-active-color;
98
+ color: $tab-font-active-color;
99
+ }
100
+ &:hover {
101
+ background-color: $tab-bg-hover-color;
102
+ color: $tab-font-hover-color;
103
+ }
104
+ }
105
+ }
data/lib/cloudrider.rb CHANGED
@@ -1,4 +1,7 @@
1
1
  require "cloudrider/version"
2
2
  module Cloudrider
3
3
  require "cloudrider/application_commander"
4
+ def self.root
5
+ File.expand_path "../"
6
+ end
4
7
  end
@@ -1,8 +1,6 @@
1
1
  class Cloudrider::Apiv1::SiteNavComponent < Cloudrider::Apiv1::Base
2
2
  class Context
3
- def nav_style
4
- :top
5
- end
3
+ attr_accessor :nav_style
6
4
  def my_company_name
7
5
  "Cloudrider"
8
6
  end
@@ -10,6 +8,8 @@ class Cloudrider::Apiv1::SiteNavComponent < Cloudrider::Apiv1::Base
10
8
 
11
9
  private
12
10
  def _context
13
- Context.new
11
+ Context.new.tap do |c|
12
+ c.nav_style = (@style || :material).to_sym
13
+ end
14
14
  end
15
15
  end
@@ -1,11 +1,27 @@
1
1
  class Cloudrider::Apiv1::SiteNavSass < Cloudrider::Apiv1::Base
2
2
  class Context
3
- def nav_style
4
- :top
3
+ attr_accessor :nav_style
4
+ def render(template: template, context: context)
5
+ Tilt::ERBTemplate.new(_source _normalize template).render context
6
+ end
7
+ private
8
+ def _normalize(template)
9
+ template.split("/").head.push _unpartialize _extensionify template.split("/").last
10
+ end
11
+ def _unpartialize(filename)
12
+ filename.gsub /^_*/, '_'
13
+ end
14
+ def _extensionify(filename)
15
+ filename.gsub /\.css\.scss\.erb$/, ".css.scss.erb"
16
+ end
17
+ def _source(template)
18
+ File.join Cloudrider.root, "generica", "app", "varissets", template
5
19
  end
6
20
  end
7
21
  private
8
22
  def _context
9
- Context.new
23
+ Context.new.tap do |c|
24
+ c.nav_style = (@style || :material).to_sym
25
+ end
10
26
  end
11
27
  end
@@ -1,3 +1,3 @@
1
1
  module Cloudrider
2
- VERSION = "0.2.5"
2
+ VERSION = "0.2.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudrider
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Chen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-10 00:00:00.000000000 Z
11
+ date: 2014-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -272,6 +272,7 @@ files:
272
272
  - generica/app/assets/javascripts/templates/components/site-footer.emblem
273
273
  - generica/app/assets/javascripts/templates/components/site-nav.emblem
274
274
  - generica/app/assets/javascripts/templates/components/site-nav/_left-nav.emblem
275
+ - generica/app/assets/javascripts/templates/components/site-nav/_material-nav.emblem
275
276
  - generica/app/assets/javascripts/templates/components/site-nav/_top-nav.emblem
276
277
  - generica/app/assets/javascripts/templates/components/table-booths.emblem
277
278
  - generica/app/assets/javascripts/templates/components/tr-span.emblem
@@ -320,6 +321,7 @@ files:
320
321
  - generica/app/assets/stylesheets/apiv1/components/products-catalog/_expanding-media.css.scss
321
322
  - generica/app/assets/stylesheets/apiv1/components/products-showcase/_contained-media-one.css.scss
322
323
  - generica/app/assets/stylesheets/apiv1/components/site-nav/_left-nav.css.scss
324
+ - generica/app/assets/stylesheets/apiv1/components/site-nav/_material-nav.css.scss
323
325
  - generica/app/assets/stylesheets/apiv1/components/site-nav/_top-nav.css.scss
324
326
  - generica/app/assets/stylesheets/apiv1/modals/_login.css.scss
325
327
  - generica/app/assets/stylesheets/apiv1/products/product/_show.css.scss
@@ -406,6 +408,9 @@ files:
406
408
  - generica/app/varissets/stylesheets/apiv1/components/_products-showcase.css.scss.erb
407
409
  - generica/app/varissets/stylesheets/apiv1/components/_site-nav.css.scss.erb
408
410
  - generica/app/varissets/stylesheets/apiv1/components/_table-booths.css.scss.erb
411
+ - generica/app/varissets/stylesheets/apiv1/components/site-nav/_left.css.scss.erb
412
+ - generica/app/varissets/stylesheets/apiv1/components/site-nav/_material.css.scss.erb
413
+ - generica/app/varissets/stylesheets/apiv1/components/site-nav/_top.css.scss.erb
409
414
  - generica/app/views/apiv1/home/index.html.haml
410
415
  - generica/app/views/apiv1/layouts/application.html.haml
411
416
  - generica/app/views/layouts/application.html.erb