diff --git a/components/FooterBlock.vue b/components/FooterBlock.vue index 9dc57f1..8ea2764 100644 --- a/components/FooterBlock.vue +++ b/components/FooterBlock.vue @@ -20,15 +20,30 @@ - logo-footer + + logo + diff --git a/components/HeaderBlock.vue b/components/HeaderBlock.vue index 0874983..38dfa71 100644 --- a/components/HeaderBlock.vue +++ b/components/HeaderBlock.vue @@ -20,7 +20,7 @@ logo @@ -51,19 +51,22 @@ logo
- - +
+ + +
+
@@ -122,18 +125,20 @@ logo
- - +
+ + +
@@ -177,6 +182,18 @@ /> +
+

+ {{ $t("change_language") }} +

+ +
+
+

+ {{ $t("change_theme") }} +

+ +
@@ -190,17 +207,17 @@ logo
- +
@@ -244,6 +261,18 @@ /> +
+

+ {{ $t("change_language") }} +

+ +
+
+

+ {{ $t("change_theme") }} +

+ +
diff --git a/components/ImageBlock.vue b/components/ImageBlock.vue new file mode 100644 index 0000000..c93d1c4 --- /dev/null +++ b/components/ImageBlock.vue @@ -0,0 +1,47 @@ + + + + diff --git a/components/MapBlock.vue b/components/MapBlock.vue new file mode 100644 index 0000000..f55e068 --- /dev/null +++ b/components/MapBlock.vue @@ -0,0 +1,297 @@ + + + + + diff --git a/components/section/main-page/MainBlocks.vue b/components/section/main-page/MainBlocks.vue index 8663f6f..75dbb7f 100644 --- a/components/section/main-page/MainBlocks.vue +++ b/components/section/main-page/MainBlocks.vue @@ -34,16 +34,31 @@ + + {{ item.title }} + + + +
+

Jsme tu pro vás napříč Evropou

+ +
+
+
+

Partners

+
+
+
+

Customers

- {{ item.title }}
diff --git a/components/section/main-page/MainHero.vue b/components/section/main-page/MainHero.vue index 2b9d3ab..84806df 100644 --- a/components/section/main-page/MainHero.vue +++ b/components/section/main-page/MainHero.vue @@ -19,9 +19,9 @@ {{ component.section_lang_data.title_second }}
- {{ + {{ component.section_lang_data.button - }} + }}
diff --git a/components/section/main-page/MainProducts.vue b/components/section/main-page/MainProducts.vue index de60723..190486f 100644 --- a/components/section/main-page/MainProducts.vue +++ b/components/section/main-page/MainProducts.vue @@ -2,25 +2,36 @@
+
- pics -
-

- 50g Zlatý slitek: PAMP Suisse -

-

- Osvobozená sazba DPH PL -

+ pics +
+
+

+ {{ item.name }} +

+

+ {{ item.tax_name }} +

+
-

€ 4,825.44

+

+ {{ item.formatted_price }} +

@@ -61,19 +72,27 @@ type Component = { ]; }; -const itemCount = ref(1); +const itemCount = ref(4); +const productStore = useProductStore(); -function updateItemCount() { +async function updateItemCount() { const width = window.innerWidth; - if (width >= 1280) itemCount.value = 5; + if (width >= 1800) itemCount.value = 5; + else if (width >= 1200) itemCount.value = 4; else if (width >= 768) itemCount.value = 3; else if (width >= 640) itemCount.value = 2; else itemCount.value = 1; } -onMounted(() => { - updateItemCount(); +watch(itemCount, async() => { + await productStore.getList(itemCount.value); +}); + +onMounted(async () => { + await updateItemCount(); window.addEventListener("resize", updateItemCount); + + await productStore.getList(itemCount.value); }); onBeforeUnmount(() => { diff --git a/components/ButtonArrow.vue b/components/ui/ButtonArrow.vue similarity index 100% rename from components/ButtonArrow.vue rename to components/ui/ButtonArrow.vue diff --git a/layouts/default.vue b/layouts/default.vue index 4edbd80..0e63a03 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -3,6 +3,13 @@ class="bg-bg-light dark:bg-bg-dark text-text-light dark:text-text-dark font-inter flex min-h-screen flex-col overflow-hidden" > +
diff --git a/public/logo-dark.png b/public/logo-dark.png deleted file mode 100644 index 1c5c143..0000000 Binary files a/public/logo-dark.png and /dev/null differ diff --git a/public/logo-dark.svg b/public/logo-dark.svg new file mode 100644 index 0000000..1aca376 --- /dev/null +++ b/public/logo-dark.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/public/logo-footer-dark.svg b/public/logo-footer-dark.svg new file mode 100644 index 0000000..bf89a2d --- /dev/null +++ b/public/logo-footer-dark.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/public/logo-footer.svg b/public/logo-footer.svg index 6d4fe4c..6f7aff0 100644 --- a/public/logo-footer.svg +++ b/public/logo-footer.svg @@ -1,8 +1,8 @@ - - - - + + + + diff --git a/public/logo.png b/public/logo.png deleted file mode 100644 index 29a6af9..0000000 Binary files a/public/logo.png and /dev/null differ diff --git a/public/logo.svg b/public/logo.svg new file mode 100644 index 0000000..eb1413e --- /dev/null +++ b/public/logo.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/public/pics1.png b/public/pics1.png new file mode 100644 index 0000000..e41635b Binary files /dev/null and b/public/pics1.png differ diff --git a/stores/productStore.ts b/stores/productStore.ts new file mode 100644 index 0000000..0da43ea --- /dev/null +++ b/stores/productStore.ts @@ -0,0 +1,30 @@ +export const useProductStore = defineStore("productStore", () => { + const productList = ref(); + + async function getList(count: number, categoryId = 1) { + try { + const res = await fetch( + `http://127.0.0.1:4000/api/public/products/category/${categoryId}?p=1&elems=${count}`, + { + headers: { + "Content-Type": "application/json", + }, + } + ); + + if (!res.ok) { + throw new Error(`HTTP error: ${res.status}`); + } + + const data = await res.json(); + productList.value = data.data.items; + } catch (error) { + console.error("getList error:", error); + } + } + + return { + productList, + getList, + }; +});