// This allows to expose several variables to the global scope, to be used in scripts
window.theme = {
pageType: "product",
moneyFormat: "€{{amount_with_comma_separator}}",
moneyWithCurrencyFormat: "€{{amount_with_comma_separator}} EUR",
productImageSize: "natural",
searchMode: "product,article",
showPageTransition: true,
showElementStaggering: true,
showImageZooming: true
};
window.routes = {
rootUrl: "\/",
cartUrl: "\/cart",
cartAddUrl: "\/cart\/add",
cartChangeUrl: "\/cart\/change",
searchUrl: "\/search",
productRecommendationsUrl: "\/recommendations\/products"
};
window.languages = {
cartAddNote: "Notizen zu Deiner Bestellung",
cartEditNote: "Notizen bearbeiten",
productImageLoadingError: "Dieses Bild konnte nicht geladen werden. Bitte versuche die Seite neu zu laden.",
productFormAddToCart: "Zum Warenkorb hinzufügen",
productFormUnavailable: "Nicht verfügbar",
productFormSoldOut: "Ausverkauft",
shippingEstimatorOneResult: "1 Option verfügbar",
shippingEstimatorMoreResults: "{{count}} Option verfügbar",
shippingEstimatorNoResults: "Es konnte keine Lieferung gefunden werden"
};
window.lazySizesConfig = {
loadHidden: false,
hFac: 0.5,
expFactor: 2,
ricTimeout: 150,
lazyClass: 'Image--lazyLoad',
loadingClass: 'Image--lazyLoading',
loadedClass: 'Image--lazyLoaded'
};
document.documentElement.className = document.documentElement.className.replace('no-js', 'js');
document.documentElement.style.setProperty('--window-height', window.innerHeight + 'px');
// We do a quick detection of some features (we could use Modernizr but for so little...)
(function() {
document.documentElement.className += ((window.CSS && window.CSS.supports('(position: sticky) or (position: -webkit-sticky)')) ? ' supports-sticky' : ' no-supports-sticky');
document.documentElement.className += (window.matchMedia('(-moz-touch-enabled: 1), (hover: none)')).matches ? ' no-supports-hover' : ' supports-hover';
}());
Überspringen