forked from Aaron/Kino-Website
Added html hints to enable syntax highliting
This commit is contained in:
12
cart.js
12
cart.js
@@ -119,7 +119,7 @@ function renderCart() {
|
||||
|
||||
const groupedItems = groupCartItems();
|
||||
|
||||
const header = `
|
||||
const header = /*html*/`
|
||||
<div class="cart-header-row">
|
||||
<div class="col-amount">MENGE</div>
|
||||
<div class="col-img">VORSCHAU</div>
|
||||
@@ -133,11 +133,11 @@ function renderCart() {
|
||||
const rows = groupedItems
|
||||
.map((group) => {
|
||||
const imageHtml = group.item.img
|
||||
? `<img class="cart-img-small" src="${escapeHtml(group.item.img)}" alt="${escapeHtml(group.item.title)}">`
|
||||
: `<div class="cart-img-fallback">Kein Bild</div>`;
|
||||
? /*html*/`<img class="cart-img-small" src="${escapeHtml(group.item.img)}" alt="${escapeHtml(group.item.title)}">`
|
||||
: /*html*/`<div class="cart-img-fallback">Kein Bild</div>`;
|
||||
const quantityHtml = group.item.category === "movie"
|
||||
? `<div class="qty-static" aria-label="Feste Ticketanzahl">${group.quantity}x</div>`
|
||||
: `
|
||||
? /*html*/`<div class="qty-static" aria-label="Feste Ticketanzahl">${group.quantity}x</div>`
|
||||
: /*html*/`
|
||||
<div class="qty-stepper">
|
||||
<button class="btn-qty" data-action="minus" data-key="${escapeHtml(group.key)}">-</button>
|
||||
<span>${group.quantity}</span>
|
||||
@@ -145,7 +145,7 @@ function renderCart() {
|
||||
</div>
|
||||
`;
|
||||
|
||||
return `
|
||||
return /*html*/`
|
||||
<div class="cart-item-row">
|
||||
<div class="col-amount">
|
||||
${quantityHtml}
|
||||
|
||||
Reference in New Issue
Block a user