Skip to content

Commit 082af38

Browse files
committed
Single client component and loop through with BPs
1 parent f5bd7aa commit 082af38

File tree

2 files changed

+73
-58
lines changed

2 files changed

+73
-58
lines changed

src/components/AboutClientSingle.vue

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<template>
2+
<div>
3+
<img
4+
:src="client.img"
5+
:alt="client.title"
6+
class="w-64 py-5 px-10 border border-ternary-light dark:border-ternary-dark shadow-sm rounded-xl mb-8 cursor-pointer"
7+
/>
8+
</div>
9+
</template>
10+
11+
<script>
12+
export default {
13+
props: ['client'],
14+
};
15+
</script>
16+
17+
<style lang="scss" scoped></style>

src/components/AboutClients.vue

Lines changed: 56 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -3,73 +3,71 @@
33
<p
44
class="text-2xl sm:text-4xl text-primary-dark dark:text-primary-light font-sans font-semibold"
55
>
6-
Some of the brands I worked with
6+
{{ clientsHeading }}
77
</p>
88
<div class="grid grid-cols-2 sm:grid-cols-4 mt-10 sm:mt-20 gap-2">
9-
<div>
10-
<img
11-
src="@/assets/images/brands/amazon_gray.png"
12-
alt="Amazon"
13-
class="w-64 py-5 px-10 border border-ternary-light dark:border-ternary-dark shadow-sm rounded-xl mb-8 cursor-pointer"
14-
/>
15-
</div>
16-
<div>
17-
<img
18-
src="@/assets/images/brands/sony_gray.png"
19-
alt="SONY"
20-
class="w-64 py-5 px-10 border border-ternary-light dark:border-ternary-dark shadow-sm rounded-xl mb-8 cursor-pointer"
21-
/>
22-
</div>
23-
<div>
24-
<img
25-
src="@/assets/images/brands/adidas_gray.png"
26-
alt="Adidas"
27-
class="w-64 py-5 px-10 border border-ternary-light dark:border-ternary-dark shadow-sm rounded-xl mb-8 cursor-pointer"
28-
/>
29-
</div>
30-
<div>
31-
<img
32-
src="@/assets/images/brands/fila_gray.png"
33-
alt="FILA"
34-
class="w-64 py-5 px-10 border border-ternary-light dark:border-ternary-dark shadow-sm rounded-xl mb-8 cursor-pointer"
35-
/>
36-
</div>
37-
<div>
38-
<img
39-
src="@/assets/images/brands/nb_gray.png"
40-
alt="NB"
41-
class="w-64 py-5 px-10 border border-ternary-light dark:border-ternary-dark shadow-sm rounded-xl mb-8 cursor-pointer"
42-
/>
43-
</div>
44-
<div>
45-
<img
46-
src="@/assets/images/brands/samsung_gray.png"
47-
alt="Samsung"
48-
class="w-64 py-5 px-10 border border-ternary-light dark:border-ternary-dark shadow-sm rounded-xl mb-8 cursor-pointer"
49-
/>
50-
</div>
51-
<div>
52-
<img
53-
src="@/assets/images/brands/canon_gray.png"
54-
alt="Canon"
55-
class="w-64 py-5 px-10 border border-ternary-light dark:border-ternary-dark shadow-sm rounded-xl mb-8 cursor-pointer"
56-
/>
57-
</div>
58-
<div>
59-
<img
60-
src="@/assets/images/brands/puma_gray.png"
61-
alt="Puma"
62-
class="w-64 py-5 px-10 border border-ternary-light dark:border-ternary-dark shadow-sm rounded-xl mb-8 cursor-pointer"
63-
/>
64-
</div>
9+
<AboutClientSingle
10+
v-for="client in clients"
11+
:key="client.id"
12+
:client="client"
13+
/>
6514
</div>
6615
</div>
6716
</template>
6817

6918
<script>
19+
import AboutClientSingle from './AboutClientSingle.vue';
20+
7021
export default {
22+
components: {
23+
AboutClientSingle,
24+
},
7125
data: () => {
72-
return {};
26+
return {
27+
clientsHeading: 'Some of the brands I worked with',
28+
clients: [
29+
{
30+
id: 1,
31+
title: 'Amazon',
32+
img: require('@/assets/images/brands/amazon_gray.png'),
33+
},
34+
{
35+
id: 2,
36+
title: 'Sony',
37+
img: require('@/assets/images/brands/sony_gray.png'),
38+
},
39+
{
40+
id: 3,
41+
title: 'Adidas',
42+
img: require('@/assets/images/brands/adidas_gray.png'),
43+
},
44+
{
45+
id: 4,
46+
title: 'FILA',
47+
img: require('@/assets/images/brands/fila_gray.png'),
48+
},
49+
{
50+
id: 5,
51+
title: 'NB',
52+
img: require('@/assets/images/brands/nb_gray.png'),
53+
},
54+
{
55+
id: 6,
56+
title: 'SAMSUNG',
57+
img: require('@/assets/images/brands/samsung_gray.png'),
58+
},
59+
{
60+
id: 7,
61+
title: 'CANON',
62+
img: require('@/assets/images/brands/canon_gray.png'),
63+
},
64+
{
65+
id: 7,
66+
title: 'PUMA',
67+
img: require('@/assets/images/brands/puma_gray.png'),
68+
},
69+
],
70+
};
7371
},
7472
};
7573
</script>

0 commit comments

Comments
 (0)