Skip to content

Commit e557024

Browse files
committed
Update header and product styles, add language flags
Adjusted header cart icon positioning and added a new .language-flags class with responsive styles. Updated button and shadow colors on the index page, improved transition properties, and adjusted text positioning on product pages. CSS and JS files were updated to reflect these style changes.
1 parent a5eca18 commit e557024

File tree

8 files changed

+1315
-613
lines changed

8 files changed

+1315
-613
lines changed

assets/css/_header.scss

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,8 @@ header#header {
215215
line-height: 11px;
216216
padding: 3px;
217217
position: absolute;
218-
right: -22px;
219-
top: 0;
218+
right: -38px;
219+
top: 19px;
220220
width: 17px;
221221
z-index: 10;
222222
position: absolute;
@@ -775,7 +775,28 @@ a.contact-link {
775775
.product.active.productVisible {
776776
width: 25%;
777777
}
778-
778+
.language-flags {
779+
font-size: 31px;
780+
position: absolute;
781+
right: 110px;
782+
width: 90px;
783+
top: -6px;
784+
a {
785+
margin-right: 10px;
786+
}
787+
}
788+
@media (max-width: 768px) {
789+
.language-flags {
790+
right: unset;
791+
left: 70px;
792+
top: -40px;
793+
width: 70px;
794+
font-size: 24px;
795+
a {
796+
margin-right: 8px;
797+
}
798+
}
799+
}
779800
@media (max-width: 468px) {
780801
.plugin-fixed-header__basket > button {
781802
display: block !important;

assets/css/_index.scss

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ section#model-selector {
9393
margin-top: 20px;
9494
margin-bottom: 0px;
9595
a {
96-
background-color: #c49b30;
97-
border-color: #c49b30;
96+
background-color: var(--color-secondary-hover);
97+
border-color: var(--color-secondary-hover);
9898
color: #fff;
9999
border-radius: 10px;
100100
font-size: 20px;
@@ -180,7 +180,9 @@ a.ti-header.source-Google {
180180
position: relative;
181181
max-width: 700px;
182182
margin: auto;
183-
box-shadow: 0px 0px 40px 0px rgba(0, 0, 0, 0.1), 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
183+
box-shadow:
184+
0px 0px 40px 0px rgba(0, 0, 0, 0.1),
185+
0px 0px 10px 0px rgba(0, 0, 0, 0.1);
184186
border-radius: 4px;
185187
&:before {
186188
content: "";
@@ -1524,7 +1526,7 @@ a.gold-border.collection-card.shadow {
15241526
@media (min-width: 700px) {
15251527
.layers-text {
15261528
position: absolute;
1527-
bottom: 30px;
1529+
bottom: 40%;
15281530
}
15291531
}
15301532
@media (max-width: 768px) {

assets/css/_productPage.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,9 @@ span.quantity {
10881088
background-color: #fff;
10891089
border-width: 2px;
10901090
margin-block-start: calc((1.25rem / 2) * -1);
1091-
transition: border-color 0.2s ease-in-out, background-color 0.2s ease-in-out;
1091+
transition:
1092+
border-color 0.2s ease-in-out,
1093+
background-color 0.2s ease-in-out;
10921094
border: 2px solid #6d6d6d1f;
10931095
}
10941096
.timeline__nav {
@@ -1207,7 +1209,7 @@ span.quantity {
12071209
}
12081210
.layers-text {
12091211
position: absolute;
1210-
bottom: 0px;
1212+
bottom: 25%;
12111213
}
12121214
}
12131215
@media screen and (min-width: 1000px) {

assets/css/luxuryCar.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/luxuryCar.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/components/header.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ export function initHeader() {
66

77
$('<a href="#" class="toggle-window" data-target="search" data-testid="linkSearchIcon"></a>').prependTo(".desktop .navigation-buttons");
88

9+
// Language flags for SK / CZ - prepend to navigation buttons
10+
911
$("<div>", {
1012
class: "navigation-show",
1113
text: "E-shop",
@@ -21,7 +23,12 @@ export function initHeader() {
2123
}
2224
});
2325
$('<a class="contact-link" href="/kontakty/">Kontakt</a>').prependTo(".navigation-buttons");
24-
26+
$("<div>", { class: "language-flags" })
27+
.html(
28+
'<a href="https://www.luxurycardesign.sk/" class="flag-link" data-lang="sk" aria-label="Slovenská verzia">🇸🇰</a>' +
29+
'<a href="https://www.luxurycardesign.cz/" class="flag-link" data-lang="cs" aria-label="Česká verze">🇨🇿</a>',
30+
)
31+
.prependTo(".navigation-buttons");
2532
headerFixProdukt();
2633
}
2734

assets/js/components/productPage.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
import { showUpsalePopup } from "./UpsalePopup.js";
22
import { createUpsaleButton, createOptions, createBoxConfig } from "./creatButtons.js";
3+
4+
window.addEventListener(
5+
"error",
6+
(event) => {
7+
if (event.target && event.target.tagName === "IMG") {
8+
const img = event.target;
9+
// Check if we already retried this image to prevent infinite loop
10+
if (!img.dataset.retried) {
11+
// We can't strictly check for 502 status in JS error event, so we retry on any error once
12+
console.warn("Image load failed (possible 502), retrying with timestamp:", img.src);
13+
14+
img.dataset.retried = "true";
15+
const separator = img.src.includes("?") ? "&" : "?";
16+
img.src = img.src + separator + Date.now();
17+
}
18+
}
19+
},
20+
true, // Capture phase is needed because error events on elements do not bubble
21+
);
22+
323
let koberce = 88;
424
let boxy = 91;
525
let box1 = 94;

0 commit comments

Comments
 (0)