Skip to content

Commit 7030d1f

Browse files
authored
Merge pull request #524 from w3bdesign/master-cf-autofix
Apply fixes from CodeFactor
2 parents f97a6db + fbbe70e commit 7030d1f

File tree

10 files changed

+24
-231
lines changed

10 files changed

+24
-231
lines changed

components/Cart/AddToCartButton.vue

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,7 @@
11
<template>
22
<div>
33
<button
4-
class="
5-
relative
6-
w-48
7-
h-12
8-
px-4
9-
py-2
10-
mt-4
11-
font-bold
12-
text-white
13-
bg-blue-500
14-
rounded
15-
hover:bg-blue-800
16-
"
4+
class="relative w-48 h-12 px-4 py-2 mt-4 font-bold text-white bg-blue-500 rounded hover:bg-blue-800"
175
:class="{ disabled: loading }"
186
@click="addProductToCart(product)"
197
>

components/Category/ShowAllCategories.vue

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,7 @@
22
<div v-if="categories">
33
<section class="container mx-auto bg-white">
44
<div
5-
class="
6-
grid
7-
gap-2
8-
px-2
9-
pt-2
10-
pb-2
11-
lg:px-0
12-
xl:px-0
13-
md:px-0
14-
lg:grid-cols-4
15-
sm:grid-cols-2
16-
md:grid-cols-3
17-
xs:grid-cols-3
18-
"
5+
class="grid gap-2 px-2 pt-2 pb-2 lg:px-0 xl:px-0 md:px-0 lg:grid-cols-4 sm:grid-cols-2 md:grid-cols-3 xs:grid-cols-3"
196
>
207
<template v-for="nodes in categories">
218
<template v-for="category in nodes">
@@ -29,18 +16,7 @@
2916
>
3017
<div class="p-6 cursor-pointer">
3118
<div
32-
class="
33-
flex
34-
items-center
35-
justify-center
36-
w-full
37-
h-16
38-
text-center
39-
border border-gray-300
40-
rounded-lg
41-
shadow
42-
hover:shadow-outline
43-
"
19+
class="flex items-center justify-center w-full h-16 text-center border border-gray-300 rounded-lg shadow hover:shadow-outline"
4420
>
4521
<p class="text-lg">
4622
{{ category.name }}

components/Index/Hero.vue

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,10 @@
22
<div id="hero">
33
<img alt="Image slider slide #1" src="~assets/images/Hero.jpg" />
44
<div
5-
class="
6-
flex flex-col
7-
items-start
8-
justify-center
9-
w-full
10-
mx-auto
11-
tracking-wide
12-
lg:w-1/2
13-
"
5+
class="flex flex-col items-start justify-center w-full mx-auto tracking-wide lg:w-1/2"
146
>
157
<span
16-
class="
17-
w-full
18-
p-4
19-
mt-4
20-
text-center text-white
21-
bg-black
22-
text-md
23-
lg:text-2xl lg:-mt-64
24-
"
8+
class="w-full p-4 mt-4 text-center text-white bg-black text-md lg:text-2xl lg:-mt-64"
259
>
2610
Modern Interior Sample
2711
</span>

components/Layout/Cart.vue

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,7 @@
2222
<transition name="cart">
2323
<div v-if="cartLength">
2424
<span
25-
class="
26-
absolute
27-
w-6
28-
h-6
29-
pb-2
30-
ml-16
31-
-mt-12
32-
text-center text-white
33-
bg-black
34-
rounded-full
35-
lg:ml-14
36-
"
25+
class="absolute w-6 h-6 pb-2 ml-16 -mt-12 text-center text-white bg-black rounded-full lg:ml-14"
3726
>
3827
{{ cartLength }}
3928
</span>

components/Layout/Footer.vue

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
11
<template>
22
<div class="container mx-auto mt-24">
33
<footer
4-
class="
5-
px-6
6-
text-center
7-
bg-white
8-
border border-gray-300
9-
rounded-lg
10-
shadow-lg
11-
"
4+
class="px-6 text-center bg-white border border-gray-300 rounded-lg shadow-lg"
125
>
136
<div class="p-6">Copyright &copy; {{ todayDate }} Daniel / w3bdesign</div>
147
</footer>

components/Layout/MobileMenu.vue

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,7 @@
22
<div class="relative">
33
<div
44
v-if="!firstRender"
5-
class="
6-
fixed
7-
top-0
8-
left-0
9-
w-screen
10-
mt-40
11-
bg-white
12-
z-100
13-
h-96
14-
animate__animated
15-
"
5+
class="fixed top-0 left-0 w-screen mt-40 bg-white z-100 h-96 animate__animated"
166
:class="{
177
animate__fadeInLeft: expandedMenu,
188
animate__fadeOutRight: !expandedMenu && !firstRender,

components/Layout/Navbar.vue

Lines changed: 10 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,7 @@
1919
<div class="hidden lg:w-1/12 lg:block"></div>
2020
<div
2121
id="nav-content"
22-
class="
23-
hidden
24-
w-full
25-
mt-4
26-
bg-black
27-
lg:w-8/12 lg:block lg:bg-white lg:mt-0 lg:text-right
28-
"
22+
class="hidden w-full mt-4 bg-black lg:w-8/12 lg:block lg:bg-white lg:mt-0 lg:text-right"
2923
aria-expanded="false"
3024
>
3125
<div class="px-6 lg:px-0 lg:pt-5 xl:pt-7">
@@ -36,48 +30,21 @@
3630
aria-labelledby="block-main-menu"
3731
>
3832
<ul
39-
class="
40-
items-center
41-
justify-end
42-
flex-1
43-
pr-4
44-
-mr-4
45-
list-reset
46-
lg:flex
47-
"
33+
class="items-center justify-end flex-1 pr-4 -mr-4 list-reset lg:flex"
4834
>
4935
<li
50-
class="
51-
inline-block
52-
py-2
53-
text-xl
54-
font-semibold
55-
no-underline
56-
lg:text-base lg:px-4
57-
"
36+
class="inline-block py-2 text-xl font-semibold no-underline lg:text-base lg:px-4"
5837
>
5938
<NuxtLink to="/">
6039
<span
61-
class="
62-
text-xl text-white
63-
no-underline
64-
lg:text-black
65-
is-active
66-
"
40+
class="text-xl text-white no-underline lg:text-black is-active"
6741
>
6842
Home
6943
</span>
7044
</NuxtLink>
7145
</li>
7246
<li
73-
class="
74-
inline-block
75-
py-2
76-
text-xl
77-
font-semibold
78-
no-underline
79-
lg:text-base lg:px-4
80-
"
47+
class="inline-block py-2 text-xl font-semibold no-underline lg:text-base lg:px-4"
8148
>
8249
<NuxtLink to="/products">
8350
<span
@@ -87,58 +54,27 @@
8754
</NuxtLink>
8855
</li>
8956
<li
90-
class="
91-
inline-block
92-
py-2
93-
text-xl
94-
font-semibold
95-
no-underline
96-
lg:text-base lg:px-4
97-
"
57+
class="inline-block py-2 text-xl font-semibold no-underline lg:text-base lg:px-4"
9858
>
9959
<NuxtLink to="/categories">
10060
<span
101-
class="
102-
text-xl text-white
103-
no-underline
104-
lg:text-black
105-
is-active
106-
"
61+
class="text-xl text-white no-underline lg:text-black is-active"
10762
>Categories</span
10863
>
10964
</NuxtLink>
11065
</li>
11166
<li
112-
class="
113-
inline-block
114-
py-2
115-
text-xl
116-
font-semibold
117-
no-underline
118-
lg:text-base lg:px-4
119-
"
67+
class="inline-block py-2 text-xl font-semibold no-underline lg:text-base lg:px-4"
12068
>
12169
<NuxtLink to="/search">
12270
<span
123-
class="
124-
text-xl text-white
125-
no-underline
126-
lg:text-black
127-
is-active
128-
"
71+
class="text-xl text-white no-underline lg:text-black is-active"
12972
>Search</span
13073
>
13174
</NuxtLink>
13275
</li>
13376
<li
134-
class="
135-
inline-block
136-
py-2
137-
text-xl
138-
font-semibold
139-
no-underline
140-
lg:text-base lg:px-4
141-
"
77+
class="inline-block py-2 text-xl font-semibold no-underline lg:text-base lg:px-4"
14278
>
14379
<LayoutCart class="-mr-4" />
14480
</li>

components/Order/SubmitOrderButton.vue

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,7 @@
11
<template>
22
<div v-if="!success" class="flex justify-center">
33
<button
4-
class="
5-
relative
6-
w-48
7-
h-12
8-
px-4
9-
py-2
10-
mt-4
11-
font-bold
12-
text-white
13-
bg-blue-500
14-
rounded
15-
hover:bg-blue-800
16-
"
4+
class="relative w-48 h-12 px-4 py-2 mt-4 font-bold text-white bg-blue-500 rounded hover:bg-blue-800"
175
:class="{ disabled: loading }"
186
type="submit"
197
>

components/Products/ShowAllProducts.vue

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,7 @@
1717
>
1818
<img
1919
id="product-image"
20-
class="
21-
container
22-
mx-auto
23-
transition
24-
duration-500
25-
ease-in-out
26-
transform
27-
cursor-pointer
28-
lg:w-64
29-
xl:w-64
30-
sm:p-4
31-
hover:scale-110
32-
"
20+
class="container mx-auto transition duration-500 ease-in-out transform cursor-pointer lg:w-64 xl:w-64 sm:p-4 hover:scale-110"
3321
:alt="product.name"
3422
:src="productImage(product)"
3523
/>

components/Products/ShowSingleProduct.vue

Lines changed: 4 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -3,49 +3,19 @@
33
<section>
44
<div class="container flex flex-wrap items-center pt-4 pb-12 mx-auto">
55
<div
6-
class="
7-
grid grid-cols-1
8-
gap-4
9-
mt-8
10-
lg:grid-cols-2
11-
xl:grid-cols-2
12-
md:grid-cols-2
13-
sm:grid-cols-2
14-
"
6+
class="grid grid-cols-1 gap-4 mt-8 lg:grid-cols-2 xl:grid-cols-2 md:grid-cols-2 sm:grid-cols-2"
157
>
168
<img
179
v-if="product.image !== undefined"
1810
id="product-image"
19-
class="
20-
h-auto
21-
p-8
22-
transition
23-
duration-500
24-
ease-in-out
25-
transform
26-
xl:p-2
27-
md:p-2
28-
lg:p-2
29-
hover:grow hover:shadow-lg hover:scale-105
30-
"
11+
class="h-auto p-8 transition duration-500 ease-in-out transform xl:p-2 md:p-2 lg:p-2 hover:grow hover:shadow-lg hover:scale-105"
3112
:alt="product.name"
3213
:src="product.image.sourceUrl"
3314
/>
3415
<img
3516
v-else
3617
id="product-image"
37-
class="
38-
h-auto
39-
p-8
40-
transition
41-
duration-500
42-
ease-in-out
43-
transform
44-
xl:p-2
45-
md:p-2
46-
lg:p-2
47-
hover:grow hover:shadow-lg hover:scale-105
48-
"
18+
class="h-auto p-8 transition duration-500 ease-in-out transform xl:p-2 md:p-2 lg:p-2 hover:grow hover:shadow-lg hover:scale-105"
4919
:alt="product.name"
5020
:src="process.env.placeholderSmallImage"
5121
/>
@@ -81,16 +51,7 @@
8151
id="variant"
8252
v-model="variationProduct"
8353
name="variant"
84-
class="
85-
block
86-
w-64
87-
px-6
88-
py-2
89-
bg-white
90-
border border-gray-500
91-
rounded-lg
92-
focus:outline-none focus:shadow-outline
93-
"
54+
class="block w-64 px-6 py-2 bg-white border border-gray-500 rounded-lg focus:outline-none focus:shadow-outline"
9455
>
9556
<option
9657
v-for="(variation, index) in product.variations.nodes"

0 commit comments

Comments
 (0)