Adjusting markup and adding classes to target elements as needed for responsive styling

This commit is contained in:
summerscope
2014-07-18 12:52:59 +10:00
parent 29058fa7cc
commit fca552b254
3 changed files with 53 additions and 47 deletions

View File

@@ -13,7 +13,7 @@
= render partial: "shop/products/filters"
.small-12.medium-4.large-4.columns
%input.button.primary.right{type: :submit, value: "Add to Cart"}
%input.button.primary.right{type: :submit, value: "Checkout now"}
%div.pad-top{bindonce: true}
%product.animate-repeat{"ng-controller" => "ProductNodeCtrl",
@@ -46,5 +46,5 @@
Try another search?
.row
.small-12.columns
%input.button.primary.right.add_to_cart{type: :submit, value: "Add to Cart"}
%input.button.primary.right.add_to_cart{type: :submit, value: "Checkout now"}

View File

@@ -1,9 +1,10 @@
.small-12.medium-4.large-4.columns
{{ product.master.name_to_display }}
%span.bulk-buy{"bo-if" => "product.group_buy"}
%i.ofn-i_056-bulk
%em
Bulk
.small-12.medium-4.large-4.columns.variant-name
.table-cell
.inline {{ product.master.name_to_display }}
.bulk-buy.inline{"bo-if" => "product.group_buy"}
%i.ofn-i_056-bulk><
%em><
\ Bulk
-# WITHOUT GROUP BUY
.small-4.medium-3.large-3.columns.text-right{"bo-if" => "!product.group_buy"}
@@ -37,16 +38,16 @@
name: "variant_attributes[{{product.master.id}}][max_quantity]",
"ng-model" => "product.max_quantity"}
.small-4.medium-1.large-1.columns.variant-unit
%em {{ product.master.unit_to_display }}
.small-2.medium-1.large-1.columns.variant-unit
.table-cell
%em {{ product.master.unit_to_display }}
.small-4.medium-2.large-2.columns
%span
.small-3.medium-2.large-2.columns.variant-price
.table-cell
%i.ofn-i_009-close
{{ product.price | currency }}
.small-12.medium-2.large-2.columns.text-right
%span
%i.ofn-i_009-close
.small-3.medium-2.large-2.columns.total-price.text-right
.table-cell
%strong $10,000.95

View File

@@ -1,9 +1,13 @@
.row.variants{bindonce: true,
"ng-repeat" => "variant in product.variants track by variant.id"}
.small-12.medium-4.large-4.columns
{{ variant.name_to_display }}
%i.ofn-i_056-bulk{"bo-if" => "product.group_buy"}
.small-12.medium-4.large-4.columns.variant-name
.table-cell
.inline {{ variant.name_to_display }}
.bulk-buy.inline{"bo-if" => "product.group_buy"}
%i.ofn-i_056-bulk><
%em><
\ Bulk
-# WITHOUT GROUP BUY
.small-4.medium-3.large-3.columns.text-right{"bo-if" => "!product.group_buy"}
@@ -15,37 +19,38 @@
max: "{{variant.on_demand && 9999 || variant.count_on_hand }}",
name: "variants[{{variant.id}}]", id: "variants_{{variant.id}}",
"bo-model" => "variant.quantity"}
.small-4.medium-1.large-1.columns.variant-unit
%em {{ variant.unit_to_display }}
.small-4.medium-2.large-2.columns
%span
-# WITH GROUP BUY
.small-4.medium-3.large-3.columns.text-right{"bo-if" => "product.group_buy"}
%span.bulk-input-container
%span.bulk-input
%input.bulk.first{type: :number,
value: nil,
min: 0,
placeholder: "min",
"ofn-disable-scroll" => true,
max: "{{variant.on_demand && 9999 || variant.count_on_hand }}",
name: "variants[{{variant.id}}]", id: "variants_{{variant.id}}",
"bo-model" => "variant.quantity"}
%span.bulk-input{"bo-if" => "product.group_buy"}
%input.bulk.second{type: :number,
min: 0,
placeholder: "max",
"ofn-disable-scroll" => true,
max: "{{variant.on_demand && 9999 || variant.count_on_hand }}",
name: "variant_attributes[{{variant.id}}][max_quantity]",
"ng-model" => "variant.max_quantity"}
.small-2.medium-1.large-1.columns.variant-unit
.table-cell
%em {{ variant.unit_to_display }}
.small-3.medium-2.large-2.columns.variant-price
.table-cell
%i.ofn-i_009-close
{{ variant.price | currency }}
-# WITH GROUP BUY
/ .small-2.columns{"bo-if" => "product.group_buy"}
/ %input{type: :number,
/ value: nil,
/ min: 0,
/ placeholder: "min",
/ "ofn-disable-scroll" => true,
/ max: "{{variant.on_demand && 9999 || variant.count_on_hand }}",
/ name: "variants[{{variant.id}}]", id: "variants_{{variant.id}}",
/ "bo-model" => "variant.quantity"}
/ .small-3.columns{"bo-if" => "product.group_buy"}
/ %input{type: :number,
/ min: 0,
/ placeholder: "max",
/ "ofn-disable-scroll" => true,
/ max: "{{variant.on_demand && 9999 || variant.count_on_hand }}",
/ name: "variant_attributes[{{variant.id}}][max_quantity]",
/ "ng-model" => "variant.max_quantity"}
/ %em {{ variant.unit_to_display }}
.small-12.medium-2.large-2.columns.text-right
%span
%i.ofn-i_009-close
.small-3.medium-2.large-2.columns.total-price.text-right
.table-cell
%strong $10,000.95