nimbleshop_simply 0.0.1.rc1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +11 -0
- data/app/assets/images/nimbleshop_simply/cart.png +0 -0
- data/app/assets/images/nimbleshop_simply/cart_button.png +0 -0
- data/app/assets/images/nimbleshop_simply/cart_hover.png +0 -0
- data/app/assets/images/nimbleshop_simply/facebook.png +0 -0
- data/app/assets/images/nimbleshop_simply/lock.png +0 -0
- data/app/assets/images/nimbleshop_simply/mail.png +0 -0
- data/app/assets/images/nimbleshop_simply/twitter.png +0 -0
- data/app/assets/javascripts/nimbleshop_simply/application.js +21 -0
- data/app/assets/javascripts/nimbleshop_simply/load_states.js.coffee +40 -0
- data/app/assets/javascripts/nimbleshop_simply/order.js.coffee +2 -0
- data/app/assets/javascripts/nimbleshop_simply/remove_item_from_cart.js.coffee +6 -0
- data/app/assets/javascripts/nimbleshop_simply/shipping_address_same_as_billing_address.js.coffee +11 -0
- data/app/assets/javascripts/nimbleshop_simply/thumbnail.js.coffee +14 -0
- data/app/assets/stylesheets/nimbleshop_simply/cart.css.scss +53 -0
- data/app/assets/stylesheets/nimbleshop_simply/cart_button.css.scss +59 -0
- data/app/assets/stylesheets/nimbleshop_simply/custom.css.scss +259 -0
- data/app/assets/stylesheets/nimbleshop_simply/override_bootstrap.css +11 -0
- data/app/assets/stylesheets/nimbleshop_simply/simply.css +14 -0
- data/app/assets/stylesheets/nimbleshop_simply/themed_bootstrap_and_overrides.css.less +36 -0
- data/app/controllers/nimbleshop_simply/application_controller.rb +37 -0
- data/app/controllers/nimbleshop_simply/carts_controller.rb +34 -0
- data/app/controllers/nimbleshop_simply/checkout/payments_controller.rb +19 -0
- data/app/controllers/nimbleshop_simply/checkout/shipping_addresses_controller.rb +31 -0
- data/app/controllers/nimbleshop_simply/checkout/shipping_methods_controller.rb +25 -0
- data/app/controllers/nimbleshop_simply/orders_controller.rb +24 -0
- data/app/controllers/nimbleshop_simply/pages_controller.rb +13 -0
- data/app/controllers/nimbleshop_simply/product_groups_controller.rb +18 -0
- data/app/controllers/nimbleshop_simply/products_controller.rb +30 -0
- data/app/helpers/nimbleshop_simply/application_helper.rb +24 -0
- data/app/views/layouts/_footer.html.erb +30 -0
- data/app/views/layouts/_google_analytics.html.erb +12 -0
- data/app/views/layouts/_top_bar.html.erb +24 -0
- data/app/views/layouts/_twitter.html.erb +4 -0
- data/app/views/layouts/email.html.erb +3 -0
- data/app/views/layouts/simply.html.erb +65 -0
- data/app/views/nimbleshop_simply/carts/_empty_cart.html.erb +4 -0
- data/app/views/nimbleshop_simply/carts/_line_item.html.erb +38 -0
- data/app/views/nimbleshop_simply/carts/show.html.erb +51 -0
- data/app/views/nimbleshop_simply/checkout/payments/new.html.erb +16 -0
- data/app/views/nimbleshop_simply/checkout/shipping_addresses/_billing_address.html.erb +76 -0
- data/app/views/nimbleshop_simply/checkout/shipping_addresses/_contact_information.html.erb +16 -0
- data/app/views/nimbleshop_simply/checkout/shipping_addresses/_error.html.erb +33 -0
- data/app/views/nimbleshop_simply/checkout/shipping_addresses/_shipping_address.html.erb +82 -0
- data/app/views/nimbleshop_simply/checkout/shipping_addresses/new.html.erb +20 -0
- data/app/views/nimbleshop_simply/checkout/shipping_methods/_error.html.erb +9 -0
- data/app/views/nimbleshop_simply/checkout/shipping_methods/_no_shipping_method.html.erb +4 -0
- data/app/views/nimbleshop_simply/checkout/shipping_methods/_shipping_methods.html.erb +14 -0
- data/app/views/nimbleshop_simply/checkout/shipping_methods/new.html.erb +18 -0
- data/app/views/nimbleshop_simply/link_groups/_link_group.html.erb +9 -0
- data/app/views/nimbleshop_simply/nimbleshohp_simply/_footer.html.erb +30 -0
- data/app/views/nimbleshop_simply/nimbleshohp_simply/_google_analytics.html.erb +12 -0
- data/app/views/nimbleshop_simply/nimbleshohp_simply/_top_bar.html.erb +24 -0
- data/app/views/nimbleshop_simply/nimbleshohp_simply/_twitter.html.erb +4 -0
- data/app/views/nimbleshop_simply/nimbleshohp_simply/application.html.erb +65 -0
- data/app/views/nimbleshop_simply/nimbleshohp_simply/email.html.erb +3 -0
- data/app/views/nimbleshop_simply/orders/show.html.erb +16 -0
- data/app/views/nimbleshop_simply/pages/about_us.html.erb +14 -0
- data/app/views/nimbleshop_simply/pages/contact_us.html.erb +17 -0
- data/app/views/nimbleshop_simply/product_groups/show.html.erb +7 -0
- data/app/views/nimbleshop_simply/products/_breadcrumb.html.erb +11 -0
- data/app/views/nimbleshop_simply/products/_link_group.html.erb +9 -0
- data/app/views/nimbleshop_simply/products/_product.html.erb +13 -0
- data/app/views/nimbleshop_simply/products/_products.html.erb +18 -0
- data/app/views/nimbleshop_simply/products/_sidebar.html.erb +5 -0
- data/app/views/nimbleshop_simply/products/index.html.erb +7 -0
- data/app/views/nimbleshop_simply/products/show.html.erb +62 -0
- data/app/views/nimbleshop_simply/shared/_order_summary.html.erb +18 -0
- data/app/views/nimbleshop_simply/shared/_order_summary_line_items.html.erb +30 -0
- data/app/views/nimbleshop_simply/shared/_order_summary_shipping_address.html.erb +30 -0
- data/app/views/nimbleshop_simply/shared/_order_summary_shipping_method.html.erb +16 -0
- data/app/views/nimbleshop_simply/shared/_shipping_and_tax_info.html.erb +16 -0
- data/config/routes.rb +25 -0
- data/lib/nimbleshop_simply/engine.rb +11 -0
- data/lib/nimbleshop_simply/version.rb +3 -0
- data/lib/nimbleshop_simply.rb +2 -0
- metadata +154 -0
data/README.md
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# nimbleshop_simply extension
|
2
|
+
|
3
|
+
This is simply theme for [nimbleShop](http://nimbleShop.org) .
|
4
|
+
|
5
|
+
# Documentation
|
6
|
+
|
7
|
+
Documentation is available at [http://nimbleshop.org](http://nimbleshop.org) .
|
8
|
+
|
9
|
+
# License
|
10
|
+
|
11
|
+
nimbleshop_simply uses [MIT license](http://www.opensource.org/licenses/mit-license.php) .
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,21 @@
|
|
1
|
+
|
2
|
+
//= require jquery-1.7.1
|
3
|
+
//= require jquery-ui-1.8.16
|
4
|
+
//= require jquery-ujs
|
5
|
+
//= require accounting
|
6
|
+
|
7
|
+
/* bootstrap must be after jquery-ujs */
|
8
|
+
//= require twitter/bootstrap
|
9
|
+
|
10
|
+
// loaded using fancybox-rails gem
|
11
|
+
//= require fancybox
|
12
|
+
|
13
|
+
//= require utils/formatNumber
|
14
|
+
//= require utils/formatPrice
|
15
|
+
//= require loading_state_for_buttons
|
16
|
+
|
17
|
+
//= require nimbleshop_simply/shipping_address_same_as_billing_address
|
18
|
+
//= require nimbleshop_simply/thumbnail
|
19
|
+
//= require nimbleshop_simply/remove_item_from_cart
|
20
|
+
//= require nimbleshop_simply/load_states
|
21
|
+
//= require nimbleshop_simply/order
|
@@ -0,0 +1,40 @@
|
|
1
|
+
window.App = window.App || {}
|
2
|
+
|
3
|
+
class window.App.toggleStates
|
4
|
+
|
5
|
+
toggleVisibility: (country) ->
|
6
|
+
if @hasRegions country
|
7
|
+
@stateNameField(country).val('').parents('.control-group').hide()
|
8
|
+
@stateCodeField(country).val('').parents('.control-group').show()
|
9
|
+
else
|
10
|
+
@stateNameField(country).val('').parents('.control-group').show()
|
11
|
+
@stateCodeField(country).val('').parents('.control-group').hide()
|
12
|
+
|
13
|
+
hasRegions: ($element) ->
|
14
|
+
window.countryStateCodes[$element.val()].length > 0
|
15
|
+
|
16
|
+
stateNameField: ($element) ->
|
17
|
+
$element.parents("div.well").find("[name$='[state_name]']")
|
18
|
+
|
19
|
+
stateCodeField: ($element) ->
|
20
|
+
$element.parents("div.well").find("[name$='[state_code]']")
|
21
|
+
|
22
|
+
createOption: (state) ->
|
23
|
+
($ "<option />", text: state[0], value: state[1])
|
24
|
+
|
25
|
+
updateStates: ($element) ->
|
26
|
+
$stateCode = @stateCodeField($element).html('')
|
27
|
+
for state in window.countryStateCodes[$element.val()]
|
28
|
+
$stateCode.append @createOption(state)
|
29
|
+
|
30
|
+
handler: (evt) =>
|
31
|
+
$country = $(evt.target)
|
32
|
+
if @hasRegions $country
|
33
|
+
@updateStates $country
|
34
|
+
@toggleVisibility $country
|
35
|
+
false
|
36
|
+
|
37
|
+
constructor: ->
|
38
|
+
($ "select[name$='[country_code]']").bind('change', @handler)
|
39
|
+
for country in ($ "select[name$='[country_code]']")
|
40
|
+
$(country).triggerHandler 'change'
|
data/app/assets/javascripts/nimbleshop_simply/shipping_address_same_as_billing_address.js.coffee
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
window.App = window.App || {}
|
2
|
+
|
3
|
+
App.toggleBillingAddress = ->
|
4
|
+
if $("#order_shipping_address_attributes_use_for_billing").is(':checked')
|
5
|
+
$('#billing_well').hide()
|
6
|
+
else
|
7
|
+
$('#billing_well').show()
|
8
|
+
|
9
|
+
$ ->
|
10
|
+
$("#order_shipping_address_attributes_use_for_billing").bind 'click', App.toggleBillingAddress
|
11
|
+
App.toggleBillingAddress()
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# This JavaScript file adds the feature by which
|
2
|
+
# mouse enter on thumbnail displays the image
|
3
|
+
|
4
|
+
$("img.thumb").live "mouseenter", ->
|
5
|
+
$this = $(this)
|
6
|
+
item_index = $(".thumb").index($this) + 1
|
7
|
+
$(".thumbnails li:nth-child(" + item_index + ")").show().siblings().hide()
|
8
|
+
false
|
9
|
+
|
10
|
+
$ ->
|
11
|
+
$(".fancybox").fancybox
|
12
|
+
openEffect: "none"
|
13
|
+
closeEffect: "none"
|
14
|
+
cyclic: true
|
@@ -0,0 +1,53 @@
|
|
1
|
+
$topColor: #69b127;
|
2
|
+
$bottomColor: #51a207;
|
3
|
+
$topColorLight: opacify($topColor, 0.5);
|
4
|
+
|
5
|
+
$bottomColorLight: opacify($bottomColor, 0.5);
|
6
|
+
|
7
|
+
#cart{
|
8
|
+
display: inline-block;
|
9
|
+
border: 1px solid $bottomColor;
|
10
|
+
font-size: 14px;
|
11
|
+
height: 20px;
|
12
|
+
line-height: 33px !important;
|
13
|
+
/*gradient*/
|
14
|
+
background: #91c661; /* Old browsers */
|
15
|
+
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
|
16
|
+
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzkxYzY2MSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjUwJSIgc3RvcC1jb2xvcj0iIzkxYzY2MSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjUxJSIgc3RvcC1jb2xvcj0iIzc3YjgzYyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiM3N2I4M2MiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
|
17
|
+
background: -moz-linear-gradient(top, $topColorLight 0%, $topColorLight 50%, $bottomColorLight 51%, $bottomColorLight 100%); /* FF3.6+ */
|
18
|
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,$topColorLight), color-stop(50%,$topColorLight), color-stop(51%,$bottomColorLight), color-stop(100%,$bottomColorLight));
|
19
|
+
background: -webkit-linear-gradient(top, $topColorLight 0%,$topColorLight 50%,$bottomColorLight 51%,$bottomColorLight 100%);
|
20
|
+
background: -o-linear-gradient(top, $topColorLight 0%,$topColorLight 50%,$bottomColorLight 51%,$bottomColorLight 100%); /* Opera 11.10+ */
|
21
|
+
background: -ms-linear-gradient(top, $topColorLight 0%,$topColorLight 50%,$bottomColorLight 51%,$bottomColorLight 100%); /* IE10+ */
|
22
|
+
background: linear-gradient(top, $topColorLight 0%,$topColorLight 50%,$bottomColorLight 51%,$bottomColorLight 100%); /* W3C */
|
23
|
+
|
24
|
+
-webkit-border-radius: 5px;
|
25
|
+
border-radius: 5px;
|
26
|
+
padding: 2px 5px;
|
27
|
+
margin-top: 7px;
|
28
|
+
span{
|
29
|
+
background: url("/assets/nimbleshop_simply/cart_button.png") no-repeat scroll left center transparent;
|
30
|
+
border: medium none;
|
31
|
+
color: white;
|
32
|
+
display: block;
|
33
|
+
font-size: 14px;
|
34
|
+
font-weight: bold;
|
35
|
+
height: 100%;
|
36
|
+
line-height: 20px;
|
37
|
+
padding-left: 40px;
|
38
|
+
}
|
39
|
+
|
40
|
+
&:hover,
|
41
|
+
&:active{
|
42
|
+
opacity: 1;
|
43
|
+
background: #468d06;
|
44
|
+
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzQ2OGQwNiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjUwJSIgc3RvcC1jb2xvcj0iIzUzYTYwOCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiM1M2E2MDgiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
|
45
|
+
background: -moz-linear-gradient(top, #468d06 0%, #53a608 50%, #53a608 100%);
|
46
|
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#468d06), color-stop(50%,#53a608), color-stop(100%,#53a608));
|
47
|
+
background: -webkit-linear-gradient(top, #468d06 0%,#53a608 50%,#53a608 100%);
|
48
|
+
background: -o-linear-gradient(top, #468d06 0%,#53a608 50%,#53a608 100%);
|
49
|
+
background: -ms-linear-gradient(top, #468d06 0%,#53a608 50%,#53a608 100%);
|
50
|
+
background: linear-gradient(top, #468d06 0%,#53a608 50%,#53a608 100%);
|
51
|
+
text-decoration: none;
|
52
|
+
}
|
53
|
+
}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
$topColor: #69b127;
|
2
|
+
$bottomColor: #51a207;
|
3
|
+
|
4
|
+
#buy{
|
5
|
+
.cart_button{
|
6
|
+
display: inline-block;
|
7
|
+
border: 1px solid $bottomColor;
|
8
|
+
font-size: 14px;
|
9
|
+
height: 33px;
|
10
|
+
line-height: 33px !important;
|
11
|
+
/*gradient*/
|
12
|
+
background: #91c661; /* Old browsers */
|
13
|
+
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
|
14
|
+
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzkxYzY2MSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjUwJSIgc3RvcC1jb2xvcj0iIzkxYzY2MSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjUxJSIgc3RvcC1jb2xvcj0iIzc3YjgzYyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiM3N2I4M2MiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
|
15
|
+
background: -moz-linear-gradient(top, $topColor 0%, $topColor 50%, $bottomColor 51%, $bottomColor 100%); /* FF3.6+ */
|
16
|
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,$topColor), color-stop(50%,$topColor), color-stop(51%,$bottomColor), color-stop(100%,$bottomColor)); /* Chrome,Safari4+ */
|
17
|
+
background: -webkit-linear-gradient(top, $topColor 0%,$topColor 50%,$bottomColor 51%,$bottomColor 100%); /* Chrome10+,Safari5.1+ */
|
18
|
+
background: -o-linear-gradient(top, $topColor 0%,$topColor 50%,$bottomColor 51%,$bottomColor 100%); /* Opera 11.10+ */
|
19
|
+
background: -ms-linear-gradient(top, $topColor 0%,$topColor 50%,$bottomColor 51%,$bottomColor 100%); /* IE10+ */
|
20
|
+
background: linear-gradient(top, $topColor 0%,$topColor 50%,$bottomColor 51%,$bottomColor 100%); /* W3C */
|
21
|
+
|
22
|
+
-webkit-border-radius: 5px;
|
23
|
+
border-radius: 5px;
|
24
|
+
|
25
|
+
-webkit-box-shadow: inset 0px 1px 1px 0px rgba(255, 255, 255, .8);
|
26
|
+
box-shadow: inset 0px 1px 1px 0px rgba(255, 255, 255, .8);
|
27
|
+
padding: 2px 5px;
|
28
|
+
opacity: .85;
|
29
|
+
|
30
|
+
input{
|
31
|
+
border: none;
|
32
|
+
background-color: transparent;
|
33
|
+
background: url("/assets/nimbleshop_simply/cart_button.png") no-repeat scroll left center transparent;
|
34
|
+
color: white;
|
35
|
+
font-size: 14px;
|
36
|
+
font-weight: bold;
|
37
|
+
display: block;
|
38
|
+
height: 100%;
|
39
|
+
width: 100%;
|
40
|
+
padding-left: 45px;
|
41
|
+
}
|
42
|
+
&:hover{
|
43
|
+
opacity: 1;
|
44
|
+
}
|
45
|
+
|
46
|
+
&:active{
|
47
|
+
opacity: 1;
|
48
|
+
|
49
|
+
background: #468d06;
|
50
|
+
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzQ2OGQwNiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjUwJSIgc3RvcC1jb2xvcj0iIzUzYTYwOCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiM1M2E2MDgiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
|
51
|
+
background: -moz-linear-gradient(top, #468d06 0%, #53a608 50%, #53a608 100%);
|
52
|
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#468d06), color-stop(50%,#53a608), color-stop(100%,#53a608));
|
53
|
+
background: -webkit-linear-gradient(top, #468d06 0%,#53a608 50%,#53a608 100%);
|
54
|
+
background: -o-linear-gradient(top, #468d06 0%,#53a608 50%,#53a608 100%);
|
55
|
+
background: -ms-linear-gradient(top, #468d06 0%,#53a608 50%,#53a608 100%);
|
56
|
+
background: linear-gradient(top, #468d06 0%,#53a608 50%,#53a608 100%);
|
57
|
+
}
|
58
|
+
}
|
59
|
+
}
|
@@ -0,0 +1,259 @@
|
|
1
|
+
h1 {
|
2
|
+
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
3
|
+
}
|
4
|
+
|
5
|
+
#complete p.button {
|
6
|
+
margin: 10px 0 10px 0;
|
7
|
+
}
|
8
|
+
|
9
|
+
.thumbnails .product .price {
|
10
|
+
color: #999;
|
11
|
+
}
|
12
|
+
|
13
|
+
#site-name {
|
14
|
+
font-weight: bold;
|
15
|
+
}
|
16
|
+
|
17
|
+
a#site-name:hover {
|
18
|
+
text-decoration: underline;
|
19
|
+
}
|
20
|
+
|
21
|
+
.navbar .navbar-text a:hover {
|
22
|
+
color: #08c;
|
23
|
+
}
|
24
|
+
|
25
|
+
#product-description-content p {
|
26
|
+
font-size: 14px;
|
27
|
+
color: #818181;
|
28
|
+
line-height: 22px;
|
29
|
+
}
|
30
|
+
|
31
|
+
|
32
|
+
table#product-thumbnails a {
|
33
|
+
margin: 6px;
|
34
|
+
}
|
35
|
+
|
36
|
+
#products-show {
|
37
|
+
h2#product-price {
|
38
|
+
font-family: 'Arial';
|
39
|
+
margin-bottom: 10px;
|
40
|
+
}
|
41
|
+
|
42
|
+
h4#product-description {
|
43
|
+
margin-top: 12px;
|
44
|
+
maring-bottom: 3px;
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
|
49
|
+
table tr td .lhs {
|
50
|
+
float:left;
|
51
|
+
width:150px;
|
52
|
+
}
|
53
|
+
table tr td .rhs {
|
54
|
+
float:right;
|
55
|
+
width: 50px;
|
56
|
+
}
|
57
|
+
|
58
|
+
|
59
|
+
#products-index table tr td, #product_groups-show table tr td {
|
60
|
+
vertical-align: top;
|
61
|
+
|
62
|
+
ul.thumbnails a.thumbnail {
|
63
|
+
border: 0;
|
64
|
+
}
|
65
|
+
|
66
|
+
ul.thumbnails p.product {
|
67
|
+
margin-left: 18px;
|
68
|
+
}
|
69
|
+
|
70
|
+
li.product_info {
|
71
|
+
border:1px solid #ddd;
|
72
|
+
}
|
73
|
+
|
74
|
+
}
|
75
|
+
|
76
|
+
|
77
|
+
.powered_by {
|
78
|
+
color: #ccc;
|
79
|
+
font-style: italic;
|
80
|
+
|
81
|
+
a {
|
82
|
+
color: #ccc;
|
83
|
+
text-decoration: none;
|
84
|
+
font-weight: bold;
|
85
|
+
font-size: 110%;
|
86
|
+
}
|
87
|
+
|
88
|
+
a:hover {
|
89
|
+
color: #888;
|
90
|
+
text-decoration: underline;
|
91
|
+
font-weight: bold;
|
92
|
+
}
|
93
|
+
}
|
94
|
+
|
95
|
+
/*#products-index .thumbnails > li{*/
|
96
|
+
/*margin-right: 30px;*/
|
97
|
+
/*}*/
|
98
|
+
|
99
|
+
/*Thumbnails on main page
|
100
|
+
----------------------------------------------------------------------------------------------------------------------*/
|
101
|
+
|
102
|
+
|
103
|
+
.thumbnail_container{
|
104
|
+
width: 200px;
|
105
|
+
margin: 0 auto;
|
106
|
+
border: 1px solid rgb(221, 221, 221);
|
107
|
+
max-width: 100%;
|
108
|
+
margin-bottom: 20px;
|
109
|
+
padding-bottom: 5px;
|
110
|
+
}
|
111
|
+
|
112
|
+
.thumbnail_container:hover {
|
113
|
+
border: 1px solid rgb(0, 136, 204);
|
114
|
+
}
|
115
|
+
|
116
|
+
.thumbnail_container .price{
|
117
|
+
color: #999;
|
118
|
+
}
|
119
|
+
|
120
|
+
.thumbnail_container .price, .thumbnail_container .product_name{
|
121
|
+
margin-left: 20px;
|
122
|
+
}
|
123
|
+
|
124
|
+
.thumbnail_container > a{
|
125
|
+
display: block;
|
126
|
+
border-bottom: 1px solid rgb(221, 221, 221);
|
127
|
+
padding: 5px 5px 2px;
|
128
|
+
margin-bottom: 5px;
|
129
|
+
}
|
130
|
+
|
131
|
+
.delete{
|
132
|
+
/*display: inline-block;*/
|
133
|
+
/*text-indent: -9999px;*/
|
134
|
+
/*width: 10px;*/
|
135
|
+
/*height: 11px;*/
|
136
|
+
/*background: url("/assets/trash.gif") no-repeat transparent;*/
|
137
|
+
/*vertical-align: middle;*/
|
138
|
+
font-size: 9px;
|
139
|
+
color: #999;
|
140
|
+
}
|
141
|
+
|
142
|
+
a.delete:hover {
|
143
|
+
color: #999;
|
144
|
+
font-size: 9px;
|
145
|
+
}
|
146
|
+
|
147
|
+
.total{
|
148
|
+
padding-top: 5px;
|
149
|
+
margin-bottom: 5px;
|
150
|
+
}
|
151
|
+
|
152
|
+
.total h4 {
|
153
|
+
font-size: 16px;
|
154
|
+
}
|
155
|
+
|
156
|
+
/*Sidebar style
|
157
|
+
----------------------------------------------------------------------------------------------------------------------*/
|
158
|
+
|
159
|
+
.sidebar_block{
|
160
|
+
border-radius: 5px;
|
161
|
+
border: 1px solid #DDDDDD;
|
162
|
+
padding: 10px;
|
163
|
+
background-color: #fafafa;
|
164
|
+
margin-bottom: 20px;
|
165
|
+
}
|
166
|
+
|
167
|
+
.sidebar_block h3{
|
168
|
+
font-weight: normal;
|
169
|
+
margin-bottom: 5px;
|
170
|
+
font-size: 16px;
|
171
|
+
}
|
172
|
+
|
173
|
+
.sidebar_block ul{
|
174
|
+
margin-left: 10px;
|
175
|
+
}
|
176
|
+
|
177
|
+
.sidebar_block li{
|
178
|
+
margin-bottom: 3px;
|
179
|
+
}
|
180
|
+
|
181
|
+
/*Cart
|
182
|
+
----------------------------------------------------------------------------------------------------------------------*/
|
183
|
+
|
184
|
+
|
185
|
+
#cartform {
|
186
|
+
|
187
|
+
.cart_header{
|
188
|
+
font-weight: bold;
|
189
|
+
}
|
190
|
+
|
191
|
+
.quantity-field{
|
192
|
+
width: 25px;
|
193
|
+
}
|
194
|
+
|
195
|
+
hr {
|
196
|
+
margin-top: 5px;
|
197
|
+
margin-bottom: 5px;
|
198
|
+
height: 1px;
|
199
|
+
border-color: #DDDDDD -moz-use-text-color #FFFFFF;
|
200
|
+
}
|
201
|
+
|
202
|
+
.product_pictures img{
|
203
|
+
width: 60px;
|
204
|
+
height: 60px;
|
205
|
+
}
|
206
|
+
|
207
|
+
}
|
208
|
+
|
209
|
+
#checkout-payments-new h1:before {
|
210
|
+
content: " ";
|
211
|
+
background: url("/assets/lock.png") no-repeat scroll 0 0 transparent;
|
212
|
+
width: 18px;
|
213
|
+
height: 24px;
|
214
|
+
display: inline-block;
|
215
|
+
margin-right: -4px;
|
216
|
+
}
|
217
|
+
|
218
|
+
|
219
|
+
.item_pics li {
|
220
|
+
margin-left: 0;
|
221
|
+
max-width: 100%;
|
222
|
+
}
|
223
|
+
|
224
|
+
/*Modal
|
225
|
+
----------------------------------------------------------------------------------------------------------------------*/
|
226
|
+
.modal_images {
|
227
|
+
overflow: hidden;
|
228
|
+
}
|
229
|
+
|
230
|
+
/* make the credit card form look nice */
|
231
|
+
.nimbleshop_authorizedotnet_umbrella {
|
232
|
+
margin-left: -140px;
|
233
|
+
}
|
234
|
+
|
235
|
+
#checkout {
|
236
|
+
background: #64b216;
|
237
|
+
}
|
238
|
+
|
239
|
+
#cart-empty {
|
240
|
+
margin-top: 20px;
|
241
|
+
}
|
242
|
+
|
243
|
+
img.thumbnail:hover {
|
244
|
+
border-color: #0088cc;
|
245
|
+
-webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
|
246
|
+
-moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
|
247
|
+
box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
|
248
|
+
-webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
|
249
|
+
-moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
|
250
|
+
box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
|
251
|
+
}
|
252
|
+
|
253
|
+
#products-index li.product_info, #product_groups-show li.product_info {
|
254
|
+
border: 1px solid #ddd;
|
255
|
+
}
|
256
|
+
|
257
|
+
#products-index li.product_info:hover, #product_groups-show li.product_info:hover {
|
258
|
+
border-color: #08c;
|
259
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll automatically include all the stylesheets available in this directory
|
3
|
+
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
|
4
|
+
* the top of the compiled file, but it's generally better to create a new file per style scope.
|
5
|
+
*
|
6
|
+
*= require nimbleshop_simply/themed_bootstrap_and_overrides
|
7
|
+
*= require nimbleshop_simply/override_bootstrap
|
8
|
+
*= require fancybox
|
9
|
+
*= require nimbleshop_simply/custom
|
10
|
+
*= require nimbleshop_simply/cart_button
|
11
|
+
*= require nimbleshop_simply/cart
|
12
|
+
*= require_self
|
13
|
+
*/
|
14
|
+
|
@@ -0,0 +1,36 @@
|
|
1
|
+
@import "twitter/bootstrap/bootstrap";
|
2
|
+
body {
|
3
|
+
padding-top: 60px;
|
4
|
+
padding-left: 20px;
|
5
|
+
}
|
6
|
+
|
7
|
+
@import "twitter/bootstrap/responsive";
|
8
|
+
|
9
|
+
// Set the correct sprite paths
|
10
|
+
@iconSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings.png');
|
11
|
+
@iconWhiteSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings-white.png');
|
12
|
+
|
13
|
+
// Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines)
|
14
|
+
// Note: If you use asset_path() here, your compiled boostrap_and_overrides.css will not
|
15
|
+
// have the proper paths. So for now we use the absolute path.
|
16
|
+
@fontAwesomeEotPath: '/assets/fontawesome-webfont.eot';
|
17
|
+
@fontAwesomeWoffPath: '/assets/fontawesome-webfont.woff';
|
18
|
+
@fontAwesomeTtfPath: '/assets/fontawesome-webfont.ttf';
|
19
|
+
@fontAwesomeSvgPath: '/assets/fontawesome-webfont.svg';
|
20
|
+
|
21
|
+
// Font Awesome
|
22
|
+
@import "fontawesome";
|
23
|
+
|
24
|
+
// Your custom LESS stylesheets goes here
|
25
|
+
//
|
26
|
+
// Since bootstrap was imported above you have access to its mixins which
|
27
|
+
// you may use and inherit here
|
28
|
+
//
|
29
|
+
// If you'd like to override bootstrap's own variables, you can do so here as well
|
30
|
+
// See http://twitter.github.com/bootstrap/less.html for their names and documentation
|
31
|
+
//
|
32
|
+
// Example:
|
33
|
+
// @linkColor: #ff0000;
|
34
|
+
@navbarBackground: #369bd7;
|
35
|
+
@navbarBackgroundHighlight: #2f7dac;
|
36
|
+
@navbarLinkColor: #fff;
|
@@ -0,0 +1,37 @@
|
|
1
|
+
class NimbleshopSimply::ApplicationController < ApplicationController
|
2
|
+
|
3
|
+
layout 'simply'
|
4
|
+
|
5
|
+
helper 'nimbleshop_simply/application'
|
6
|
+
|
7
|
+
helper_method :current_order, :current_shop
|
8
|
+
|
9
|
+
protected
|
10
|
+
|
11
|
+
def current_order
|
12
|
+
@current_order ||= begin
|
13
|
+
return nil if session[:order_id].blank?
|
14
|
+
order = Order.find_by_id(session[:order_id])
|
15
|
+
(order.blank? || !order.abandoned?) ? reset_order : order
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def reset_order
|
20
|
+
session[:order_id] = nil
|
21
|
+
end
|
22
|
+
|
23
|
+
def current_shop
|
24
|
+
@shop ||= Shop.first
|
25
|
+
raise "The database base is empty. Please run bundle exec rake setup first." unless @shop
|
26
|
+
@shop
|
27
|
+
end
|
28
|
+
|
29
|
+
def no_page_title
|
30
|
+
@do_not_use_page_title = true
|
31
|
+
end
|
32
|
+
|
33
|
+
def verify_current_order
|
34
|
+
redirect_to root_path unless current_order
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
module NimbleshopSimply
|
2
|
+
class CartsController < ApplicationController
|
3
|
+
|
4
|
+
respond_to :html
|
5
|
+
|
6
|
+
# this is mostly used for development purpose
|
7
|
+
def reset
|
8
|
+
reset_session
|
9
|
+
redirect_to root_url
|
10
|
+
end
|
11
|
+
|
12
|
+
def show
|
13
|
+
@line_items = current_order.blank? ? [] : current_order.line_items(include: :product).order('id')
|
14
|
+
respond_with @line_items
|
15
|
+
end
|
16
|
+
|
17
|
+
def add
|
18
|
+
product = Product.find_by_permalink!(params[:permalink])
|
19
|
+
session[:order_id] = Order.create!.id unless current_order
|
20
|
+
current_order.add(product)
|
21
|
+
redirect_to cart_url
|
22
|
+
end
|
23
|
+
|
24
|
+
def checkingout
|
25
|
+
redirect_to new_checkout_shipping_address_path
|
26
|
+
end
|
27
|
+
|
28
|
+
def update
|
29
|
+
current_order.update_quantity(params[:updates])
|
30
|
+
redirect_to cart_url
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module NimbleshopSimply
|
2
|
+
class Checkout::PaymentsController < ApplicationController
|
3
|
+
|
4
|
+
before_filter :verify_current_order
|
5
|
+
|
6
|
+
force_ssl if: :ssl_configured?
|
7
|
+
|
8
|
+
def new
|
9
|
+
@page_sub_title = 'All payments are secure and encrypted. We never store your credit card information.'
|
10
|
+
@creditcard = Creditcard.new
|
11
|
+
render text: 'No payment method has been setup. Please setup atleast one payment method.' if PaymentMethod.count == 0
|
12
|
+
end
|
13
|
+
|
14
|
+
def ssl_configured?
|
15
|
+
PaymentMethod.all.find { |i| i.use_ssl? }
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|