Compare commits
No commits in common. "main" and "correctif" have entirely different histories.
17 changed files with 133 additions and 365 deletions
|
|
@ -31,38 +31,18 @@
|
|||
--fw-medium: 500;
|
||||
--fw-bold: 600;
|
||||
|
||||
// --color-bg: #161616;
|
||||
// --color-txt: #ffffff;
|
||||
// --color-txt-light: #b9b9b9;
|
||||
// --color-accent: #00ff00;
|
||||
// --color-accent-50: #e9ffe9;
|
||||
// --color-accent-100: #d8fdd8;
|
||||
|
||||
// --grey-100: #d8d8d8;
|
||||
// --grey-300: #b9b9b9;
|
||||
// --grey-400: #969696;
|
||||
// --grey-600: #6d6d6d;
|
||||
// --grey-800: #383838;
|
||||
|
||||
|
||||
--grey-100: #2f2f2f;
|
||||
--grey-200: #2f2f2f;
|
||||
--grey-300: #4a4a4a;
|
||||
--grey-400: #6a6a6a;
|
||||
--grey-600: #9a9a9a;
|
||||
--grey-800: #cfcfcf;
|
||||
--grey-950: #eaeaea;
|
||||
|
||||
|
||||
--color-bg: #ffffff;
|
||||
--color-txt: #161616;
|
||||
--color-txt-light: var(--grey-400);
|
||||
--color-bg: #161616;
|
||||
--color-txt: #ffffff;
|
||||
--color-txt-light: #b9b9b9;
|
||||
--color-accent: #00ff00;
|
||||
--color-accent-50: #e9ffe9;
|
||||
--color-accent-100: #d8fdd8;
|
||||
|
||||
|
||||
|
||||
--grey-100: #d8d8d8;
|
||||
--grey-300: #b9b9b9;
|
||||
--grey-400: #969696;
|
||||
--grey-600: #6d6d6d;
|
||||
--grey-800: #383838;
|
||||
|
||||
--border: 1px solid var(--color-txt);
|
||||
--border-light: 1px solid var(--grey-800);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
#site-footer {
|
||||
background-color: var(--color-txt);
|
||||
color: var(--color-bg);
|
||||
background-color: black;
|
||||
width: 100vw;
|
||||
position: relative;
|
||||
left: calc(var(--padding-body)*-1);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@charset "UTF-8";
|
||||
:root {
|
||||
--font: 'Executive', Arial, sans-serif;
|
||||
--title: 'System', Arial, sans-serif;
|
||||
--font: "Executive", Arial, sans-serif;
|
||||
--title: "System", Arial, sans-serif;
|
||||
--fs-x-small: 10px;
|
||||
--fs-small: 12px;
|
||||
--fs-normal: 16px;
|
||||
|
|
@ -9,32 +9,22 @@
|
|||
--fs-big: 30px;
|
||||
--fs-x-big: 38px;
|
||||
--fs-button-bold: 22px;
|
||||
}
|
||||
@media screen and (max-width: 720px) {
|
||||
:root {
|
||||
--fs-medium: 20px;
|
||||
--fs-big: 26px;
|
||||
}
|
||||
}
|
||||
:root {
|
||||
--leading-tight: 1;
|
||||
--leading-normal: 1.2;
|
||||
--fw-normal: 400;
|
||||
--fw-medium: 500;
|
||||
--fw-bold: 600;
|
||||
--grey-100: #2f2f2f;
|
||||
--grey-200: #2f2f2f;
|
||||
--grey-300: #4a4a4a;
|
||||
--grey-400: #6a6a6a;
|
||||
--grey-600: #9a9a9a;
|
||||
--grey-800: #cfcfcf;
|
||||
--grey-950: #eaeaea;
|
||||
--color-bg: #ffffff;
|
||||
--color-txt: #161616;
|
||||
--color-txt-light: var(--grey-400);
|
||||
--color-bg: #161616;
|
||||
--color-txt: #ffffff;
|
||||
--color-txt-light: #b9b9b9;
|
||||
--color-accent: #00ff00;
|
||||
--color-accent-50: #e9ffe9;
|
||||
--color-accent-100: #d8fdd8;
|
||||
--grey-100: #d8d8d8;
|
||||
--grey-300: #b9b9b9;
|
||||
--grey-400: #969696;
|
||||
--grey-600: #6d6d6d;
|
||||
--grey-800: #383838;
|
||||
--border: 1px solid var(--color-txt);
|
||||
--border-light: 1px solid var(--grey-800);
|
||||
--header-h: 80px;
|
||||
|
|
@ -45,6 +35,12 @@
|
|||
--h-block: 30px;
|
||||
--curve: cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||
}
|
||||
@media screen and (max-width: 720px) {
|
||||
:root {
|
||||
--fs-medium: 20px;
|
||||
--fs-big: 26px;
|
||||
}
|
||||
}
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
|
|
@ -507,17 +503,15 @@ main {
|
|||
z-index: 900;
|
||||
width: calc(100vw - var(--padding-body) * 2);
|
||||
height: var(--header-h);
|
||||
}
|
||||
#site-header.is-shrinked {
|
||||
height: var(--header-h-shrinked);
|
||||
border-bottom: var(--border-light);
|
||||
}
|
||||
#site-header {
|
||||
background-color: var(--color-bg);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
#site-header.is-shrinked {
|
||||
height: var(--header-h-shrinked);
|
||||
border-bottom: var(--border-light);
|
||||
}
|
||||
#site-header .site-title {
|
||||
display: flex;
|
||||
width: 120px;
|
||||
|
|
@ -596,8 +590,7 @@ main {
|
|||
}
|
||||
|
||||
#site-footer {
|
||||
background-color: var(--color-txt);
|
||||
color: var(--color-bg);
|
||||
background-color: black;
|
||||
width: 100vw;
|
||||
position: relative;
|
||||
left: calc(var(--padding-body) * -1);
|
||||
|
|
@ -767,6 +760,7 @@ main {
|
|||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
grid-gap: calc(var(--padding-body) * 0.75);
|
||||
display: none;
|
||||
}
|
||||
@media screen and (min-width: 1080px) {
|
||||
#section__donation .btn--donation__container {
|
||||
|
|
@ -782,9 +776,6 @@ main {
|
|||
#section__donation .btn--donation__container .btn--donation__grow-2 {
|
||||
grid-column: span 2;
|
||||
}
|
||||
#section__donation .btn--donation__container {
|
||||
display: none;
|
||||
}
|
||||
#section__donation .btn--donation__container.is-selected {
|
||||
display: grid;
|
||||
}
|
||||
|
|
@ -1063,10 +1054,6 @@ body.is-fullscreen {
|
|||
margin-right: auto;
|
||||
}
|
||||
|
||||
.product-content {
|
||||
display: contents;
|
||||
}
|
||||
|
||||
.store__nav {
|
||||
padding-top: calc(var(--spacing) * 1);
|
||||
padding-bottom: calc(var(--spacing) * 0.5);
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -5,10 +5,6 @@
|
|||
margin-right: auto;
|
||||
}
|
||||
|
||||
.product-content {
|
||||
display: contents;
|
||||
}
|
||||
|
||||
.store__nav {
|
||||
padding-top: calc(var(--spacing) * 1);
|
||||
padding-bottom: calc(var(--spacing) * 0.5);
|
||||
|
|
|
|||
|
|
@ -32,9 +32,6 @@
|
|||
|
||||
// Initialize event listeners
|
||||
setupEventListeners();
|
||||
|
||||
// Load initial cart state
|
||||
loadCart();
|
||||
}
|
||||
|
||||
function setupEventListeners() {
|
||||
|
|
@ -63,18 +60,6 @@
|
|||
});
|
||||
}
|
||||
|
||||
async function loadCart() {
|
||||
if (!cartInstance) return;
|
||||
|
||||
try {
|
||||
const cart = await cartInstance.getCart();
|
||||
currentCart = cart;
|
||||
renderCart();
|
||||
} catch (error) {
|
||||
console.error('Error loading cart:', error);
|
||||
}
|
||||
}
|
||||
|
||||
function openDrawer() {
|
||||
drawer.classList.add('is-open');
|
||||
document.body.style.overflow = 'hidden';
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
if (!container) return;
|
||||
|
||||
const handle = container.dataset.shopifyHandle;
|
||||
const language = container.dataset.language || "fr";
|
||||
const isEnglish = language === "en";
|
||||
const language = container.dataset.language || 'fr';
|
||||
const isEnglish = language === 'en';
|
||||
const loadingState = container.querySelector(".product-loading");
|
||||
const contentState = container.querySelector(".product-content");
|
||||
const errorState = container.querySelector(".product-error");
|
||||
|
|
@ -63,10 +63,9 @@
|
|||
function renderTitle(product, isEnglish) {
|
||||
const titleEl = document.querySelector("[data-product-title]");
|
||||
if (titleEl) {
|
||||
const title =
|
||||
isEnglish && product.titleEn?.value
|
||||
? product.titleEn.value
|
||||
: product.title;
|
||||
const title = isEnglish && product.titleEn?.value
|
||||
? product.titleEn.value
|
||||
: product.title;
|
||||
titleEl.textContent = title;
|
||||
}
|
||||
}
|
||||
|
|
@ -82,10 +81,9 @@
|
|||
function renderDetails(product, isEnglish) {
|
||||
const detailsEl = document.querySelector("[data-product-details]");
|
||||
if (detailsEl) {
|
||||
const description =
|
||||
isEnglish && product.descriptionEn?.value
|
||||
? product.descriptionEn.value.replaceAll("\n", "<br>")
|
||||
: product.descriptionHtml || "";
|
||||
const description = isEnglish && product.descriptionEn?.value
|
||||
? product.descriptionEn.value
|
||||
: product.descriptionHtml || "";
|
||||
detailsEl.innerHTML = description;
|
||||
}
|
||||
}
|
||||
|
|
@ -94,10 +92,9 @@
|
|||
const imagesContainer = document.querySelector("[data-product-images]");
|
||||
|
||||
if (imagesContainer && product.images.edges.length > 0) {
|
||||
const productTitle =
|
||||
isEnglish && product.titleEn?.value
|
||||
? product.titleEn.value
|
||||
: product.title;
|
||||
const productTitle = isEnglish && product.titleEn?.value
|
||||
? product.titleEn.value
|
||||
: product.title;
|
||||
|
||||
imagesContainer.innerHTML = product.images.edges
|
||||
.map((edge) => {
|
||||
|
|
@ -120,16 +117,12 @@
|
|||
if (product.variants.edges.length <= 1) return;
|
||||
|
||||
const firstVariant = product.variants.edges[0].node;
|
||||
if (
|
||||
!firstVariant.selectedOptions ||
|
||||
firstVariant.selectedOptions.length === 0
|
||||
)
|
||||
return;
|
||||
if (!firstVariant.selectedOptions || firstVariant.selectedOptions.length === 0) return;
|
||||
|
||||
const mainOption = firstVariant.selectedOptions[0];
|
||||
const optionValues = new Set();
|
||||
|
||||
product.variants.edges.forEach((edge) => {
|
||||
product.variants.edges.forEach(edge => {
|
||||
const variant = edge.node;
|
||||
if (variant.selectedOptions && variant.selectedOptions[0]) {
|
||||
optionValues.add(variant.selectedOptions[0].value);
|
||||
|
|
@ -144,62 +137,52 @@
|
|||
if (!optionsContainer || !optionsList) return;
|
||||
|
||||
const optionName = mainOption.name;
|
||||
const optionSlug = optionName.toLowerCase().replace(/\s+/g, "-");
|
||||
const optionSlug = optionName.toLowerCase().replace(/\s+/g, '-');
|
||||
|
||||
optionsList.innerHTML = Array.from(optionValues)
|
||||
.map((value) => {
|
||||
const uniqueId = `${optionSlug}-${value
|
||||
.toLowerCase()
|
||||
.replace(/\s+/g, "-")}`;
|
||||
const variant = product.variants.edges.find(
|
||||
(e) =>
|
||||
e.node.selectedOptions && e.node.selectedOptions[0]?.value === value
|
||||
)?.node;
|
||||
const isAvailable = variant?.availableForSale || false;
|
||||
optionsList.innerHTML = Array.from(optionValues).map((value) => {
|
||||
const uniqueId = `${optionSlug}-${value.toLowerCase().replace(/\s+/g, '-')}`;
|
||||
const variant = product.variants.edges.find(e =>
|
||||
e.node.selectedOptions && e.node.selectedOptions[0]?.value === value
|
||||
)?.node;
|
||||
const isAvailable = variant?.availableForSale || false;
|
||||
|
||||
return `
|
||||
return `
|
||||
<li>
|
||||
<input
|
||||
type="radio"
|
||||
id="${uniqueId}"
|
||||
name="${optionSlug}"
|
||||
value="${value}"
|
||||
data-variant-id="${
|
||||
variant
|
||||
? variant.id.replace("gid://shopify/ProductVariant/", "")
|
||||
: ""
|
||||
}"
|
||||
${!isAvailable ? "disabled" : ""}
|
||||
data-variant-id="${variant ? variant.id.replace('gid://shopify/ProductVariant/', '') : ''}"
|
||||
${!isAvailable ? 'disabled' : ''}
|
||||
/>
|
||||
<label for="${uniqueId}">${value}</label>
|
||||
</li>
|
||||
`;
|
||||
})
|
||||
.join("");
|
||||
}).join('');
|
||||
|
||||
optionsContainer.style.display = "block";
|
||||
optionsContainer.style.display = 'block';
|
||||
|
||||
const radios = optionsList.querySelectorAll('input[type="radio"]');
|
||||
const addToCartBtn = document.querySelector("[data-shopify-add-to-cart]");
|
||||
const buttonText = addToCartBtn?.querySelector("[data-button-text]");
|
||||
const buttonText = addToCartBtn?.querySelector('[data-button-text]');
|
||||
|
||||
radios.forEach((radio) => {
|
||||
radio.addEventListener("change", function () {
|
||||
radios.forEach(radio => {
|
||||
radio.addEventListener('change', function() {
|
||||
const variantId = this.dataset.variantId;
|
||||
|
||||
if (addToCartBtn) {
|
||||
addToCartBtn.dataset.variantId = variantId;
|
||||
addToCartBtn.removeAttribute("disabled");
|
||||
addToCartBtn.removeAttribute('disabled');
|
||||
}
|
||||
|
||||
if (buttonText) {
|
||||
buttonText.textContent =
|
||||
addToCartBtn.dataset.defaultText || "Ajouter au panier";
|
||||
buttonText.textContent = addToCartBtn.dataset.defaultText || 'Ajouter au panier';
|
||||
}
|
||||
|
||||
const allLi = optionsList.querySelectorAll("li");
|
||||
allLi.forEach((li) => li.classList.remove("is-selected"));
|
||||
this.closest("li").classList.add("is-selected");
|
||||
const allLi = optionsList.querySelectorAll('li');
|
||||
allLi.forEach(li => li.classList.remove('is-selected'));
|
||||
this.closest('li').classList.add('is-selected');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
@ -213,11 +196,10 @@
|
|||
|
||||
const hasMultipleVariants = product.variants.edges.length > 1;
|
||||
const firstVariant = product.variants.edges[0]?.node;
|
||||
const hasOptions =
|
||||
firstVariant?.selectedOptions && firstVariant.selectedOptions.length > 0;
|
||||
const hasOptions = firstVariant?.selectedOptions && firstVariant.selectedOptions.length > 0;
|
||||
|
||||
const uniqueOptions = new Set();
|
||||
product.variants.edges.forEach((edge) => {
|
||||
product.variants.edges.forEach(edge => {
|
||||
if (edge.node.selectedOptions && edge.node.selectedOptions[0]) {
|
||||
uniqueOptions.add(edge.node.selectedOptions[0].value);
|
||||
}
|
||||
|
|
@ -225,11 +207,10 @@
|
|||
const hasMultipleOptions = uniqueOptions.size > 1;
|
||||
|
||||
if (hasMultipleVariants && hasOptions && hasMultipleOptions) {
|
||||
addToCartBtn.setAttribute("disabled", "disabled");
|
||||
const buttonText = addToCartBtn.querySelector("[data-button-text]");
|
||||
addToCartBtn.setAttribute('disabled', 'disabled');
|
||||
const buttonText = addToCartBtn.querySelector('[data-button-text]');
|
||||
if (buttonText) {
|
||||
buttonText.textContent =
|
||||
addToCartBtn.dataset.textChooseOption || "Choisissez une option";
|
||||
buttonText.textContent = addToCartBtn.dataset.textChooseOption || 'Choisissez une option';
|
||||
}
|
||||
} else {
|
||||
const firstAvailableVariant = product.variants.edges.find(
|
||||
|
|
@ -247,50 +228,44 @@
|
|||
|
||||
function updateMetaTags(product, isEnglish) {
|
||||
// Update title and description
|
||||
const title =
|
||||
isEnglish && product.titleEn?.value
|
||||
? product.titleEn.value
|
||||
: product.title;
|
||||
const description =
|
||||
isEnglish && product.descriptionEn?.value
|
||||
? product.descriptionEn.value
|
||||
: product.description;
|
||||
const title = isEnglish && product.titleEn?.value
|
||||
? product.titleEn.value
|
||||
: product.title;
|
||||
const description = isEnglish && product.descriptionEn?.value
|
||||
? product.descriptionEn.value
|
||||
: product.description;
|
||||
|
||||
// Update Open Graph title
|
||||
const ogTitle = document.getElementById("og-title");
|
||||
const ogTitle = document.getElementById('og-title');
|
||||
if (ogTitle) {
|
||||
ogTitle.setAttribute("content", title);
|
||||
ogTitle.setAttribute('content', title);
|
||||
}
|
||||
|
||||
// Update Open Graph description
|
||||
const ogDescription = document.getElementById("og-description");
|
||||
const ogDescription = document.getElementById('og-description');
|
||||
if (ogDescription && description) {
|
||||
const excerpt = description.substring(0, 160);
|
||||
ogDescription.setAttribute("content", excerpt);
|
||||
ogDescription.setAttribute('content', excerpt);
|
||||
}
|
||||
|
||||
// Update Open Graph image
|
||||
const ogImage = document.getElementById("og-image");
|
||||
const ogImage = document.getElementById('og-image');
|
||||
if (ogImage && product.images.edges.length > 0) {
|
||||
ogImage.setAttribute("content", product.images.edges[0].node.url);
|
||||
ogImage.setAttribute('content', product.images.edges[0].node.url);
|
||||
}
|
||||
|
||||
// Update product price
|
||||
const ogPrice = document.getElementById("og-price");
|
||||
const ogPrice = document.getElementById('og-price');
|
||||
if (ogPrice) {
|
||||
const price = parseFloat(
|
||||
product.priceRange.minVariantPrice.amount
|
||||
).toFixed(2);
|
||||
ogPrice.setAttribute("content", price);
|
||||
const price = parseFloat(product.priceRange.minVariantPrice.amount).toFixed(2);
|
||||
ogPrice.setAttribute('content', price);
|
||||
}
|
||||
|
||||
// Update availability
|
||||
const ogAvailability = document.getElementById("og-availability");
|
||||
const ogAvailability = document.getElementById('og-availability');
|
||||
if (ogAvailability) {
|
||||
const availability = product.availableForSale
|
||||
? "in stock"
|
||||
: "out of stock";
|
||||
ogAvailability.setAttribute("content", availability);
|
||||
const availability = product.availableForSale ? 'in stock' : 'out of stock';
|
||||
ogAvailability.setAttribute('content', availability);
|
||||
}
|
||||
|
||||
// Update page title
|
||||
|
|
@ -300,7 +275,7 @@
|
|||
let metaDescription = document.querySelector('meta[name="description"]');
|
||||
if (metaDescription && description) {
|
||||
const excerpt = description.substring(0, 160);
|
||||
metaDescription.setAttribute("content", excerpt);
|
||||
metaDescription.setAttribute('content', excerpt);
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
|
|
|||
|
|
@ -306,58 +306,6 @@ class ShopifyCart {
|
|||
return cart;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get existing cart by ID
|
||||
*/
|
||||
async getCart() {
|
||||
if (!this.cartId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const query = `
|
||||
query getCart($cartId: ID!) {
|
||||
cart(id: $cartId) {
|
||||
id
|
||||
checkoutUrl
|
||||
lines(first: 10) {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
quantity
|
||||
merchandise {
|
||||
... on ProductVariant {
|
||||
id
|
||||
title
|
||||
price {
|
||||
amount
|
||||
currencyCode
|
||||
}
|
||||
product {
|
||||
title
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
try {
|
||||
const data = await this.query(query, {
|
||||
cartId: this.cartId
|
||||
});
|
||||
|
||||
return data.cart;
|
||||
} catch (error) {
|
||||
// Cart might be expired or invalid
|
||||
console.error('Error fetching cart:', error);
|
||||
this.clearCart();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get checkout URL to redirect user
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
Title: Error
|
||||
|
||||
----
|
||||
|
||||
Template: default
|
||||
|
|
@ -1,5 +1 @@
|
|||
Title: Erreur
|
||||
|
||||
----
|
||||
|
||||
Uuid: kcrqkszqasludg2h
|
||||
|
|
@ -25,56 +25,6 @@ return [
|
|||
);
|
||||
}
|
||||
],
|
||||
// English homepage
|
||||
[
|
||||
'pattern' => 'en',
|
||||
'action' => function() {
|
||||
$home = page('home');
|
||||
if ($home) {
|
||||
site()->visit($home, 'en');
|
||||
return $home;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
],
|
||||
// English thanks page
|
||||
[
|
||||
'pattern' => 'en/thanks',
|
||||
'action' => function() {
|
||||
$thanks = page('thanks');
|
||||
if ($thanks) {
|
||||
site()->visit($thanks, 'en');
|
||||
return $thanks;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
],
|
||||
// English error page
|
||||
[
|
||||
'pattern' => 'en/error',
|
||||
'action' => function() {
|
||||
$error = page('error');
|
||||
if ($error) {
|
||||
site()->visit($error, 'en');
|
||||
return $error;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
],
|
||||
// French thanks page
|
||||
[
|
||||
'pattern' => 'thanks',
|
||||
'action' => function() {
|
||||
return page('thanks');
|
||||
}
|
||||
],
|
||||
// French error page
|
||||
[
|
||||
'pattern' => 'error',
|
||||
'action' => function() {
|
||||
return page('error');
|
||||
}
|
||||
],
|
||||
// French products (default)
|
||||
[
|
||||
'pattern' => '(:any)',
|
||||
|
|
|
|||
|
|
@ -38,18 +38,12 @@
|
|||
const language = container.dataset.language || 'fr';
|
||||
const isEnglish = language === 'en';
|
||||
|
||||
function initStructuredData() {
|
||||
if (typeof ShopifyCart === 'undefined') {
|
||||
setTimeout(initStructuredData, 100);
|
||||
return;
|
||||
}
|
||||
const cart = new ShopifyCart({
|
||||
domain: 'nv7cqv-bu.myshopify.com',
|
||||
storefrontAccessToken: 'dec3d35a2554384d149c72927d1cfd1b'
|
||||
});
|
||||
|
||||
const cart = new ShopifyCart({
|
||||
domain: 'nv7cqv-bu.myshopify.com',
|
||||
storefrontAccessToken: 'dec3d35a2554384d149c72927d1cfd1b'
|
||||
});
|
||||
|
||||
cart.getProductByHandle(handle).then(product => {
|
||||
cart.getProductByHandle(handle).then(product => {
|
||||
if (!product) return;
|
||||
|
||||
const title = isEnglish && product.titleEn?.value ? product.titleEn.value : product.title;
|
||||
|
|
@ -85,10 +79,6 @@
|
|||
if (schemaScript) {
|
||||
schemaScript.textContent = JSON.stringify(schema, null, 2);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Initialize when ShopifyCart is available
|
||||
initStructuredData();
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
|
|
|
|||
5
vendor/autoload.php
vendored
5
vendor/autoload.php
vendored
|
|
@ -14,7 +14,10 @@ if (PHP_VERSION_ID < 50600) {
|
|||
echo $err;
|
||||
}
|
||||
}
|
||||
throw new RuntimeException($err);
|
||||
trigger_error(
|
||||
$err,
|
||||
E_USER_ERROR
|
||||
);
|
||||
}
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
|
|
|||
45
vendor/composer/InstalledVersions.php
vendored
45
vendor/composer/InstalledVersions.php
vendored
|
|
@ -26,23 +26,12 @@ use Composer\Semver\VersionParser;
|
|||
*/
|
||||
class InstalledVersions
|
||||
{
|
||||
/**
|
||||
* @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to
|
||||
* @internal
|
||||
*/
|
||||
private static $selfDir = null;
|
||||
|
||||
/**
|
||||
* @var mixed[]|null
|
||||
* @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
|
||||
*/
|
||||
private static $installed;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private static $installedIsLocalDir;
|
||||
|
||||
/**
|
||||
* @var bool|null
|
||||
*/
|
||||
|
|
@ -320,24 +309,6 @@ class InstalledVersions
|
|||
{
|
||||
self::$installed = $data;
|
||||
self::$installedByVendor = array();
|
||||
|
||||
// when using reload, we disable the duplicate protection to ensure that self::$installed data is
|
||||
// always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not,
|
||||
// so we have to assume it does not, and that may result in duplicate data being returned when listing
|
||||
// all installed packages for example
|
||||
self::$installedIsLocalDir = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
private static function getSelfDir()
|
||||
{
|
||||
if (self::$selfDir === null) {
|
||||
self::$selfDir = strtr(__DIR__, '\\', '/');
|
||||
}
|
||||
|
||||
return self::$selfDir;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -351,27 +322,19 @@ class InstalledVersions
|
|||
}
|
||||
|
||||
$installed = array();
|
||||
$copiedLocalDir = false;
|
||||
|
||||
if (self::$canGetVendors) {
|
||||
$selfDir = self::getSelfDir();
|
||||
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
|
||||
$vendorDir = strtr($vendorDir, '\\', '/');
|
||||
if (isset(self::$installedByVendor[$vendorDir])) {
|
||||
$installed[] = self::$installedByVendor[$vendorDir];
|
||||
} elseif (is_file($vendorDir.'/composer/installed.php')) {
|
||||
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
|
||||
$required = require $vendorDir.'/composer/installed.php';
|
||||
self::$installedByVendor[$vendorDir] = $required;
|
||||
$installed[] = $required;
|
||||
if (self::$installed === null && $vendorDir.'/composer' === $selfDir) {
|
||||
self::$installed = $required;
|
||||
self::$installedIsLocalDir = true;
|
||||
$installed[] = self::$installedByVendor[$vendorDir] = $required;
|
||||
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
|
||||
self::$installed = $installed[count($installed) - 1];
|
||||
}
|
||||
}
|
||||
if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) {
|
||||
$copiedLocalDir = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -387,7 +350,7 @@ class InstalledVersions
|
|||
}
|
||||
}
|
||||
|
||||
if (self::$installed !== array() && !$copiedLocalDir) {
|
||||
if (self::$installed !== array()) {
|
||||
$installed[] = self::$installed;
|
||||
}
|
||||
|
||||
|
|
|
|||
4
vendor/composer/installed.php
vendored
4
vendor/composer/installed.php
vendored
|
|
@ -3,7 +3,7 @@
|
|||
'name' => 'getkirby/plainkit',
|
||||
'pretty_version' => 'dev-main',
|
||||
'version' => 'dev-main',
|
||||
'reference' => 'b78a6f822a398b2ea4b53940c7c8bd66e4f3bcc0',
|
||||
'reference' => '44ed53aae0b7128526b1fe9c2c66e80b18df323f',
|
||||
'type' => 'project',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
|
|
@ -67,7 +67,7 @@
|
|||
'getkirby/plainkit' => array(
|
||||
'pretty_version' => 'dev-main',
|
||||
'version' => 'dev-main',
|
||||
'reference' => 'b78a6f822a398b2ea4b53940c7c8bd66e4f3bcc0',
|
||||
'reference' => '44ed53aae0b7128526b1fe9c2c66e80b18df323f',
|
||||
'type' => 'project',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
|
|
|
|||
5
vendor/composer/platform_check.php
vendored
5
vendor/composer/platform_check.php
vendored
|
|
@ -19,7 +19,8 @@ if ($issues) {
|
|||
echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
|
||||
}
|
||||
}
|
||||
throw new \RuntimeException(
|
||||
'Composer detected issues in your platform: ' . implode(' ', $issues)
|
||||
trigger_error(
|
||||
'Composer detected issues in your platform: ' . implode(' ', $issues),
|
||||
E_USER_ERROR
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue