Skip to content

Commit bf4c468

Browse files
authored
Merge pull request #918 from w3bdesign/dev
Version 1.1.9
2 parents 4e72e0e + c33ccc1 commit bf4c468

File tree

7 files changed

+97583
-71398
lines changed

7 files changed

+97583
-71398
lines changed

package-lock.json

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"private": true,
3-
"version": "1.1.8",
3+
"version": "1.1.9",
44
"scripts": {
55
"dev": "npm run development",
66
"development": "mix",

public/js/app.js

Lines changed: 97477 additions & 71345 deletions
Large diffs are not rendered by default.

resources/js/components/Header/Navbar.vue

Lines changed: 45 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,78 @@
11
<template>
2-
<header role="banner" class="container flex flex-col justify-center px-0 pt-6 mx-auto mb-6">
2+
<header
3+
role="banner"
4+
class="container flex flex-col justify-center px-0 pt-6 mx-auto mb-6"
5+
>
36
<div class="flex flex-wrap justify-between">
47
<div class="pr-2 my-2 overflow-hidden">
58
<div class="ml-4 lg:ml-0 hidden md:block">
69
<router-link to="/">
7-
<img alt="Logo" class="h-20 lg:h-24" aria-label="Nettbutikk logo" src="../../../img/svg/Logo.svg" />
10+
<img
11+
alt="Logo"
12+
class="h-20 lg:h-24"
13+
aria-label="Nettbutikk logo"
14+
src="../../../img/svg/Logo.svg"
15+
/>
816
</router-link>
917
</div>
1018
<router-link to="/">
11-
<img alt="Mobile logo" class="h-16 md:hidden block w-32" aria-label="Nettbutikk logo"
12-
src="../../../img/svg/MobileLogo.svg" />
19+
<img
20+
alt="Mobile logo"
21+
class="h-16 md:hidden block w-32"
22+
aria-label="Nettbutikk logo"
23+
src="../../../img/svg/MobileLogo.svg"
24+
/>
1325
</router-link>
14-
15-
16-
17-
1826
</div>
1927
<div class="lg:hidden block">
2028
<cart-component />
2129
</div>
2230
<mobile-menu />
2331
<div class="hidden lg:w-1/12 lg:block" />
24-
<div id="nav-content" class="hidden w-full mt-4 bg-black lg:w-8/12 lg:block lg:bg-white lg:mt-0 lg:text-right"
25-
aria-expanded="false">
32+
<div
33+
id="nav-content"
34+
class="hidden w-full mt-4 bg-black lg:w-8/12 lg:block lg:bg-white lg:mt-0 lg:text-right"
35+
aria-expanded="false"
36+
>
2637
<div class="px-6 lg:px-0 lg:pt-5 xl:pt-7">
27-
<nav id="block-main" role="navigation" aria-labelledby="block-main-menu">
28-
<ul class="items-center justify-end flex-1 pr-4 -mr-4 list-reset lg:flex">
29-
<li class="inline-block py-2 text-xl font-semibold no-underline lg:text-base pl-6">
38+
<nav
39+
id="block-main"
40+
role="navigation"
41+
aria-labelledby="block-main-menu"
42+
>
43+
<ul
44+
class="items-center justify-end flex-1 pr-4 -mr-4 list-reset lg:flex"
45+
>
46+
<li
47+
class="inline-block py-2 text-xl font-semibold no-underline lg:text-base pl-6"
48+
>
3049
<search />
3150
</li>
32-
<li class="inline-block py-2 text-xl font-semibold no-underline lg:text-base pl-6">
51+
<li
52+
class="inline-block py-2 text-xl font-semibold no-underline lg:text-base pl-6"
53+
>
3354
<router-link tabindex="0" to="/">
3455
<span
35-
class="text-2xl text-white no-underline lg:text-black link-underline link-underline-blue">
56+
class="text-2xl text-white no-underline lg:text-black link-underline link-underline-blue"
57+
>
3658
Home
3759
</span>
3860
</router-link>
3961
</li>
40-
<li class="inline-block py-2 text-xl font-semibold no-underline lg:text-base pl-6">
62+
<li
63+
class="inline-block py-2 text-xl font-semibold no-underline lg:text-base pl-6"
64+
>
4165
<router-link tabindex="0" to="/products">
4266
<span
43-
class="text-2xl text-white no-underline lg:text-black link-underline link-underline-blue">
67+
class="text-2xl text-white no-underline lg:text-black link-underline link-underline-blue"
68+
>
4469
Products
4570
</span>
4671
</router-link>
4772
</li>
48-
<li class="inline-block py-2 text-xl font-semibold no-underline lg:text-base pl-6">
73+
<li
74+
class="inline-block py-2 text-xl font-semibold no-underline lg:text-base pl-6"
75+
>
4976
<cart-component />
5077
</li>
5178
</ul>

resources/js/components/Header/Search.vue

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,42 @@
11
<template>
22
<input
33
class="w-full px-3 py-2 my-2 border-2 border-gray-300 rounded-md text-sm focus:border-blue-500 focus:outline-none transition-all duration-300"
4-
type="text" v-model="searchTerm" placeholder="Search" />
4+
type="text"
5+
v-model="searchTerm"
6+
placeholder="Search"
7+
/>
58

69
<div v-if="data && data.length > 0 && searchTerm.length > 0">
710
<div
8-
class="flex justify-center absolute bg-white left-0 right-0 h-auto mx-auto py-16 px-8 shadow-md overflow-y-auto overflow-x-hidden scrolling-touch z-50 max-w-screen-md">
11+
class="flex justify-center absolute bg-white left-0 right-0 h-auto mx-auto py-16 px-8 shadow-md overflow-y-auto overflow-x-hidden scrolling-touch z-50 max-w-screen-md"
12+
>
913
<div class="w-full">
10-
<div v-for="product in data" :key="product.id" class="border-t-2 border-b-2 border-grey-500 py-4 w-full">
11-
<RouterLink :to="{
12-
name: 'single.product',
13-
params: { slug: product.slug },
14-
}">
14+
<div
15+
v-for="product in data"
16+
:key="product.id"
17+
class="border-t-2 border-b-2 border-grey-500 py-4 w-full"
18+
>
19+
<RouterLink
20+
:to="{
21+
name: 'single.product',
22+
params: { slug: product.slug },
23+
}"
24+
>
1525
<div class="flex justify-end">
1626
<div class="mr-8 md:mr-0">
17-
<img v-if="product.imageUrl"
27+
<img
28+
v-if="product.imageUrl"
1829
class="transform scale-70 max-w-[90px] max-h-full transition ease-in-out duration-200 transform-origin-center left-0 w-65 h-auto object-contain"
19-
:alt="product.name" :src="product.imageUrl" />
30+
:alt="product.name"
31+
:src="product.imageUrl"
32+
/>
2033
</div>
2134
<div class="w-[170px]">
2235
<div class="product__name">
23-
<div class="product__title" :title="product.name">
36+
<div
37+
class="product__title"
38+
:title="product.name"
39+
>
2440
{{ product.name }}
2541
</div>
2642
</div>

resources/js/components/Products/ShowAllProducts.vue

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,28 @@
11
<template>
22
<div v-if="data && data.length">
33
<div id="product-container" class="flex flex-wrap items-center">
4-
<div v-for="product in data" :key="product.id"
5-
class="flex flex-col mt-6 md:pr-6 xl:pr-6 sm:w1/2 md:w-1/3 lg:w-1/4 xl:w-1/4">
6-
<router-link :to="{
7-
name: 'single.product',
8-
params: { slug: product.slug },
9-
}" class="group">
10-
<img v-if="product.imageUrl" class="productImage" :alt="product.name" :src="product.imageUrl" />
4+
<div
5+
v-for="product in data"
6+
:key="product.id"
7+
class="flex flex-col mt-6 md:pr-6 xl:pr-6 sm:w1/2 md:w-1/3 lg:w-1/4 xl:w-1/4"
8+
>
9+
<router-link
10+
:to="{
11+
name: 'single.product',
12+
params: { slug: product.slug },
13+
}"
14+
class="group"
15+
>
16+
<img
17+
v-if="product.imageUrl"
18+
class="productImage"
19+
:alt="product.name"
20+
:src="product.imageUrl"
21+
/>
1122
<div class="flex justify-center pt-3">
1223
<p
13-
class="text-xl font-bold text-center cursor-pointer transition-colors duration-300 ease-in-out group-hover:text-blue-600">
24+
class="text-xl font-bold text-center cursor-pointer transition-colors duration-300 ease-in-out group-hover:text-blue-600"
25+
>
1426
{{ product.name }}
1527
</p>
1628
</div>
@@ -41,6 +53,4 @@ import formatPrice from "../../utils/functions";
4153
4254
const fetcher = (key) => fetch(key).then((res) => res.json());
4355
const { data, error } = useSWRV("/api/products", fetcher);
44-
45-
4656
</script>

tailwind.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ module.exports = {
1010
},
1111
variants: {
1212
extend: {
13-
textColor: ['group-hover'],
14-
// Add any other group-hover variants you need
13+
textColor: ["group-hover"],
14+
// Add any other group-hover variants you need
1515
},
16-
},
16+
},
1717
plugins: ["flowbite/plugin"],
1818
};

0 commit comments

Comments
 (0)