feat(extra-features): A bunch of improvements

This commit is contained in:
2026-02-06 14:20:14 +01:00
parent b968033b17
commit 541901e8e6
22 changed files with 421 additions and 367 deletions

View File

@@ -1,8 +1,10 @@
$input-btn-padding-y: rem-calc(8px); $input-btn-padding-y: rem-calc(8px);
$input-btn-padding-x: rem-calc(16px); $input-btn-padding-x: rem-calc(16px);
$input-btn-padding-y-sm: rem-calc(4px); $input-btn-padding-y-sm: rem-calc(4px);
$input-btn-padding-x-sm: rem-calc(8px); $input-btn-padding-x-sm: rem-calc(8px);
$input-btn-padding-y-lg: rem-calc(14px); $input-btn-padding-y-lg: rem-calc(14px);
$input-btn-padding-x-lg: rem-calc(20px); $input-btn-padding-x-lg: rem-calc(20px);
$input-height: rem-calc(50px);

View File

@@ -1,8 +1,7 @@
$font-family-sans-serif: "Roboto", -apple-system, blinkmacsystemfont, "Segoe UI", $font-family-sans-serif: "Plus Jakarta Sans", sans-serif;
roboto, "Helvetica Neue", arial, "Noto Sans", "Liberation Sans", sans-serif,
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
$font-family-base: $font-family-sans-serif; $font-family-base: $font-family-sans-serif;
$headings-font-family: $font-family-sans-serif; $headings-font-family: $font-family-sans-serif;
$font-weight-base: 400;
$font-size-base: rem-calc(14px); $font-size-base: rem-calc(14px);
$font-size-lg: $font-size-base * 1.125; $font-size-lg: $font-size-base * 1.125;

View File

@@ -16,7 +16,7 @@ Look up all available Bootstrap variables here: https://rstudio.github.io/bslib/
//@import "abstracts/utilities"; //@import "abstracts/utilities";
// Components: parts of the theme itself that are not associated with a module. // Components: parts of the theme itself that are not associated with a module.
//@import "components/buttons"; @import "components/buttons";
@import "components/forms"; @import "components/forms";
// Modules: Styling for specific modules. // Modules: Styling for specific modules.

View File

@@ -1,4 +1,5 @@
// To customize text colors per button, use this map // To customize text colors per button, use this map and below function
$btn-color: ( $btn-color: (
"primary": $white, "primary": $white,
"secondary": $white, "secondary": $white,
@@ -6,7 +7,6 @@ $btn-color: (
"dark": $white, "dark": $white,
); );
// Generate button color overrides from the map
@each $name, $color in $btn-color { @each $name, $color in $btn-color {
.btn-#{$name}, .btn-#{$name},
.btn-lg-#{$name}, .btn-lg-#{$name},
@@ -15,33 +15,21 @@ $btn-color: (
} }
} }
// bootstrap touchspin. Edit icons under js/theme/components/product.js // Bootstrap touchspin
.bootstrap-touchspin { .bootstrap-touchspin {
min-width: 100px;
flex-wrap: nowrap; flex-wrap: nowrap;
> input {
border-left: 0px;
color: $primary;
&:focus {
box-shadow: none;
}
}
.btn {
height: 50%;
width: 100%;
border-radius: 0px;
&:first-child {
border-bottom: 1px solid $border-color;
}
}
.input-touchspin { .input-touchspin {
min-width: rem-calc(66px); height: rem-calc(50px);
min-width: rem-calc(75px);
border-left: 0px;
} }
.input-group-btn-vertical { .input-group-btn-vertical {
min-width: rem-calc(33px); display: flex;
flex-direction: column;
button {
border-radius: 0px;
}
} }
} }

View File

@@ -1,12 +1,10 @@
.field-password-policy .input-group.js-parent-focus { .input-group.js-parent-focus {
> * {
max-height: rem-calc(39px);
}
.form-control {
height: unset;
}
.input-group-append .btn { .input-group-append .btn {
border-top-right-radius: $border-radius !important; border-top-right-radius: $border-radius !important;
border-bottom-right-radius: $border-radius !important; border-bottom-right-radius: $border-radius !important;
} }
} }
.input-group.js-parent-focus {
height: $input-height;
}

View File

@@ -10,4 +10,8 @@
margin: 0; margin: 0;
} }
} }
.header-top__badge {
right: -0.9em;
}
} }

View File

@@ -1,6 +1,6 @@
import $ from 'jquery'; import $ from "jquery";
import prestashop from 'prestashop'; import prestashop from "prestashop";
import debounce from '@js/theme/utils/debounce'; import debounce from "@js/theme/utils/debounce";
prestashop.cart = prestashop.cart || {}; prestashop.cart = prestashop.cart || {};
@@ -9,358 +9,395 @@ prestashop.cart.active_inputs = null;
const spinnerSelector = 'input[name="product-quantity-spin"]'; const spinnerSelector = 'input[name="product-quantity-spin"]';
let hasError = false; let hasError = false;
let isUpdateOperation = false; let isUpdateOperation = false;
let errorMsg = ''; let errorMsg = "";
const CheckUpdateQuantityOperations = { const CheckUpdateQuantityOperations = {
switchErrorStat: () => { switchErrorStat: () => {
/** /**
* if errorMsg is not empty or if notifications are shown, we have error to display * if errorMsg is not empty or if notifications are shown, we have error to display
* if hasError is true, quantity was not updated : we don't disable checkout button * if hasError is true, quantity was not updated : we don't disable checkout button
*/ */
const $checkoutBtn = $(prestashop.themeSelectors.checkout.btn); const $checkoutBtn = $(prestashop.themeSelectors.checkout.btn);
if ($(prestashop.themeSelectors.notifications.dangerAlert).length || (errorMsg !== '' && !hasError)) { if (
$checkoutBtn.addClass('disabled'); $(prestashop.themeSelectors.notifications.dangerAlert).length ||
} (errorMsg !== "" && !hasError)
) {
$checkoutBtn.addClass("disabled");
}
if (errorMsg !== '') { if (errorMsg !== "") {
const strError = ` const strError = `
<article class="alert alert-danger" role="alert" data-alert="danger"> <article class="alert alert-danger" role="alert" data-alert="danger">
<ul class="mb-0"> <ul class="mb-0">
<li>${errorMsg}</li> <li>${errorMsg}</li>
</ul> </ul>
</article> </article>
`; `;
$(prestashop.themeSelectors.notifications.container).html(strError); $(prestashop.themeSelectors.notifications.container).html(strError);
errorMsg = ''; errorMsg = "";
isUpdateOperation = false; isUpdateOperation = false;
if (hasError) { if (hasError) {
// if hasError is true, quantity was not updated : allow checkout // if hasError is true, quantity was not updated : allow checkout
$checkoutBtn.removeClass('disabled'); $checkoutBtn.removeClass("disabled");
} }
} else if (!hasError && isUpdateOperation) { } else if (!hasError && isUpdateOperation) {
hasError = false; hasError = false;
isUpdateOperation = false; isUpdateOperation = false;
$(prestashop.themeSelectors.notifications.container).html(''); $(prestashop.themeSelectors.notifications.container).html("");
$checkoutBtn.removeClass('disabled'); $checkoutBtn.removeClass("disabled");
} }
}, },
checkUpdateOperation: (resp) => { checkUpdateOperation: (resp) => {
/** /**
* resp.hasError can be not defined but resp.errors not empty: quantity is updated but order cannot be placed * resp.hasError can be not defined but resp.errors not empty: quantity is updated but order cannot be placed
* when resp.hasError=true, quantity is not updated * when resp.hasError=true, quantity is not updated
*/ */
const { hasError: hasErrorOccurred, errors: errorData } = resp; const { hasError: hasErrorOccurred, errors: errorData } = resp;
hasError = hasErrorOccurred ?? false; hasError = hasErrorOccurred ?? false;
const errors = errorData ?? ''; const errors = errorData ?? "";
// 1.7.2.x returns errors as string, 1.7.3.x returns array // 1.7.2.x returns errors as string, 1.7.3.x returns array
if (errors instanceof Array) { if (errors instanceof Array) {
errorMsg = errors.join(' '); errorMsg = errors.join(" ");
} else { } else {
errorMsg = errors; errorMsg = errors;
} }
isUpdateOperation = true; isUpdateOperation = true;
}, },
}; };
/** /**
* Attach Bootstrap TouchSpin event handlers * Attach Bootstrap TouchSpin event handlers
*/ */
function createSpin() { function createSpin() {
$.each($(spinnerSelector), (index, spinner) => { $.each($(spinnerSelector), (index, spinner) => {
$(spinner).TouchSpin({ $(spinner).TouchSpin({
verticalupclass: 'material-icons touchspin-up', verticalupclass: "",
verticaldownclass: 'material-icons touchspin-down', verticaldownclass: "",
buttondown_class: 'btn btn-touchspin js-touchspin js-increase-product-quantity', buttondown_class:
buttonup_class: 'btn btn-touchspin js-touchspin js-decrease-product-quantity', "btn btn-primary btn-touchspin js-touchspin js-increase-product-quantity",
min: parseInt($(spinner).attr('min'), 10), buttonup_class:
max: 1000000, "btn btn-primary btn-touchspin js-touchspin js-decrease-product-quantity",
min: parseInt($(spinner).attr("min"), 10),
max: 1000000,
verticalup:
'<img src="/themes/falcon/_dev/img/chevron_up.svg" alt="Up" />',
verticaldown:
'<img src="/themes/falcon/_dev/img/chevron_down.svg" alt="Down" />',
});
}); });
});
CheckUpdateQuantityOperations.switchErrorStat(); CheckUpdateQuantityOperations.switchErrorStat();
} }
const preventCustomModalOpen = (event) => { const preventCustomModalOpen = (event) => {
if (window.shouldPreventModal) { if (window.shouldPreventModal) {
event.preventDefault(); event.preventDefault();
return false; return false;
} }
return true; return true;
}; };
$(() => { $(() => {
const productLineInCartSelector = prestashop.themeSelectors.cart.productLineQty; const productLineInCartSelector =
const promises = []; prestashop.themeSelectors.cart.productLineQty;
const promises = [];
prestashop.on('updateCart', () => { prestashop.on("updateCart", () => {
$(prestashop.themeSelectors.cart.quickview).modal('hide'); $(prestashop.themeSelectors.cart.quickview).modal("hide");
$('body').addClass('cart-loading'); $("body").addClass("cart-loading");
}); });
prestashop.on('updatedCart', () => { prestashop.on("updatedCart", () => {
window.shouldPreventModal = false; window.shouldPreventModal = false;
$(prestashop.themeSelectors.product.customizationModal).on('show.bs.modal', (modalEvent) => { $(prestashop.themeSelectors.product.customizationModal).on(
preventCustomModalOpen(modalEvent); "show.bs.modal",
(modalEvent) => {
preventCustomModalOpen(modalEvent);
},
);
createSpin();
$("body").removeClass("cart-loading");
}); });
createSpin(); createSpin();
$('body').removeClass('cart-loading');
});
createSpin(); const $body = $("body");
const $body = $('body'); function isTouchSpin(namespace) {
return (
function isTouchSpin(namespace) { namespace === "on.startupspin" || namespace === "on.startdownspin"
return namespace === 'on.startupspin' || namespace === 'on.startdownspin'; );
}
function shouldIncreaseProductQuantity(namespace) {
return namespace === 'on.startupspin';
}
function findCartLineProductQuantityInput($target) {
const $input = $target.parents(prestashop.themeSelectors.cart.touchspin).find(productLineInCartSelector);
if ($input.is(':focus')) {
return null;
} }
return $input; function shouldIncreaseProductQuantity(namespace) {
} return namespace === "on.startupspin";
function camelize(subject) {
const actionTypeParts = subject.split('-');
let i;
let part;
let camelizedSubject = '';
for (i = 0; i < actionTypeParts.length; i += 1) {
part = actionTypeParts[i];
if (i !== 0) {
part = part.substring(0, 1).toUpperCase() + part.substring(1);
}
camelizedSubject += part;
} }
return camelizedSubject; function findCartLineProductQuantityInput($target) {
} const $input = $target
.parents(prestashop.themeSelectors.cart.touchspin)
.find(productLineInCartSelector);
function parseCartAction($target, namespace) { if ($input.is(":focus")) {
if (!isTouchSpin(namespace)) { return null;
return { }
url: $target.attr('href'),
type: camelize($target.data('link-action')), return $input;
};
} }
const $input = findCartLineProductQuantityInput($target); function camelize(subject) {
const actionTypeParts = subject.split("-");
let i;
let part;
let camelizedSubject = "";
let cartAction = {}; for (i = 0; i < actionTypeParts.length; i += 1) {
part = actionTypeParts[i];
if ($input) { if (i !== 0) {
if (shouldIncreaseProductQuantity(namespace)) { part = part.substring(0, 1).toUpperCase() + part.substring(1);
cartAction = { }
url: $input.data('up-url'),
type: 'increaseProductQuantity', camelizedSubject += part;
}; }
} else {
cartAction = { return camelizedSubject;
url: $input.data('down-url'),
type: 'decreaseProductQuantity',
};
}
} }
return cartAction; function parseCartAction($target, namespace) {
} if (!isTouchSpin(namespace)) {
return {
url: $target.attr("href"),
type: camelize($target.data("link-action")),
};
}
const abortPreviousRequests = () => { const $input = findCartLineProductQuantityInput($target);
let promise;
while (promises.length > 0) { let cartAction = {};
promise = promises.pop();
promise.abort(); if ($input) {
if (shouldIncreaseProductQuantity(namespace)) {
cartAction = {
url: $input.data("up-url"),
type: "increaseProductQuantity",
};
} else {
cartAction = {
url: $input.data("down-url"),
type: "decreaseProductQuantity",
};
}
}
return cartAction;
} }
};
const getTouchSpinInput = ($button) => $($button.parents(prestashop.themeSelectors.cart.touchspin).find('input')); const abortPreviousRequests = () => {
let promise;
$(prestashop.themeSelectors.product.customizationModal).on('show.bs.modal', (modalEvent) => { while (promises.length > 0) {
preventCustomModalOpen(modalEvent); promise = promises.pop();
}); promise.abort();
}
const handleCartAction = (event) => {
event.preventDefault();
window.shouldPreventModal = true;
const $target = $(event.currentTarget);
const { dataset } = event.currentTarget;
const cartAction = parseCartAction($target, event.namespace);
const requestData = {
ajax: '1',
action: 'update',
}; };
if (typeof cartAction === 'undefined') { const getTouchSpinInput = ($button) =>
return; $(
} $button
.parents(prestashop.themeSelectors.cart.touchspin)
.find("input"),
);
$.ajax({ $(prestashop.themeSelectors.product.customizationModal).on(
url: cartAction.url, "show.bs.modal",
method: 'POST', (modalEvent) => {
data: requestData, preventCustomModalOpen(modalEvent);
dataType: 'json', },
beforeSend: (jqXHR) => { );
promises.push(jqXHR);
},
})
.then((resp) => {
const $quantityInput = getTouchSpinInput($target);
CheckUpdateQuantityOperations.checkUpdateOperation(resp);
$quantityInput.val(resp.quantity);
// Refresh cart preview const handleCartAction = (event) => {
prestashop.emit('updateCart', { event.preventDefault();
reason: dataset, window.shouldPreventModal = true;
resp,
});
})
.fail((resp) => {
prestashop.emit('handleError', {
eventType: 'updateProductInCart',
resp,
cartAction: cartAction.type,
});
});
};
$body.on('click', prestashop.themeSelectors.cart.actions, handleCartAction); const $target = $(event.currentTarget);
const { dataset } = event.currentTarget;
function sendUpdateQuantityInCartRequest(updateQuantityInCartUrl, requestData, $target) { const cartAction = parseCartAction($target, event.namespace);
abortPreviousRequests(); const requestData = {
window.shouldPreventModal = true; ajax: "1",
action: "update",
};
return $.ajax({ if (typeof cartAction === "undefined") {
url: updateQuantityInCartUrl, return;
method: 'POST', }
data: requestData,
dataType: 'json',
beforeSend: (jqXHR) => {
promises.push(jqXHR);
},
})
.then((resp) => {
CheckUpdateQuantityOperations.checkUpdateOperation(resp);
$target.val(resp.quantity); $.ajax({
const dataset = ($target && $target.dataset) ? $target.dataset : resp; url: cartAction.url,
method: "POST",
data: requestData,
dataType: "json",
beforeSend: (jqXHR) => {
promises.push(jqXHR);
},
})
.then((resp) => {
const $quantityInput = getTouchSpinInput($target);
CheckUpdateQuantityOperations.checkUpdateOperation(resp);
$quantityInput.val(resp.quantity);
// Refresh cart preview // Refresh cart preview
prestashop.emit('updateCart', { prestashop.emit("updateCart", {
reason: dataset, reason: dataset,
resp, resp,
}); });
}) })
.fail((resp) => { .fail((resp) => {
prestashop.emit('handleError', { prestashop.emit("handleError", {
eventType: 'updateProductQuantityInCart', eventType: "updateProductInCart",
resp, resp,
}); cartAction: cartAction.type,
}); });
} });
function getQuantityChangeType($quantity) {
return $quantity > 0 ? 'up' : 'down';
}
function getRequestData(quantity) {
return {
ajax: '1',
qty: Math.abs(quantity),
action: 'update',
op: getQuantityChangeType(quantity),
}; };
}
function updateProductQuantityInCart(event) { $body.on("click", prestashop.themeSelectors.cart.actions, handleCartAction);
const $target = $(event.currentTarget);
const updateQuantityInCartUrl = $target.data('update-url');
const baseValue = $target.attr('value');
// There should be a valid product quantity in cart function sendUpdateQuantityInCartRequest(
const targetValue = $target.val(); updateQuantityInCartUrl,
requestData,
$target,
) {
abortPreviousRequests();
window.shouldPreventModal = true;
/* eslint-disable */ return $.ajax({
if (targetValue != parseInt(targetValue, 10) || targetValue < 0 || Number.isNaN(targetValue)) { url: updateQuantityInCartUrl,
window.shouldPreventModal = false; method: "POST",
$target.val(baseValue); data: requestData,
return; dataType: "json",
} beforeSend: (jqXHR) => {
/* eslint-enable */ promises.push(jqXHR);
},
})
.then((resp) => {
CheckUpdateQuantityOperations.checkUpdateOperation(resp);
// There should be a new product quantity in cart $target.val(resp.quantity);
const qty = targetValue - baseValue; const dataset =
$target && $target.dataset ? $target.dataset : resp;
if (qty === 0) { // Refresh cart preview
return; prestashop.emit("updateCart", {
reason: dataset,
resp,
});
})
.fail((resp) => {
prestashop.emit("handleError", {
eventType: "updateProductQuantityInCart",
resp,
});
});
} }
if (targetValue === '0') { function getQuantityChangeType($quantity) {
$target.closest('.product-line-actions').find('[data-link-action="delete-from-cart"]').click(); return $quantity > 0 ? "up" : "down";
} else {
$target.attr('value', targetValue);
sendUpdateQuantityInCartRequest(updateQuantityInCartUrl, getRequestData(qty), $target);
} }
}
$body.on('touchspin.on.stopspin', spinnerSelector, debounce(updateProductQuantityInCart)); function getRequestData(quantity) {
return {
ajax: "1",
qty: Math.abs(quantity),
action: "update",
op: getQuantityChangeType(quantity),
};
}
$body.on( function updateProductQuantityInCart(event) {
'focusout keyup', const $target = $(event.currentTarget);
productLineInCartSelector, const updateQuantityInCartUrl = $target.data("update-url");
(event) => { const baseValue = $target.attr("value");
if (event.type === 'keyup') {
if (event.keyCode === 13) { // There should be a valid product quantity in cart
isUpdateOperation = true; const targetValue = $target.val();
updateProductQuantityInCart(event);
/* eslint-disable */
if (
targetValue != parseInt(targetValue, 10) ||
targetValue < 0 ||
Number.isNaN(targetValue)
) {
window.shouldPreventModal = false;
$target.val(baseValue);
return;
}
/* eslint-enable */
// There should be a new product quantity in cart
const qty = targetValue - baseValue;
if (qty === 0) {
return;
}
if (targetValue === "0") {
$target
.closest(".product-line-actions")
.find('[data-link-action="delete-from-cart"]')
.click();
} else {
$target.attr("value", targetValue);
sendUpdateQuantityInCartRequest(
updateQuantityInCartUrl,
getRequestData(qty),
$target,
);
}
}
$body.on(
"touchspin.on.stopspin",
spinnerSelector,
debounce(updateProductQuantityInCart),
);
$body.on("focusout keyup", productLineInCartSelector, (event) => {
if (event.type === "keyup") {
if (event.keyCode === 13) {
isUpdateOperation = true;
updateProductQuantityInCart(event);
}
return false;
}
if (!isUpdateOperation) {
updateProductQuantityInCart(event);
} }
return false; return false;
} });
if (!isUpdateOperation) { $body.on("click", prestashop.themeSelectors.cart.discountCode, (event) => {
updateProductQuantityInCart(event); event.stopPropagation();
} event.preventDefault();
return false; const $code = $(event.currentTarget);
}, const $discountInput = $("[name=discount_name]");
); const $discountForm = $discountInput.closest("form");
$body.on( $discountInput.val($code.text());
'click', // Show promo code field
prestashop.themeSelectors.cart.discountCode, $discountForm.trigger("submit");
(event) => {
event.stopPropagation();
event.preventDefault();
const $code = $(event.currentTarget); return false;
const $discountInput = $('[name=discount_name]'); });
const $discountForm = $discountInput.closest('form');
$discountInput.val($code.text());
// Show promo code field
$discountForm.trigger('submit');
return false;
},
);
}); });

View File

@@ -1,5 +1,5 @@
<div class="col-auto mt-2 px-1"> <div class="col-auto">
<a <a
class="product-page__action-btn btn btn-light shadow rounded-circle favorite-btn p-2" class="product-page__action-btn btn btn-light shadow rounded-circle favorite-btn p-2"
href="#" href="#"

View File

@@ -23,8 +23,27 @@
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
*} *}
{* Simple display without titles for the header and footer *}
{if $hookName == "displayFooterPrivacy"}
{foreach $linkBlocks as $linkBlock}
{foreach $linkBlock.links as $link}
<p class="links-list__elem mb-0">
<a
id="{$link.id}-{$linkBlock.id}"
class="{$link.class} links-list__link"
href="{$link.url}"
title="{$link.description}"
{if !empty($link.target)} target="{$link.target}" {/if}
>
{$link.title}
</a>
</p>
{/foreach}
{/foreach}
{else}
{* Regular display *}
{foreach $linkBlocks as $linkBlock} {foreach $linkBlocks as $linkBlock}
<div class="col-md-3 col-12 mb-lg-4"> <div class="col-12 col-md-3">
{assign var=_expand_id value=10|mt_rand:100000} {assign var=_expand_id value=10|mt_rand:100000}
<div class="d-flex align-items-center mb-3 justify-content-between position-relative"> <div class="d-flex align-items-center mb-3 justify-content-between position-relative">
<span class="h4 mb-0">{$linkBlock.title}</span> <span class="h4 mb-0">{$linkBlock.title}</span>
@@ -57,3 +76,4 @@
</div> </div>
</div> </div>
{/foreach} {/foreach}
{/if}

View File

@@ -1,25 +1,22 @@
<div class="footer-bottom py-3"> <div class="footer-bottom py-1 py-lg-3">
<div class="container d-flex justify-content-between align-items-center"> <div class="container">
<div class="copyright"> <div class="row d-flex flex-column flex-lg-row justify-content-between align-items-center">
<span> <div class="copyright">
{l <span class="text-white fw-400">
s='Copyright © %year% %shop%' {l
sprintf=['%year%' => $smarty.now|date_format:"%Y", '%shop%' => $shop.name|capitalize] s='Copyright © %year% %shop%'
d='Shop.Theme.Footer' sprintf=['%year%' => $smarty.now|date_format:"%Y", '%shop%' => $shop.name|capitalize]
} d='Shop.Theme.Footer'
</span> }
</div> </span>
<a href="https://dewebsmid.nl/prestashop/" rel="noopener" target="_blank"> </div>
{l s='PrestaShop' d='Shop.Theme.Footer'} <a href="https://dewebsmid.nl/prestashop/" class="text-white fw-400" rel="noopener" target="_blank">
</a> {l s='PrestaShop' d='Shop.Theme.Footer'}
<div class="privacy">
<a href="content/3-gebruiks-voorwaarden">
{l s='Terms & Conditions' d='Shop.Theme.Footer'}
</a>
<span class="mx-2"> | </span>
<a href="content/1-levering">
{l s='Privacy policy' d='Shop.Theme.Footer'}
</a> </a>
<div class="privacy d-flex gap-20">
{* Need to create this hook in the db. Use ps_linklist with it- see modules/ps_linklist/views/templates/hook/linkblock.tpl *}
{hook h='displayFooterPrivacy'}
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -29,7 +29,7 @@
{/block} {/block}
</div> </div>
</div> </div>
<div class="footer-container pb-0"> <div class="footer-container pb-0 mt-0">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
{block name='hook_footer'} {block name='hook_footer'}

View File

@@ -74,9 +74,13 @@
{/block} {/block}
{block name='stylesheets'} {block name='stylesheets'}
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap" rel="stylesheet">
{include file="_partials/stylesheets.tpl" stylesheets=$stylesheets} {include file="_partials/stylesheets.tpl" stylesheets=$stylesheets}
{/block} {/block}
{block name='javascript_head'} {block name='javascript_head'}
{include file="_partials/javascript.tpl" javascript=$javascript.head vars=$js_custom_vars} {include file="_partials/javascript.tpl" javascript=$javascript.head vars=$js_custom_vars}
{/block} {/block}

View File

@@ -26,7 +26,7 @@
{if !$configuration.is_catalog} {if !$configuration.is_catalog}
{block name='product_quantity'} {block name='product_quantity'}
<div class="product-quantity row mb-1 mx-n1 mt-n2 align-items-center"> <div class="product-quantity row mb-1 align-items-center">
<div class="qty col-auto px-1"> <div class="qty col-auto px-1">
<input <input
type="number" type="number"
@@ -46,7 +46,7 @@
> >
</div> </div>
<div class="add col mt-2 px-1"> <div class="add col">
<button <button
class="btn btn-primary add-to-cart btn-block" class="btn btn-primary add-to-cart btn-block"
data-button-action="add-to-cart" data-button-action="add-to-cart"

View File

@@ -130,6 +130,7 @@
value="{$product.quantity}" value="{$product.quantity}"
name="product-quantity-spin" name="product-quantity-spin"
min="{$product.minimal_quantity}" min="{$product.minimal_quantity}"
data-verticalbuttons="true"
aria-label="{l s='%productName% product quantity field' sprintf=['%productName%' => $product.name] d='Shop.Theme.Checkout'}" aria-label="{l s='%productName% product quantity field' sprintf=['%productName%' => $product.name] d='Shop.Theme.Checkout'}"
/> />
</div> </div>

View File

@@ -72,7 +72,7 @@
{/if} {/if}
<div class="add-address mt-2 mb-3"> <div class="add-address mt-2 mb-3">
<a class="btn btn-outline-primary btn-sm" href="{$new_address_delivery_url}">{l s='add new address' d='Shop.Theme.Actions'}</a> <a class="btn btn-primary btn-sm" href="{$new_address_delivery_url}">{l s='add new address' d='Shop.Theme.Actions'}</a>
</div> </div>
{if $use_same_address && !$cart.is_virtual} {if $use_same_address && !$cart.is_virtual}
@@ -116,7 +116,7 @@
{/if} {/if}
<div class="add-address mt-2 mb-3"> <div class="add-address mt-2 mb-3">
<a class="btn btn-outline-primary btn-sm" href="{$new_address_invoice_url}">{l s='add new address' d='Shop.Theme.Actions'}</a> <a class="btn btn-primary btn-sm" href="{$new_address_invoice_url}">{l s='add new address' d='Shop.Theme.Actions'}</a>
</div> </div>
{/if} {/if}

View File

@@ -44,7 +44,7 @@
{block name='continue_shopping'} {block name='continue_shopping'}
<div class="my-3"> <div class="my-3">
<a class="btn btn-outline-primary" href="{$urls.pages.index}"> <a class="btn btn-primary" href="{$urls.pages.index}">
<span class="material-icons btn-icon mr-1">keyboard_arrow_left</span> <span class="material-icons btn-icon mr-1">keyboard_arrow_left</span>
{l s='Continue shopping' d='Shop.Theme.Actions'} {l s='Continue shopping' d='Shop.Theme.Actions'}
</a> </a>

View File

@@ -73,7 +73,7 @@
</div> </div>
<div class="text-center customer-links__footer"> <div class="text-center customer-links__footer">
<a href="{$link->getPageLink('index', true, null, 'mylogout')}" class="customer-links__logout"> <a href="{$link->getPageLink('index', true, null, 'mylogout')}" class="customer-links__logout btn btn-secondary mt-2">
{l s='Sign out' d='Shop.Theme.Actions'} {l s='Sign out' d='Shop.Theme.Actions'}
</a> </a>
</div> </div>

View File

@@ -66,7 +66,7 @@
{if $order.details.reorder_url} {if $order.details.reorder_url}
<div class="mt-2 text-right"> <div class="mt-2 text-right">
<a href="{$order.details.reorder_url}" class="btn btn-outline-primary">{l s='Reorder' d='Shop.Theme.Actions'}</a> <a href="{$order.details.reorder_url}" class="btn btn-primary">{l s='Reorder' d='Shop.Theme.Actions'}</a>
</div> </div>
{/if} {/if}

View File

@@ -24,14 +24,8 @@
*} *}
{extends file='page.tpl'} {extends file='page.tpl'}
{block name='page_content_container'} {block name='page_content_container'}
<section id="content" class="page-home"> <section id="content" class="page-home">
{block name='page_content_top'}{/block} {* {include file='pages/index/hero.tpl'} *}
</section>
{block name='page_content'} {/block}
{block name='hook_home'}
{$HOOK_HOME nofilter}
{/block}
{/block}
</section>
{/block}

View File

@@ -42,7 +42,7 @@
{include file='catalog/_partials/product-activation.tpl'} {include file='catalog/_partials/product-activation.tpl'}
{/block} {/block}
<header id="header" class="l-header"> <header id="header" class="l-header mb-0">
{block name='header'} {block name='header'}
{include file='_partials/header.tpl'} {include file='_partials/header.tpl'}
{/block} {/block}
@@ -55,12 +55,12 @@
{/block} {/block}
{hook h="displayWrapperTop"} {hook h="displayWrapperTop"}
<div class="container"> <div class="{if $page.page_name == 'index' } container-fluid p-0 overflow-hidden {else}container{/if}">
{block name='breadcrumb'} {block name='breadcrumb'}
{include file='_partials/breadcrumb.tpl'} {include file='_partials/breadcrumb.tpl'}
{/block} {/block}
<div class="row"> <div {if $page.page_name != 'index' || !isset($page.body_classes['layout-full-width'])}class="row"{/if}>
{block name="left_column"} {block name="left_column"}
<div id="left-column" class="col-12 col-md-4 col-lg-3"> <div id="left-column" class="col-12 col-md-4 col-lg-3">
{if $page.page_name == 'product'} {if $page.page_name == 'product'}
@@ -95,7 +95,7 @@
{hook h="displayWrapperBottom"} {hook h="displayWrapperBottom"}
</section> </section>
<footer id="footer" class="l-footer js-footer"> <footer id="footer" class="l-footer js-footer mt-0">
{block name="footer"} {block name="footer"}
{include file="_partials/footer.tpl"} {include file="_partials/footer.tpl"}
{/block} {/block}

View File

@@ -28,7 +28,7 @@
{block name='right_column'}{/block} {block name='right_column'}{/block}
{block name='content_wrapper'} {block name='content_wrapper'}
<div id="content-wrapper" class="col-12 js-content-wrapper"> <div id="content-wrapper" class="{if $page.page_name != 'index' || !isset($page.body_classes['layout-full-width'])}col-12 {/if}js-content-wrapper">
{hook h="displayContentWrapperTop"} {hook h="displayContentWrapperTop"}
{block name='content'} {block name='content'}
<p>Hello world! This is HTML5 Boilerplate.</p> <p>Hello world! This is HTML5 Boilerplate.</p>

View File

@@ -0,0 +1,10 @@
{* hero section on home page *}
<section id="home_hero" class="section-spacer-both">
<div class="container">
<div class="row">
<div class="col-12 col-md-8 col-xl-6">
</div>
</div>
</div>
</section>