From 7f7f3cebef08501e6bc1cb5e26cf276c9243facf Mon Sep 17 00:00:00 2001 From: Mark Moffat Date: Tue, 13 Feb 2018 21:22:33 +0100 Subject: [PATCH] Added 'Material' theme --- views/themes/Material/cart.hbs | 92 +++++++++ views/themes/Material/checkout.hbs | 5 + views/themes/Material/front-menu.hbs | 24 +++ views/themes/Material/index.hbs | 70 +++++++ views/themes/Material/page.hbs | 8 + views/themes/Material/pay.hbs | 66 ++++++ views/themes/Material/payment_complete.hbs | 21 ++ views/themes/Material/product.hbs | 87 ++++++++ views/themes/Material/shipping-form.hbs | 27 +++ views/themes/Material/style.css | 225 +++++++++++++++++++++ 10 files changed, 625 insertions(+) create mode 100644 views/themes/Material/cart.hbs create mode 100644 views/themes/Material/checkout.hbs create mode 100644 views/themes/Material/front-menu.hbs create mode 100644 views/themes/Material/index.hbs create mode 100644 views/themes/Material/page.hbs create mode 100644 views/themes/Material/pay.hbs create mode 100644 views/themes/Material/payment_complete.hbs create mode 100644 views/themes/Material/product.hbs create mode 100644 views/themes/Material/shipping-form.hbs create mode 100644 views/themes/Material/style.css diff --git a/views/themes/Material/cart.hbs b/views/themes/Material/cart.hbs new file mode 100644 index 0000000..a3dd1f1 --- /dev/null +++ b/views/themes/Material/cart.hbs @@ -0,0 +1,92 @@ +
+
+ {{#if pageCloseBtn}} +
+
+ +
+
+ {{/if}} +
+
+ Cart contents + {{#each session.cart}} +
+
+ {{#if productImage}} + {{this.title}} product image {{else}} + {{this.title}} product image {{/if}} +
+
+

+ {{this.title}} +

+

+  {{#each this.options}} {{#if @last}} {{this}} {{else}} {{this}} / {{/if}} {{/each}} +

+

+ +

+ + + +
+ +
+ + + +
+

+
+
+ {{currencySymbol ../config.currencySymbol}}{{formatAmount this.totalItemPrice}} +
+
+ {{/each}} + {{#if session.cart}} +
+
+ {{#ifCond session.shippingCostApplied '===' true}} +
+ Shipping: + {{currencySymbol config.currencySymbol}}{{formatAmount config.flatShipping}} +
+ {{else}} +
+ Shipping: + FREE +
+ {{/ifCond}} +
+ Total: + {{currencySymbol config.currencySymbol}}{{formatAmount session.totalCartAmount}} +
+
+
+ {{else}} +
+
+ Cart empty +
+
+ {{/if}} +
+
+
+ {{#if session.cart}} +
+ +
+ {{#ifCond page '!=' 'pay'}} +
+ {{#ifCond page '==' 'checkout'}} + Pay now + {{else}} + Checkout + {{/ifCond}} +
+ {{/ifCond}} {{/if}} +
+
+
\ No newline at end of file diff --git a/views/themes/Material/checkout.hbs b/views/themes/Material/checkout.hbs new file mode 100644 index 0000000..77f2977 --- /dev/null +++ b/views/themes/Material/checkout.hbs @@ -0,0 +1,5 @@ +
+
+ {{> themes/Material/cart}} +
+
\ No newline at end of file diff --git a/views/themes/Material/front-menu.hbs b/views/themes/Material/front-menu.hbs new file mode 100644 index 0000000..a08c395 --- /dev/null +++ b/views/themes/Material/front-menu.hbs @@ -0,0 +1,24 @@ + \ No newline at end of file diff --git a/views/themes/Material/index.hbs b/views/themes/Material/index.hbs new file mode 100644 index 0000000..0f79424 --- /dev/null +++ b/views/themes/Material/index.hbs @@ -0,0 +1,70 @@ +{{> themes/Material/front-menu}} +
+ {{#if filtered}} +
+ {{#if menuLink}} +

Category: {{menuLink.title}}

+ {{else}} +

Search results: {{searchTerm}}

+ {{/if}} +
+ {{/if}} +
+ {{#ifCond results.length '==' 0}} +
+

No products found

+
+ {{/ifCond}} + {{#each results}} +
+
+ {{#if productPermalink}} + + {{else}} + +
+ {{#if productImage}} + ... + {{else}} + ... + {{/if}} +
+

+ {{this.productTitle}} +

+
+ {{/if}} +

+ {{currencySymbol ../config.currencySymbol}}{{formatAmount productPrice}} +

+

+ Add to cart +

+
+
+ {{/each}} +
+
+ + + + + +
+
+
+
+
\ No newline at end of file diff --git a/views/themes/Material/page.hbs b/views/themes/Material/page.hbs new file mode 100644 index 0000000..9465c8e --- /dev/null +++ b/views/themes/Material/page.hbs @@ -0,0 +1,8 @@ +{{> themes/Material/front-menu}} +
+
+
+ {{{page.pageContent}}} +
+
+
\ No newline at end of file diff --git a/views/themes/Material/pay.hbs b/views/themes/Material/pay.hbs new file mode 100644 index 0000000..b797ed2 --- /dev/null +++ b/views/themes/Material/pay.hbs @@ -0,0 +1,66 @@ +
+
+ {{#if paymentMessage}} +

{{paymentMessage}}

+ {{/if}} +
+
+
+
+ Customer details + {{#unless session.customer}} +

Existing customer

+
+ +
+
+ +
+
+ Forgotten +
+
+ +
+ {{/unless}} + {{#if session.customer}} +
+ +
+ {{/if}} +
+ {{> themes/Material/shipping-form}} + {{#if session.customer}} + {{#ifCond config.paymentGateway '==' 'paypal'}} + {{> payments/paypal}} + {{/ifCond}} + {{/if}} + {{#unless session.customer}} +
+

Enter a password to create an account for next time

+
+ +
+
+ + {{/unless}} +
+ {{#if session.customer}} + {{#ifCond config.paymentGateway '==' 'stripe'}} + {{> partials/payments/stripe}} + {{/ifCond}} + {{#ifCond config.paymentGateway '==' 'authorizenet'}} + {{> partials/payments/authorizenet}} + {{/ifCond}} + {{/if}} +
+
+
+
+
+ {{> themes/Material/cart}} +
+
+
\ No newline at end of file diff --git a/views/themes/Material/payment_complete.hbs b/views/themes/Material/payment_complete.hbs new file mode 100644 index 0000000..f05980c --- /dev/null +++ b/views/themes/Material/payment_complete.hbs @@ -0,0 +1,21 @@ +
+
+
+ {{#ifCond result.orderStatus '==' 'Paid'}} +

Your payment has been successfully processed

+ {{else}} +

Your payment has failed. Please try again or contact us.

+ {{/ifCond}} + {{#if result}} +
+

Order ID: {{result._id}}

+

Payment ID: {{result.orderPaymentId}}

+
+ {{/if}} + {{#ifCond result.orderStatus '==' 'Paid'}} +

Please retain the details above as a reference of payment.

+ {{/ifCond}} + Home +
+
+
\ No newline at end of file diff --git a/views/themes/Material/product.hbs b/views/themes/Material/product.hbs new file mode 100644 index 0000000..aa549bc --- /dev/null +++ b/views/themes/Material/product.hbs @@ -0,0 +1,87 @@ +{{> themes/Material/front-menu}} +
+
+
+
+

{{result.productTitle}}

+

{{currencySymbol config.currencySymbol}}{{result.productPrice}}

+ {{#if productOptions}} +

Options

+
+ {{#each productOptions}} + {{#ifCond this.optType '==' "select"}} + {{this.optName}} + + {{/ifCond}} + {{#ifCond this.optType '==' "radio"}} + {{#each this.optOptions}} + {{this.optName}} +
+ +
+ {{/each}} + {{/ifCond}} + {{#ifCond this.optType '==' "checkbox"}} +
+ +
+ {{/ifCond}} + {{/each}} +
+ {{/if}} +
+

Quantity

+
+ + + +
+ +
+ + + +
+
+
+ +
+
+ {{{productDescription}}} +
+
+
+
+ {{#if result.productImage}} +
+
+ ... +
+
+ {{else}} +
+ ... +
+ {{/if}} + {{#ifCond images.length '>' 1}} +
+ {{#each images}} +
+ +
+ {{/each}} +
+ {{/ifCond}} +
+
+
+ \ No newline at end of file diff --git a/views/themes/Material/shipping-form.hbs b/views/themes/Material/shipping-form.hbs new file mode 100644 index 0000000..25f9fef --- /dev/null +++ b/views/themes/Material/shipping-form.hbs @@ -0,0 +1,27 @@ +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
\ No newline at end of file diff --git a/views/themes/Material/style.css b/views/themes/Material/style.css new file mode 100644 index 0000000..9948325 --- /dev/null +++ b/views/themes/Material/style.css @@ -0,0 +1,225 @@ +@import "https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css"; + +.row .col { + padding: 0; +} + +fieldset { + border: none; +} + +.pagelayout-wrapper{ + padding-top: 30px; + padding-bottom: 30px; +} + +.search-bar-input, #frm_search, .search-bar-input .btn{ + padding-top: 10px; + height: 45px; +} + +.searchMenuLocation-side { + padding-right: 0; +} + +.productsWrapper{ + padding-right: 10px; + padding-left: 10px; +} + +.cart-body{ + padding: 0; +} + +.searchBarWrapper{ + padding-right: 0; + padding-left: 0; +} + +.content-body { + margin-bottom: 100px; +} + +.footer{ + padding-top: 0; +} + +.footer h4{ + padding-top: 25px; + font-size: 20px; +} + +.product-price { + padding-bottom: 0; +} + +.title-image-container { + height: auto; + margin-right: 20px; + margin-left: 20px; +} + +.thumbnail-image{ + padding: 20px; +} + +.image-next{ + right: 5px; +} + +.image-prev{ + left: 5px; +} + +.navbar{ + -webkit-box-shadow: none; +} + +.navbarMenuWrapper{ + background-color: #f5f5f5; +} + +.navbarMenu>ul>li>a:hover{ + color: #1565c0 !important; +} + +.navbarMenu{ + padding-right: 0; + padding-left: 0; +} + +.navbarMenu ul li{ + margin-bottom: 5px; +} + +.navbarMenu ul li a{ + color: #000; + font-size: 18px; +} + +.product_wrapper>a:hover{ + color: #1565c0 !important; +} + +.navbar-static-top, #navbar, .navbar-header, #navbar>.navbar-nav, #navbar>.navbar-nav>li>a{ + margin-bottom: 0; + height: 100px !important; +} + +#navbar>.navbar-nav>li>a{ + padding-top: 35px; +} + +#pager{ + margin-bottom: 20px; +} + +.pagination>li>a{ + color: #000; + background-color: #fff !important; +} + +.pagination>li>a:hover{ + color: #000; +} + +.pag-active a{ + color: #1565c0 !important; +} + +.navbar-brand{ + color: #1565c0 !important; + letter-spacing: 4px; + padding-left: 20px !important; + padding-top: 20px !important; + height: 100px !important; + font-size: 55px !important; +} + +.navbar-brand-image, .navbar-brand{ + height: 80px; + padding-left: 10px; + padding-top: 10px; +} + +.navbar-default .badge { + background-color: #1565c0; +} + +.pushy-link, #empty-cart{ + border-color: #1565c0; + background-color: #1565c0; +} + +.pushy-link:hover, .pushy-link:focus, .pushy-link:active, .pushy-link:active:hover, +#empty-cart:hover, #empty-cart:focus, #empty-cart:active, #empty-cart:active:hover{ + border-color: #1565c0; + background-color: #1565c0; +} + +.navActive>a{ + color: #000; + margin-bottom: 0px; + border-bottom: 5px solid #1565c0; +} + +.navbar-static-top, #navbar, .navbar-header, #navbar>.navbar-nav, #navbar>.navbar-nav>li>a { + background-color: #fff; +} + +.navbar-default .navbar-nav>li>a { + color: #838b8f; + font-size: 20px; +} + +.body_text{ + padding-top: 30px !important; +} + +.product-option-text { + padding-top: 15px; + padding-bottom: 0; +} + +@media only screen and (max-width: 768px){ + .navbar-default .navbar-brand { + padding-top: 10px; + } + + .navbar-default .navbar-nav>li>a{ + font-size: 16px; + } + + .searchBarWrapper{ + padding-top: 10px; + } + + .navbarMenuWrapper{ + padding-left: 0px; + padding-right: 0px; + } + + .navbarMenuOuter{ + padding-left: 0; + padding-right: 0; + } + + .navActive>a { + color: #fff !important; + } + + .navbarMenu { + padding-right: 7.5px; + padding-left: 7.5px; + } + + .navActive>a{ + color: white !important; + background-color: #1565c0; + border-bottom: none; + } + + .footer { + padding-top: 10px; + } +} \ No newline at end of file