expressCart/views/layouts/layout.hbs

271 lines
15 KiB
Handlebars
Raw Normal View History

2018-01-07 04:55:48 +10:00
<!DOCTYPE html>
<html lang="en">
<head>
2020-01-23 21:17:25 +10:00
{{~#if config.injectJs}}{{{config.injectJs}}}{{/if}}
2020-01-23 21:09:47 +10:00
<title>{{title}}</title>
2018-01-07 04:55:48 +10:00
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
{{#if admin}}
<link rel="icon" type="image/png" href="/images/favicon.png" />
<!--[if IE]><link rel="SHORTCUT ICON" href="/images/favicon.png"/><![endif]-->
{{else}}
<link rel="icon" type="image/png" href="/favicon.png" />
<!--[if IE]><link rel="SHORTCUT ICON" href="/favicon.ico"/><![endif]-->
{{/if}}
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
2020-01-23 21:09:47 +10:00
{{#if productDescription}}
<meta name="description" content="{{snip productDescription}}">
{{else}}
2018-01-07 04:55:48 +10:00
{{#if metaDescription}}
2020-01-23 20:58:21 +10:00
<meta name="description" content="{{snip metaDescription}}">
2018-01-07 04:55:48 +10:00
{{else}}
2020-01-23 21:09:47 +10:00
<meta name="description" content="{{snip config.cartDescription}}">
{{/if}}
2018-01-07 04:55:48 +10:00
{{/if}}
2020-02-23 13:40:35 +10:00
<meta name="csrfToken" content="{{csrfToken}}">
2018-01-07 04:55:48 +10:00
<meta name="keywords" content="{{config.cartTitle}}">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha256-L/W5Wfqfa0sdBNIKN9cG6QA5F2qx4qICmU2VgLruv9Y=" crossorigin="anonymous" />
2019-12-26 20:32:28 +10:00
<link rel="stylesheet" href="/stylesheets/pushy{{config.env}}.css">
2019-12-27 13:37:38 +10:00
{{#if admin}}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/gijgo/1.9.13/combined/css/gijgo.min.css" integrity="sha256-bH0WSMuCFoG/dxeox/5aOWmaZl729yDg4ylckwSRTfU=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.20.2/codemirror.min.css" integrity="sha256-MdzaXfGXzZdeHw/XEV2LNNycipsLk4uZ0FYzO3hbuvI=" crossorigin="anonymous" />
2019-12-27 13:37:38 +10:00
{{/if}}
2019-12-30 22:28:37 +10:00
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-tokenfield/0.12.0/css/bootstrap-tokenfield.min.css" integrity="sha256-4qBzeX420hElp9/FzsuqUNqVobcClz1BjnXoxUDSYQ0=" crossorigin="anonymous" />
2018-02-17 23:30:28 +10:00
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
2018-01-07 04:55:48 +10:00
<link rel="stylesheet" href="/stylesheets/codemirror-style.min.css">
<link rel="stylesheet" href="/stylesheets/style{{config.env}}.css">
{{#if admin}}
<link rel="stylesheet" href="/stylesheets/admin{{config.env}}.css">
{{/if}}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
2020-01-01 19:20:57 +10:00
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js" integrity="sha256-x3YZWtRjM8bJqf48dFAv/qmgL68SI4jqNWeSLMZaMGA=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha256-WqU1JavFxSAMcLP2WIOI+GB2zWmShMI82mTpLDcqFUg=" crossorigin="anonymous"></script>
2019-12-27 13:37:38 +10:00
{{#if admin}}
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js" integrity="sha256-4iQZ6BVL4qNKlQ27TExEhBN1HFPvAvAMbFavKKosSWQ=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gijgo/1.9.13/combined/js/gijgo.min.js" integrity="sha256-YZhUu69bCn9uTqQyKwwQ3GyRypS7eaxp/wmVS282sDI=" crossorigin="anonymous"></script>
2019-12-30 22:28:37 +10:00
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.20.2/codemirror.min.js" integrity="sha256-K1exjHe1X4MP24jRizgBaSbUDUrNhFDRSwGoEYGmtJE=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.20.2/mode/css/css.min.js" integrity="sha256-D5oJ11cOmRhXSYWELwG2U/XYH3YveZJr9taRYLZ2DSM=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.20.2/mode/xml/xml.min.js" integrity="sha256-ERFGS58tayDq5kkyNwd/89iZZ+HglMH7eYXxG1hxTvA=" crossorigin="anonymous"></script>
2019-12-27 13:37:38 +10:00
{{/if}}
2020-02-01 16:59:30 +10:00
<script src="https://cdnjs.cloudflare.com/ajax/libs/feather-icons/4.25.0/feather.min.js" integrity="sha256-NvgyqkM9Vu1DLHkzxTxXQxZNdDymUlwhXcSJEqUfPiU=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/numeral.js/2.0.6/numeral.min.js" integrity="sha256-LlHVI5rUauudM5ZcZaD6hHPHKrA7CSefHHnKgq+/AZc=" crossorigin="anonymous"></script>
2019-12-30 22:28:37 +10:00
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.7/js/tether.min.js" integrity="sha256-4lietOiwRDBKx1goZZbRiwB06L+/bPYEGDIKZt82bgg=" crossorigin="anonymous"></script>
2018-01-07 04:55:48 +10:00
<script src="https://cdnjs.cloudflare.com/ajax/libs/1000hz-bootstrap-validator/0.11.9/validator.min.js"></script>
<script src="/javascripts/jquery.bootpag.min.js"></script>
<script src="/javascripts/cssbeautify.min.js"></script>
2019-12-06 17:09:13 +10:00
<script src="/javascripts/common{{config.env}}.js"></script>
2018-01-07 04:55:48 +10:00
<script src="/javascripts/expressCart{{config.env}}.js"></script>
2019-12-06 17:09:13 +10:00
{{#if admin}}
<script src="/javascripts/admin{{config.env}}.js"></script>
{{/if}}
2019-12-30 22:28:37 +10:00
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-tokenfield/0.12.0/bootstrap-tokenfield.min.js" integrity="sha256-jdwX0QzXB7z7Xc7Vz0ovtIHWO5qIZWg0aLcGv44JDgE=" crossorigin="anonymous"></script>
2018-01-07 04:55:48 +10:00
<!-- SEO data -->
2020-01-23 20:58:21 +10:00
{{#if pageUrl}}
<link rel="canonical" href="{{pageUrl}}" />
{{else}}
2018-01-07 04:55:48 +10:00
<link rel="canonical" href="{{config.baseUrl}}" />
2020-01-23 20:58:21 +10:00
{{/if}}
2018-01-07 04:55:48 +10:00
<meta name="referrer" content="origin" />
2020-01-23 22:03:21 +10:00
{{#if @root.config.facebookAppId}}
<meta property="fb:app_id" content="{{@root.config.facebookAppId}}" />
{{/if}}
2018-01-07 04:55:48 +10:00
<meta property="og:site_name" content="{{config.cartTitle}}" />
2020-01-23 21:25:17 +10:00
{{#if result.productTitle}}
<meta property="og:type" content="product" />
{{else}}
2018-01-07 04:55:48 +10:00
<meta property="og:type" content="website" />
2020-01-23 21:25:17 +10:00
{{/if}}
2018-01-07 04:55:48 +10:00
<meta property="og:title" content="{{title}}" />
2020-01-23 20:58:21 +10:00
{{#if pageUrl}}
<meta property="og:url" content="{{pageUrl}}" />
{{else}}
2018-01-07 04:55:48 +10:00
<meta property="og:url" content="{{config.baseUrl}}" />
2020-01-23 20:58:21 +10:00
{{/if}}
{{#if result.productImage}}
2020-01-23 21:09:47 +10:00
<meta property="og:image" content="{{config.baseUrl}}{{result.productImage}}" />
2020-01-23 20:58:21 +10:00
{{/if}}
{{#if productDescription}}
2020-01-23 21:17:25 +10:00
<meta property="og:description" content="{{snip productDescription}}">
{{else}}
{{#if metaDescription}}
2020-01-23 21:17:25 +10:00
<meta property="og:description" content="{{snip metaDescription}}">
{{else}}
2020-01-23 21:17:25 +10:00
<meta property="og:description" content="{{snip config.cartDescription}}">
{{/if}}
{{/if}}
2020-01-23 22:03:21 +10:00
{{#if @root.config.twitterHandle}}
<meta property="twitter:site" content="{{@root.config.twitterHandle}}">
{{/if}}
2020-01-23 21:25:17 +10:00
{{#if result.productTitle}}
<meta property="twitter:card" content="product" />
{{else}}
2020-01-23 21:17:25 +10:00
<meta property="twitter:card" content="summary" />
2020-01-23 21:25:17 +10:00
{{/if}}
2020-01-23 21:17:25 +10:00
<meta property="twitter:title" content="{{title}}" />
2020-01-23 20:58:21 +10:00
{{#if pageUrl}}
2020-01-23 21:17:25 +10:00
<meta property="twitter:url" content="{{pageUrl}}" />
2020-01-23 20:58:21 +10:00
{{else}}
2020-01-23 21:17:25 +10:00
<meta property="twitter:url" content="{{config.baseUrl}}" />
2020-01-23 20:58:21 +10:00
{{/if}}
2020-01-28 16:31:28 +10:00
{{#unless result.productTitle}}
2018-01-07 04:55:48 +10:00
<script type="application/ld+json">
{
2020-01-23 22:03:21 +10:00
"@context": "https://schema.org/",
{{#if result.productTitle}}
"@type": "Product",
"name": "{{result.productTitle}}",
"offers": {
"price": "{{result.productPrice}}",
"priceCurrency": "{{config.currencyISO}}",
"description": "{{snip productDescription}}",
"sku": "{{result._id}}",
"url": "{{pageUrl}}"
},
{{else}}
2018-01-07 04:55:48 +10:00
"publisher": "{{config.cartTitle}}",
2020-01-23 22:03:21 +10:00
"@type": "WebSite",
{{/if}}
{{#if result.productImage}}
"image": "{{config.baseUrl}}{{result.productImage}}",
{{/if}}
{{#if productDescription}}
"description": "{{snip productDescription}}",
{{/if}}
{{#if result.productTitle}}
"sku": "{{result._id}}",
{{/if}}
{{#if pageUrl}}
"url": "{{pageUrl}}"
{{else}}
2018-01-07 04:55:48 +10:00
"url": "{{config.baseUrl}}"
2020-01-23 22:03:21 +10:00
{{/if}}
2018-01-07 04:55:48 +10:00
}
</script>
2020-01-28 16:31:28 +10:00
{{/unless}}
<!-- SEO data -->
2020-01-23 21:17:25 +10:00
{{~#if config.googleAnalytics}}{{{config.googleAnalytics}}}{{/if}}
{{~#if config.customCss}}<style>{{{config.customCss}}}</style>{{/if}}
2018-02-14 06:21:22 +10:00
{{#if admin}}
<link rel="stylesheet" href="/stylesheets/admin{{config.env}}.css">
{{else}}
2019-12-19 14:15:51 +10:00
{{#if config.theme}}
<link rel="stylesheet" href="/{{config.theme}}/style{{config.env}}.css">
<script src="/{{config.theme}}/index{{config.env}}.js"></script>
{{/if}}
2018-02-14 06:21:22 +10:00
{{/if}}
2018-01-07 04:55:48 +10:00
</head>
{{#if admin}}
<body class="admin">
{{else}}
<body>
{{/if}}
2020-02-01 16:59:30 +10:00
{{#unless admin}}
2019-12-28 16:06:33 +10:00
<nav class="navbar navbar-expand-lg justify-content-between mainNavBar">
2020-02-06 22:03:16 +10:00
<a class="navbar-brand" href="/">
{{#if @root.config.cartLogo}}
<img src="{{@root.config.cartLogo}}" class="img-fluid">
{{else}}
{{@root.config.cartTitle}}
{{/if}}
</a>
2019-12-28 15:43:20 +10:00
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarMenu" aria-controls="navbarMenu" aria-expanded="false" aria-label="Toggle navigation">
2020-02-01 18:54:11 +10:00
{{{feather 'menu'}}}
2019-12-28 16:06:33 +10:00
</button>
2019-12-28 15:43:20 +10:00
<div id="navbarText">
<ul class="navbar-nav ml-auto">
{{#ifCond @root.config.enableLanguages "!=" false}}
2020-01-10 20:15:43 +10:00
<div class="dropdown d-none d-sm-block">
<button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
2020-02-01 18:54:11 +10:00
{{{feather 'globe'}}}
2019-12-28 16:14:13 +10:00
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
{{#availableLanguages}}
2019-12-28 16:14:13 +10:00
<li><a class="dropdown-item" href="/lang/{{this}}">{{@root.__ this}}</a></li>
{{/availableLanguages}}
2019-12-28 16:14:13 +10:00
</div>
</div>
{{/ifCond}}
{{#if @root.session.customerPresent}}
<div class="dropdown d-none d-sm-block">
<button class="btn dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{{feather 'user'}}}
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<li><a class="dropdown-item" href="/customer/account">Account</a></li>
<li><a class="dropdown-item" href="/customer/logout">Logout</a></li>
</div>
</div>
{{else}}
<li class="nav-item ml-3"><a href="/customer/account" class="btn">{{{feather 'user'}}}</a></li>
{{/if}}
2020-02-01 16:59:30 +10:00
{{#if @root.session.cart}}
2020-02-01 18:54:11 +10:00
<li class="nav-item"><a href="/checkout/cart" class="btn menu-btn">{{{feather 'shopping-cart'}}} {{ @root.__ "Cart" }} <span class="badge badge-danger" id="cart-count">{{@root.session.totalCartItems}}</span></a></li>
2020-02-01 16:59:30 +10:00
{{else}}
2020-02-01 18:54:11 +10:00
<li class="nav-item"><a href="/checkout/cart" class="btn menu-btn">{{{feather 'shopping-cart'}}}</i> {{ @root.__ "Cart" }} <span class="badge badge-danger" id="cart-count">0</span></a></li>
{{/if}}
</ul>
</div>
</nav>
2020-02-01 16:59:30 +10:00
{{/unless}}
2018-01-07 04:55:48 +10:00
<div class="site-overlay"></div>
{{#unless admin}}
{{#ifCond page '!=' 'checkout'}}
{{#ifCond page '!=' 'pay'}}
<div id="cart" class="col-md-12 pad-left-12 top-pad-10 pushy pushy-right">
<div class="row {{checkout}}">
<div class="col-sm-12 text-right">
2020-02-01 18:54:11 +10:00
<button class="pushy-link btn btn-primary" type="button">{{{feather 'x'}}}</button>
</div>
</div>
<div class="row">
<div id="cart" class="col-md-12">
{{> (getTheme 'cart')}}
<div class="row">
<div class="col-sm-12 {{showCartButtons @root.session.cart}} cart-buttons">
<button class="btn btn-danger float-left" id="empty-cart" type="button">{{ @root.__ "Empty cart" }}</button>
<a href="/checkout/information" class="btn btn-primary float-right">Checkout</a>
</div>
</div>
</div>
</div>
2018-01-07 04:55:48 +10:00
</div>
{{/ifCond}}
{{/ifCond}}
{{/unless}}
2020-02-01 16:59:30 +10:00
<div class="container-fluid content-body h-100" id="container">
<div class="row">
2018-01-07 04:55:48 +10:00
{{{body}}}
</div>
</div>
<input type="hidden" id="input_notify_message" value="{{message}}">
<input type="hidden" id="input_notify_messageType" value="{{messageType}}">
<input type="hidden" id="cartCheckout" value="{{checkout}}">
2019-11-03 19:34:20 +10:00
<input type="hidden" id="cartTheme" value="{{@root.config.theme}}">
<input type="hidden" id="currencySymbol" value="{{@root.config.currencySymbol}}">
2020-01-08 19:12:32 +10:00
{{#if @root.config.maxQuantity}} <input type="hidden" id="maxQuantity" value="{{@root.config.maxQuantity}}">{{/if}}
2018-01-07 04:55:48 +10:00
<div id="notify_message"></div>
{{#if showFooter}}
2020-01-08 20:24:41 +10:00
<div class="footer">
<div class="d-flex h-100">
<div class="col-12 align-self-center">
2019-11-01 19:13:14 +10:00
{{#isNull @root.config.footerHtml}}
<h5 class="text-center">Powered by expressCart</h5>
2018-01-07 04:55:48 +10:00
{{else}}
2019-11-01 19:13:14 +10:00
{{{@root.config.footerHtml}}}
2018-01-07 04:55:48 +10:00
{{/isNull}}
2020-01-08 20:24:41 +10:00
</div>
2018-01-07 04:55:48 +10:00
</div>
2020-01-08 20:24:41 +10:00
</div>
2018-01-07 04:55:48 +10:00
{{/if}}
<script src="/javascripts/pushy.min.js"></script>
2020-01-07 20:45:23 +10:00
{{#if admin}}
{{> partials/globalSearchModal}}
{{> partials/validationModal}}
2020-01-07 20:45:23 +10:00
{{/if}}
{{> partials/confirmModal}}
2020-02-01 16:59:30 +10:00
<script>
feather.replace();
</script>
2018-01-07 04:55:48 +10:00
</body>
</html>