cloudrider 0.2.15 → 0.2.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (22) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -0
  3. data/generica/app/assets/javascripts/components/form-for.js.em +1 -0
  4. data/generica/app/assets/javascripts/components/products-showcase.js.em +3 -0
  5. data/generica/app/assets/javascripts/controllers/messages/new_controller.js.em +1 -1
  6. data/generica/app/assets/javascripts/templates/products/product/show.emblem +8 -16
  7. data/generica/app/assets/stylesheets/apiv1/components/site-nav/_material-nav.css.scss +0 -1
  8. data/generica/app/varissets/javascripts/templates/components/cookie-splash.emblem.erb +2 -2
  9. data/generica/app/varissets/javascripts/templates/components/introductory-lobby.emblem.erb +24 -0
  10. data/generica/app/varissets/javascripts/templates/components/product-display.emblem.erb +26 -0
  11. data/generica/app/varissets/javascripts/templates/components/products-showcase.emblem.erb +29 -0
  12. data/generica/app/varissets/javascripts/templates/components/table-booths.emblem.erb +21 -1
  13. data/generica/app/varissets/stylesheets/apiv1/components/_introductory-lobby.css.scss.erb +49 -0
  14. data/generica/app/varissets/stylesheets/apiv1/components/_product-display.css.scss.erb +77 -5
  15. data/generica/app/varissets/stylesheets/apiv1/components/_product-listing.css.scss.erb +1 -1
  16. data/generica/app/varissets/stylesheets/apiv1/components/_products-showcase.css.scss.erb +38 -0
  17. data/generica/app/varissets/stylesheets/apiv1/components/_table-booths.css.scss.erb +34 -0
  18. data/lib/cloudrider/apiv1.rb +4 -3
  19. data/lib/cloudrider/apiv1/index_route_ember.rb +2 -2
  20. data/lib/cloudrider/apiv1/site_nav_component.rb +30 -29
  21. data/lib/cloudrider/version.rb +1 -1
  22. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 01b101e2344f6cf24a6cefe5e5bddf776b412095
4
- data.tar.gz: acb45e6e80c715bc8dc745a6a70f68d601e35bfe
3
+ metadata.gz: 0e41c6343e7641401018d24952562fa960a92ba9
4
+ data.tar.gz: d1adcf123c3c0a9ee959d6f61f95a0582f06a5aa
5
5
  SHA512:
6
- metadata.gz: 2e13b9dc710d32e2c948448b00eae35ac5226731a0721e9a9ea772e501b9b17f02a22a36f7413a44c5ca5737522fc941bc9b3b84b745665cd50a15b4c3b1fcc1
7
- data.tar.gz: bfb4d7bf37f3999b5151eca69872443af26aede767236097be62dfa4ac129e16b5b37cc8e2c95249c7d754040c64e87f5060041c863ff0fac9bb90f889b09a36
6
+ metadata.gz: e775b979c9366483f9ca798146882f4272b8b181d5bf591ded6bc002116c1157997a1e2e85d13d1195813adc607a08b6d64367d45e43d0f6c3ad9ecd9774aa9e
7
+ data.tar.gz: bc893c4728d8b3f0cf07d32dbf31962dc903147bc1a79ec30601e26b6e9e662a147e16e9f94a2da660162d6bcbaa949d1fa1a51b4eae9cf992fe2692058ee80d
data/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Cloudrider
2
2
 
3
+ Deployment use for restarting the server
4
+ ```bash
5
+ $ rake production:on_restart RAILS_ENV=production && kill -QUIT $(cat tmp/pids/unicorn.pid) && unicorn_rails -c config/unicorn.conf.rb -E production -D
6
+ ```
3
7
  FUTURE TODO:
4
8
  switch I18n translations to a key-value storage basis with a redis cluster
5
9
 
@@ -1,4 +1,5 @@
1
1
  class Apiv1.FormForComponent extends Ember.Component
2
+ classNames: ['form-for']
2
3
  formData: ->
3
4
  @$("form").serializeArray()
4
5
 
@@ -4,3 +4,6 @@ class Apiv1.ProductsShowcaseComponent extends Ember.Component
4
4
  +computed products.content.meta.count
5
5
  productsCount: ->
6
6
  @get "products.content.meta.count"
7
+
8
+ +computed products.@each
9
+ visibleProducts: -> @products.slice 0, 4
@@ -5,7 +5,7 @@ class Apiv1.MessagesNewController extends Ember.ObjectController
5
5
  @swapOutForm()
6
6
  @notifySuccess()
7
7
  swapOutForm: ->
8
- @alreadySubmitted = true
8
+ $(".form-for").hide "highlight", {}, 450, => @alreadySubmitted = true
9
9
  failedSave: (reason) ->
10
10
  Apiv1.Flash.register "warning", "uh-oh, the server is down", 5000 if reason.status is 500
11
11
  @failureReason = Apiv1.HashEx.camelize reason.responseJSON if reason.responseJSON
@@ -32,7 +32,7 @@
32
32
  span= product.price
33
33
  if product.place
34
34
  dt.upcase
35
- tr-span en="location"
35
+ tr-span en="origin"
36
36
  dd
37
37
  span= product.place
38
38
  if product.quality
@@ -40,6 +40,12 @@
40
40
  tr-span en="quality"
41
41
  dd
42
42
  span= product.quality
43
+ if product.others
44
+ dt.upcase
45
+ tr-span en="description"
46
+ dd
47
+ tr-span en=product.others
48
+
43
49
  if product.taxons
44
50
  .row
45
51
  .small-12.columns
@@ -48,13 +54,6 @@
48
54
  .taxon-tags
49
55
  each taxon in product.taxons
50
56
  span.tag= taxon.taxonName
51
- if product.others
52
- .row
53
- .small-12.columns
54
- h4.description.capitalize
55
- tr-span en="description"
56
- p.product-summary
57
- tr-span en=product.others
58
57
  .row
59
58
  .small-12.columns
60
59
  ul.pics.small-block-grid-3.medium-block-grid-6.large-block-grid-9
@@ -69,11 +68,4 @@
69
68
  tr-span en="related files"
70
69
  each attachment in product.attachments
71
70
  a href=attachment.fileUrl
72
- span.spacebar= attachment.fileName
73
-
74
- .row
75
- .small-12.columns
76
- .call-to-action
77
- tr-span en="is this what you are looking for?"
78
- a.button.email-us href="mailto:terricapo@gmail.com"
79
- tr-span en="send us an email"
71
+ span.spacebar= attachment.fileName
@@ -43,7 +43,6 @@ nav.site-nav {
43
43
  width: $row-width;
44
44
  }
45
45
  .title-area {
46
- padding-left: 15px;
47
46
  font-size: 2rem;
48
47
  }
49
48
  .title-area,
@@ -3,8 +3,8 @@
3
3
  .splash-background.standard-container
4
4
  .page-intro
5
5
  .active-page-title
6
- tr-span en="products"
7
- img.th.product-icon src=<%= icon_image_url.inspect %>
6
+ tr-span en=path
7
+ preload-image class="th product-icon" source=logo
8
8
 
9
9
  .standard-container
10
10
  .cookiecrumbs
@@ -23,4 +23,28 @@
23
23
  tr-span en=<%= sentence.inspect %>
24
24
  <% end %>
25
25
  .horizontal-cell.fishing-background
26
+ <% when :frame_thumbnail %>
27
+ .row
28
+ .small-12
29
+ .row
30
+ .small-12.medium-4.medium-offset-2.columns
31
+ .about-intro
32
+ h1.title.capitalize.intro
33
+ tr-span en="about us"
34
+ h3.company-bs.intro
35
+ tr-span en=<%= about_us_sentences.first.inspect %>
36
+ p.summaries.intro
37
+ <% about_us_sentences.tail.each do |sentence| %>
38
+ span.spacebar
39
+ tr-span en=<%= sentence.inspect %>
40
+ <% end %>
41
+
42
+ .small-12.medium-6.columns
43
+ preload-image class="th fishing-background" source="assets/introductory-lobby/fishing.jpg"
44
+ .row
45
+ .small-12.medium-6.columns
46
+ preload-image class="th fishing-background" source="assets/introductory-lobby/fishing.jpg"
47
+ .small-12.medium-6.columns
48
+ preload-image class="th fishing-background" source="assets/introductory-lobby/fishing.jpg"
49
+
26
50
  <% end %>
@@ -1,4 +1,30 @@
1
1
  <% case display_style %>
2
+ <% when :airbnb_quad %>
3
+ if product
4
+ .media-object
5
+ link-to "products.product.show" product.id
6
+ img.product-image src=product.pictures.firstObject.picUrl
7
+ .media-texts
8
+ link-to "products.product.show" product.id class="product-title"
9
+ tr-span en=product.material
10
+ if product.sku
11
+ span.predash= product.sku
12
+ if product.others
13
+ p.product-summary
14
+ tr-span en=product.others
15
+ if product.taxons
16
+ span.taxon-tags
17
+ each taxon in product.taxons
18
+ span.tag= taxon.taxonName
19
+ else
20
+ .media-object
21
+ img.product-image src="assets/product-display/failwhale.png"
22
+ .media-texts
23
+ .product-title
24
+ tr-span en="no results"
25
+ p.product-summary
26
+ tr-span en="or perhaps there are no products to load yet"
27
+
2
28
  <% when :media_one %>
3
29
  if product
4
30
  .media-object
@@ -1,4 +1,33 @@
1
1
  <% case showcase_style %>
2
+ <% when :airbnb_quad %>
3
+ .row
4
+ .small-12.columns
5
+ .showcase-title
6
+ tr-span en="current specials"
7
+
8
+ .row.products-row
9
+ if products.isPending
10
+ .small-12.medium-6.large-3.columns.end
11
+ .product-display
12
+ h2.capitalize.ellipsis
13
+ i.fa.fa-cog.fa-spin
14
+ tr-span en="loading..."
15
+ else
16
+ each product in visibleProducts
17
+ .small-12.medium-6.large-3.columns.airbnb-quad
18
+ product-display product=product
19
+ else
20
+ .small-12.medium-6.large-3.columns.airbnb-quad
21
+ product-display
22
+
23
+ .product-post-note
24
+ link-to "products.index"
25
+ h2.after-thought
26
+ span.spacebar= products.content.meta.count
27
+ span.capitalize.spacebar
28
+ tr-span en="total products"
29
+ i.fa.fa-caret-right
30
+
2
31
  <% when :big_media %>
3
32
  if products.isPending
4
33
  .contained-media-one.product-container
@@ -1,4 +1,24 @@
1
1
  <% case booth_style %>
2
+ <% when :card_by_side %>
3
+ .row
4
+ .small-12.medium-6.columns.filler-picture
5
+ .form-card
6
+ .title
7
+ tr-span en="contact us"
8
+ .contact-info
9
+ dl.various-info
10
+ dt.capitalize
11
+ tr-span en="address"
12
+ dd <%= company_address %>
13
+ dt.capitalize
14
+ tr-span en="phone"
15
+ dd <%= company_phone_number %>
16
+ dt.capitalize
17
+ tr-span en="email"
18
+ dd <%= company_email %>
19
+
20
+ .small-12.medium-6.columns.form-card
21
+ == render "messages/new" message
2
22
  <% when :just_contact %>
3
23
  .contact-us-picture.large-6.columns.show-for-large-up
4
24
  .ctn
@@ -14,7 +34,7 @@
14
34
 
15
35
  .contact-form-side.small-12.large-6.columns
16
36
  == render "messages/new" message
17
- <% :just_cards %>
37
+ <% when :just_cards %>
18
38
  .business-cards
19
39
  .row
20
40
  each employee in employees
@@ -36,5 +36,54 @@
36
36
  position: <%= background_image_position %>;
37
37
  }
38
38
  }
39
+ <% when :frame_thumbnail %>
40
+ @include display-flex;
41
+ @include justify-content(space-between);
42
+ margin-bottom: 3.5rem;
43
+ .about-intro {
44
+ @include display-flex;
45
+ @include flex-direction(column);
46
+ @include justify-content(center);
47
+ @include align-items(flex-end);
48
+ @media #{$small-only} {
49
+ min-height: 100px;
50
+ }
51
+ @media #{$medium-up} {
52
+ min-height: 445px;
53
+ }
54
+ }
55
+ .intro {
56
+ @media #{$small-only} {
57
+ text-align: left;
58
+ }
59
+ @media #{$medium-up} {
60
+ text-align: right;
61
+ }
62
+ }
63
+ .about-and-so {
64
+ @include display-flex;
65
+ @include flex-direction(column);
66
+ @include justify-content(center);
67
+ @include align-items(flex-start);
68
+ @media #{$small-only} {
69
+ min-height: 100px;
70
+ }
71
+ @media #{$medium-up} {
72
+ min-height: 445px;
73
+ }
74
+ }
75
+ .and-so {
76
+ text-align: left;
77
+ }
78
+ .fishing-background {
79
+ background: {
80
+ image: url(introductory-lobby/fishing.jpg);
81
+ size: cover;
82
+ position: bottom left;
83
+ }
84
+ }
85
+ .summaries {
86
+ font-size: 1.2rem;
87
+ }
39
88
  <% end %>
40
89
  }
@@ -1,6 +1,75 @@
1
- .product-display {
2
1
  <% case display_style %>
2
+ <% when :airbnb_quad %>
3
+ $material-indigo: #3F51B5;
4
+ $material-blue: #2196F3;
5
+ $material-amber: #FFC107;
6
+ $material-orange: #FF9800;
7
+
8
+ .airbnb-quad {
9
+ .product-display {
10
+ background-color: $material-indigo;
11
+ color: fade-out(white, 0.13);
12
+ }
13
+ }
14
+ .product-display {
15
+ @include display-flex;
16
+ @include flex-direction(column);
17
+ @include justify-content(space-between);
18
+ @include transition-property(background-color);
19
+ @include transition-duration(300ms);
20
+ @include transition-timing-function(ease-out);
21
+ height: 250px;
22
+ margin-bottom: 1rem;
23
+ &:hover {
24
+ background-color: darken($material-indigo, 15%);
25
+ @include filter(brightness(0.95));
26
+ }
27
+
28
+ .media-texts {
29
+ text-align: center;
30
+ max-height: 200px;
31
+ padding-left: 1rem;
32
+ padding-right: 1rem;
33
+ padding-bottom: 1.5rem;
34
+ text-overflow: ellipsis;
35
+ }
36
+ img.product-image {
37
+ max-height: 250px;
38
+ width: 100%;
39
+ }
40
+ .product-title {
41
+ color: fade-out(white, 0.13);
42
+ font-size: 1.2rem;
43
+ font-weight: bold;
44
+ display: block;
45
+ text-transform: capitalize;
46
+ }
47
+ .product-summary {
48
+ font-size: 0.7rem;
49
+ }
50
+ .tag {
51
+ @include transition-property(background-color);
52
+ @include transition-duration(300ms);
53
+ @include transition-timing-function(ease-out);
54
+ background-color: darken(red, 25%);
55
+ &:hover {
56
+ background-color: darken(red, 15%);
57
+ }
58
+ &:before {
59
+ content: "+";
60
+ }
61
+ font-size: 0.7rem;
62
+ color: #ddd;
63
+ margin-left: 1rem;
64
+ padding-left: 5px;
65
+ padding-right: 10px;
66
+ padding-top: 2.5px;
67
+ padding-bottom: 2.5px;
68
+ margin-right: 10px;
69
+ }
70
+ }
3
71
  <% when :media_one %>
72
+ .product-display {
4
73
  .media-object {
5
74
  padding-left: 15px;
6
75
  @media #{$small-only} {
@@ -23,9 +92,12 @@
23
92
  min-height: 275px;
24
93
  }
25
94
  .product-title {
26
- font-size: 2rem;
95
+ font-size: 1.25rem;
27
96
  text-transform: capitalize;
28
97
  }
98
+ dl.product-specs {
99
+ font-size: 0.75rem;
100
+ }
29
101
  .taxon-tags {
30
102
  padding-bottom: 15px;
31
103
  }
@@ -42,7 +114,7 @@
42
114
  &:before {
43
115
  content: "+";
44
116
  }
45
- font-size: 1.15rem;
117
+ font-size: 1rem;
46
118
  color: #ddd;
47
119
  padding-left: 5px;
48
120
  padding-right: 10px;
@@ -50,5 +122,5 @@
50
122
  padding-bottom: 5px;
51
123
  margin-right: 10px;
52
124
  }
53
- <% end %>
54
- }
125
+ }
126
+ <% end %>
@@ -21,7 +21,7 @@
21
21
  width: 100%;
22
22
  }
23
23
  .smaller-details {
24
- font-size: 0.85rem;
24
+ font-size: 0.8rem;
25
25
  }
26
26
  .media-object {
27
27
  margin-right: 15px;
@@ -1,5 +1,43 @@
1
1
  .products-showcase {
2
2
  <% case showcase_style %>
3
+ <% when :airbnb_quad %>
4
+ .products-row {
5
+ margin-bottom: 2.5rem;
6
+ }
7
+ .showcase-title {
8
+ margin-top: 3.5rem;
9
+ margin-bottom: 3.5rem;
10
+ text-align: center;
11
+ font-size: 2rem;
12
+ text-transform: capitalize;
13
+ }
14
+ .product-pre-note {
15
+ @include display-flex;
16
+ @include justify-content(center);
17
+ @include flex-direction(column);
18
+ background: {
19
+ image: url(hero-splash/rocks.jpg);
20
+ size: cover;
21
+ position: top center;
22
+ }
23
+ min-height: 30rem;
24
+ }
25
+ .product-post-note {
26
+ @include display-flex;
27
+ @include justify-content(center);
28
+ @include flex-direction(column);
29
+ background: {
30
+ image: url(hero-splash/rocks.jpg);
31
+ size: cover;
32
+ position: bottom center;
33
+ }
34
+ min-height: 30rem;
35
+ }
36
+ .after-thought {
37
+ text-align: center;
38
+ font-weight: bolder;
39
+ background-color: fade-out(#fff, 0.4);
40
+ }
3
41
  <% when :big_media %>
4
42
  .contained-media-one {
5
43
  padding-top: 5rem;
@@ -1,5 +1,39 @@
1
1
  .table-booths {
2
2
  <% case booth_style %>
3
+ <% when :card_by_side %>
4
+ .filler-picture {
5
+ @include display-flex;
6
+ @include justify-content(center);
7
+ @include flex-direction(column);
8
+ }
9
+ .label-text {
10
+ color: #444;
11
+ }
12
+ .title {
13
+ text-align: right;
14
+ text-transform: capitalize;
15
+ color: #444;
16
+ font-size: 1.25rem;
17
+ font-weight: bold;
18
+ }
19
+ .form-card {
20
+ @include box-shadow(black 0px 0px 10px);
21
+ padding: 3rem 1rem 1rem 1rem;
22
+ margin-bottom: 3rem;
23
+ background: {
24
+ color: #f3f3f3;
25
+ }
26
+ }
27
+ .thank-you-card {
28
+ background: {
29
+ color: darken(green, 10%);
30
+ }
31
+ text-align: center;
32
+ color: #eee;
33
+ font-size: 2.5rem;
34
+ padding-top: 5rem;
35
+ padding-bottom: 5rem;
36
+ }
3
37
  <% when :just_contact %>
4
38
  .contact-form-side {
5
39
  background-color: #666;
@@ -11,15 +11,16 @@ module Cloudrider::Apiv1
11
11
  File.expand_path "../../../generica", __FILE__
12
12
  end
13
13
  def file_name_from_class_name(class_name)
14
- case family_from_class_name(class_name.to_s)
14
+ family = family_from_class_name(class_name.to_s)
15
+ case family
15
16
  when :component
16
17
  _file_name_process.call(class_name.to_s).join("-")
17
18
  when :sass
18
19
  "_" + _file_name_process.call(class_name.to_s).join("-")
19
- when :emblem
20
+ when :emblem, :ember
20
21
  _file_name_process.call(class_name.to_s).join("_")
21
22
  else
22
- raise Base::UnknownFamilyResidence, class_name
23
+ raise Base::UnknownFamilyResidence, family
23
24
  end
24
25
  end
25
26
  def file_ext_from_class_name(class_name)
@@ -4,10 +4,10 @@ class Cloudrider::Apiv1::IndexRouteEmber < Cloudrider::Apiv1::Base
4
4
  end
5
5
  private
6
6
  def _folder
7
- "app/assets/javascripts/templates/routes"
7
+ "app/assets/javascripts/routes"
8
8
  end
9
9
  def _source_folder
10
- "app/varissets/javascripts/templates/routes"
10
+ "app/varissets/javascripts/routes"
11
11
  end
12
12
  def _context
13
13
  Context.new.tap do |c|
@@ -1,42 +1,43 @@
1
1
  class Cloudrider::Apiv1::SiteNavComponent < Cloudrider::Apiv1::Base
2
- class Context
3
- attr_accessor :nav_style
4
- def my_company_name
5
- "Cloudrider"
2
+ private
3
+ def _context
4
+ Context.new.tap do |c|
5
+ c.nav_style = (@style || :material).to_sym
6
6
  end
7
+ end
8
+ end
7
9
 
8
- def about_link
9
- if pages?
10
- '"about"'
11
- else
12
- '"index" (query-params anchor="about")'
13
- end
14
- end
10
+ class Cloudrider::Apiv1::SiteNavComponent::Context
11
+ attr_accessor :nav_style
12
+ def my_company_name
13
+ "Cloudrider"
14
+ end
15
15
 
16
- def products_link
17
- if pages?
18
- '"products.index"'
19
- else
20
- '"index" (query-params anchor="products")'
16
+ def about_link
17
+ if pages?
18
+ '"about"'
19
+ else
20
+ '"index" (query-params anchor="about")'
21
21
  end
22
+ end
22
23
 
23
- def contacts_link
24
- if pages?
25
- '"contacts"'
26
- else
27
- '"index" (query-params anchor="contacts")'
28
- end
24
+ def products_link
25
+ if pages?
26
+ '"products.index"'
27
+ else
28
+ '"index" (query-params anchor="products")'
29
29
  end
30
+ end
30
31
 
31
- def pages?
32
- true
32
+ def contacts_link
33
+ if pages?
34
+ '"contacts"'
35
+ else
36
+ '"index" (query-params anchor="contacts")'
33
37
  end
34
38
  end
35
39
 
36
- private
37
- def _context
38
- Context.new.tap do |c|
39
- c.nav_style = (@style || :material).to_sym
40
- end
40
+ def pages?
41
+ true
41
42
  end
42
43
  end
@@ -1,3 +1,3 @@
1
1
  module Cloudrider
2
- VERSION = "0.2.15"
2
+ VERSION = "0.2.18"
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.15
4
+ version: 0.2.18
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-12 00:00:00.000000000 Z
11
+ date: 2014-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler