@dcrackel/meyersquaredui 1.0.37 → 1.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/meyersquaredui.es.js +343 -219
- package/dist/meyersquaredui.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/assets/fonts/Raleway-Thin.ttf +0 -0
- package/src/assets/images/portrait1.png +0 -0
- package/src/mocks/getArticles.js +19 -0
- package/src/mocks/getTopFencers.js +157 -0
- package/src/mocks/getTournamentsMock.js +185 -0
- package/src/stories/Atoms/BaseButton/BaseButton.stories.js +35 -32
- package/src/stories/Atoms/BaseButton/BaseButton.vue +66 -4
- package/src/stories/Atoms/BaseText/BaseText.vue +25 -8
- package/src/stories/Atoms/Icon/Icon.vue +6 -1
- package/src/stories/Organisms/Cards/ArticleCard/ArticleCard.stories.js +25 -0
- package/src/stories/Organisms/Cards/ArticleCard/ArticleCard.vue +48 -0
- package/src/stories/Organisms/Cards/FencerCard/FencerCard.stories.js +48 -0
- package/src/stories/Organisms/Cards/FencerCard/FencerCard.vue +69 -0
- package/src/stories/Organisms/Cards/TournamentCard/TournamentCard.stories.js +24 -0
- package/src/stories/Organisms/Cards/TournamentCard/TournamentCard.vue +121 -0
- package/src/stories/Organisms/Footer/Foot.stories.js +11 -0
- package/src/stories/Organisms/Footer/Footer.vue +94 -0
- package/src/stories/Organisms/GridLayout/GridLayout.stories.js +148 -0
- package/src/stories/Organisms/GridLayout/GridLayout.vue +98 -0
- package/src/stories/Organisms/Headers/Header.stories.js +1 -1
- package/src/stories/Organisms/Headers/Header.vue +5 -6
- package/src/stories/Organisms/HeroBanners/HomePage/HeroBanner.vue +52 -25
- package/src/stories/Organisms/SectionBanners/DoubleButtonBanner/DoubleButtonBanner.stories.js +28 -0
- package/src/stories/Organisms/SectionBanners/DoubleButtonBanner/DoubleButtonBanner.vue +118 -0
- package/src/stories/Organisms/SectionBanners/SingleButtonBanner/SingleButtonBanner.stories.js +35 -0
- package/src/stories/Organisms/SectionBanners/SingleButtonBanner/SingleButtonBanner.vue +48 -0
- package/src/stories/Templates/HomePage/TestPage.stories.js +7 -2
- package/src/stories/Templates/HomePage/TestPage.vue +73 -1
- package/src/components/HelloWorld.vue +0 -43
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import GridLayout from './GridLayout.vue';
|
|
2
|
+
import TournamentCard from '../../Organisms/Cards/TournamentCard/TournamentCard.vue';
|
|
3
|
+
import FencerCard from '../../Organisms/Cards/FencerCard/FencerCard.vue';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Organisms/Grids/GridLayout',
|
|
7
|
+
component: GridLayout,
|
|
8
|
+
argTypes: {
|
|
9
|
+
cardComponent: { control: false, description: 'The component to render in the grid (e.g., TournamentCard, FencerCard)' },
|
|
10
|
+
items: { control: 'object', description: 'Array of items passed as props to the component' },
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
// Mock Data for Tournaments
|
|
15
|
+
const mockTournaments = [
|
|
16
|
+
{
|
|
17
|
+
image: 'https://meyersquared.com/images/Club1.jpg',
|
|
18
|
+
title: 'Catnip Cutlass',
|
|
19
|
+
location: 'Held at: Catnasioum Complex',
|
|
20
|
+
numberOfFencers: 120,
|
|
21
|
+
startDate: 'Jan 1, 2024',
|
|
22
|
+
endDate: 'Jan 3, 2024',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
image: 'https://meyersquared.com/images/Club2.jpg',
|
|
26
|
+
title: 'Regional Qualifiers',
|
|
27
|
+
location: 'Los Angeles, CA',
|
|
28
|
+
numberOfFencers: 80,
|
|
29
|
+
startDate: 'Feb 10, 2024',
|
|
30
|
+
endDate: 'Feb 12, 2024',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
image: 'https://meyersquared.com/images/Club9.png',
|
|
34
|
+
title: 'Open Tournament',
|
|
35
|
+
location: 'Chicago, IL',
|
|
36
|
+
numberOfFencers: 150,
|
|
37
|
+
startDate: 'Mar 5, 2024',
|
|
38
|
+
endDate: 'Mar 7, 2024',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
image: 'https://meyersquared.com/images/Club4.jpg',
|
|
42
|
+
title: 'Fencing Championship',
|
|
43
|
+
location: 'Miami, FL',
|
|
44
|
+
numberOfFencers: 200,
|
|
45
|
+
startDate: 'Apr 15, 2024',
|
|
46
|
+
endDate: 'Apr 18, 2024',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
image: 'https://meyersquared.com/images/Club8.png',
|
|
50
|
+
title: 'State Finals',
|
|
51
|
+
location: 'Houston, TX',
|
|
52
|
+
numberOfFencers: 95,
|
|
53
|
+
startDate: 'May 1, 2024',
|
|
54
|
+
endDate: 'May 3, 2024',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
image: 'https://meyersquared.com/images/Club7.png',
|
|
58
|
+
title: 'International Cup',
|
|
59
|
+
location: 'San Francisco, CA',
|
|
60
|
+
numberOfFencers: 250,
|
|
61
|
+
startDate: 'Jun 20, 2024',
|
|
62
|
+
endDate: 'Jun 22, 2024',
|
|
63
|
+
},
|
|
64
|
+
];
|
|
65
|
+
|
|
66
|
+
// Mock Data for Fencers
|
|
67
|
+
const mockFencers = [
|
|
68
|
+
{
|
|
69
|
+
portrait: 'https://via.placeholder.com/150',
|
|
70
|
+
displayName: 'John Doe',
|
|
71
|
+
clubName: 'Awesome Fencing Club',
|
|
72
|
+
m2Rating: 1250,
|
|
73
|
+
hrRating: 1100,
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
portrait: 'https://via.placeholder.com/150',
|
|
77
|
+
displayName: 'Jane Smith',
|
|
78
|
+
clubName: 'Elite Fencing Academy',
|
|
79
|
+
m2Rating: 1350,
|
|
80
|
+
hrRating: 1200,
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
portrait: 'https://via.placeholder.com/150',
|
|
84
|
+
displayName: 'Sam Johnson',
|
|
85
|
+
clubName: 'Fencing United',
|
|
86
|
+
m2Rating: 1150,
|
|
87
|
+
hrRating: 1050,
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
portrait: 'https://via.placeholder.com/150',
|
|
91
|
+
displayName: 'Alice Brown',
|
|
92
|
+
clubName: 'Warriors of Steel',
|
|
93
|
+
m2Rating: 1300,
|
|
94
|
+
hrRating: 1180,
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
portrait: 'https://via.placeholder.com/150',
|
|
98
|
+
displayName: 'Bob Davis',
|
|
99
|
+
clubName: 'Iron Swordsmen',
|
|
100
|
+
m2Rating: 1100,
|
|
101
|
+
hrRating: 980,
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
portrait: 'https://via.placeholder.com/150',
|
|
105
|
+
displayName: 'Emily Wilson',
|
|
106
|
+
clubName: 'Dragon Blades',
|
|
107
|
+
m2Rating: 1400,
|
|
108
|
+
hrRating: 1250,
|
|
109
|
+
},
|
|
110
|
+
];
|
|
111
|
+
|
|
112
|
+
// Template for Tournament Grid
|
|
113
|
+
const Template = (args) => ({
|
|
114
|
+
components: { GridLayout, TournamentCard },
|
|
115
|
+
setup() {
|
|
116
|
+
return { args };
|
|
117
|
+
},
|
|
118
|
+
template: '<GridLayout v-bind="args" />',
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
// Template for Fencer Grid
|
|
122
|
+
const FencerTemplate = (args) => ({
|
|
123
|
+
components: { GridLayout, FencerCard },
|
|
124
|
+
setup() {
|
|
125
|
+
return { args };
|
|
126
|
+
},
|
|
127
|
+
template: '<GridLayout v-bind="args" />',
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
// Default Story for Tournament Grid
|
|
131
|
+
export const Default = Template.bind({});
|
|
132
|
+
Default.args = {
|
|
133
|
+
title: 'Tournaments',
|
|
134
|
+
moreButtonLabel: 'See All Tournaments',
|
|
135
|
+
maxColumns: 3,
|
|
136
|
+
cardComponent: TournamentCard,
|
|
137
|
+
items: mockTournaments,
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
// New Story for Fencer Grid
|
|
141
|
+
export const FencerGrid = FencerTemplate.bind({});
|
|
142
|
+
FencerGrid.args = {
|
|
143
|
+
title: 'Fencers',
|
|
144
|
+
moreButtonLabel: 'See All Fencers',
|
|
145
|
+
maxColumns: 5,
|
|
146
|
+
cardComponent: FencerCard,
|
|
147
|
+
items: mockFencers,
|
|
148
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section class="max-w-[1200px] mx-auto ">
|
|
3
|
+
<div class="w-full flex justify-center py-4 md:pb-10 md:pt-14">
|
|
4
|
+
<BaseText color="primary" size="2xl" tag="h3" weight="bold">{{title}}</BaseText>
|
|
5
|
+
</div>
|
|
6
|
+
<div :class="gridClasses">
|
|
7
|
+
<component
|
|
8
|
+
v-for="(item, index) in items"
|
|
9
|
+
:is="cardComponent"
|
|
10
|
+
:key="index"
|
|
11
|
+
:data="item"
|
|
12
|
+
:index="index"
|
|
13
|
+
/>
|
|
14
|
+
</div>
|
|
15
|
+
</section>
|
|
16
|
+
<div class="w-full flex justify-center pb-10 pt-10 md:pt-14">
|
|
17
|
+
<BaseButton
|
|
18
|
+
backgroundColor="secondary"
|
|
19
|
+
border="primary"
|
|
20
|
+
size="xs"
|
|
21
|
+
color="primary"
|
|
22
|
+
hoverColor="accent"
|
|
23
|
+
:label="moreButtonLabel"
|
|
24
|
+
/>
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<script>
|
|
29
|
+
import BaseText from "../../Atoms/BaseText/BaseText.vue";
|
|
30
|
+
import BaseButton from "../../Atoms/BaseButton/BaseButton.vue";
|
|
31
|
+
|
|
32
|
+
export default {
|
|
33
|
+
name: 'GridLayout',
|
|
34
|
+
components: {
|
|
35
|
+
BaseButton,
|
|
36
|
+
BaseText,
|
|
37
|
+
},
|
|
38
|
+
props: {
|
|
39
|
+
title: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: 'Section Title',
|
|
42
|
+
},
|
|
43
|
+
moreButtonLabel: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: 'See More',
|
|
46
|
+
},
|
|
47
|
+
cardComponent: {
|
|
48
|
+
type: [Object, String],
|
|
49
|
+
required: true,
|
|
50
|
+
},
|
|
51
|
+
items: {
|
|
52
|
+
type: Array,
|
|
53
|
+
required: true,
|
|
54
|
+
default: () => [],
|
|
55
|
+
},
|
|
56
|
+
maxColumns: {
|
|
57
|
+
type: Number,
|
|
58
|
+
default: 3,
|
|
59
|
+
},
|
|
60
|
+
mobileHorizontal: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: false,
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
computed: {
|
|
66
|
+
gridClasses() {
|
|
67
|
+
let baseClasses = "md:grid md:gap-x-6 md:gap-y-4";
|
|
68
|
+
if (this.mobileHorizontal) {
|
|
69
|
+
baseClasses = `${baseClasses} flex overflow-x-auto`;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
let columnClasses;
|
|
73
|
+
|
|
74
|
+
switch (this.maxColumns) {
|
|
75
|
+
case 1:
|
|
76
|
+
columnClasses = "grid-cols-1";
|
|
77
|
+
break;
|
|
78
|
+
case 2:
|
|
79
|
+
columnClasses = "grid-cols-1 md:grid-cols-2";
|
|
80
|
+
break;
|
|
81
|
+
case 3:
|
|
82
|
+
columnClasses = "grid-cols-1 md:grid-cols-2 lg:grid-cols-3";
|
|
83
|
+
break;
|
|
84
|
+
case 4:
|
|
85
|
+
columnClasses = "grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4";
|
|
86
|
+
break;
|
|
87
|
+
case 5:
|
|
88
|
+
columnClasses = "grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5";
|
|
89
|
+
break;
|
|
90
|
+
default:
|
|
91
|
+
columnClasses = "grid-cols-1 md:grid-cols-2 lg:grid-cols-3";
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return `${baseClasses} ${columnClasses}`;
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
</script>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<header class="border-b border-lineGrey w-full bg-primary m-0">
|
|
3
3
|
<section class="w-full hidden md:flex ">
|
|
4
|
-
<div class="flex items-center justify-center
|
|
4
|
+
<div class="w-[150px] h-[150px] bg-primary flex-shrink-0 flex items-center justify-center">
|
|
5
5
|
<img :src="logo" alt="Logo" class="h-14 w-18 bg-accent" />
|
|
6
6
|
</div>
|
|
7
7
|
|
|
@@ -16,8 +16,7 @@
|
|
|
16
16
|
<BaseText color="secondary" size="md" tag="p" weight="normal" class="border-b-2 border-primary hover:border-accent pb-2 duration-300 ease-in-out">Contact</BaseText>
|
|
17
17
|
</nav>
|
|
18
18
|
</section>
|
|
19
|
-
|
|
20
|
-
<div class="flex items-center justify-center w-36 h-36">
|
|
19
|
+
<div class="w-[150px] h-[150px] bg-primary flex-shrink-0 flex items-center justify-center">
|
|
21
20
|
<BaseButton
|
|
22
21
|
backgroundColor="primary"
|
|
23
22
|
border="secondary"
|
|
@@ -30,9 +29,9 @@
|
|
|
30
29
|
|
|
31
30
|
<!-- mobile header -->
|
|
32
31
|
<section class="w-full flex md:hidden">
|
|
33
|
-
<div class="m-
|
|
34
|
-
<img :src="logo" alt="Logo" class="h-
|
|
35
|
-
<Icon icon="fa-bars" color="secondary" size="xl" class="
|
|
32
|
+
<div class="m-2 flex justify-between w-full">
|
|
33
|
+
<img :src="logo" alt="Logo" class="h-6 w-9" />
|
|
34
|
+
<Icon icon="fa-bars" color="secondary" size="xl" class="" @click="onSearch" />
|
|
36
35
|
</div>
|
|
37
36
|
</section>
|
|
38
37
|
</header>
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<section class="relative w-full h-3/4 flex justify-center bg-primary m-0">
|
|
3
|
-
<!-- Spacer -->
|
|
4
|
-
<div class="hidden md:block w-
|
|
2
|
+
<section class="relative w-full h-3/4 flex justify-center bg-primary m-0" :style="backgroundStyle">
|
|
3
|
+
<!-- Spacer (Left) -->
|
|
4
|
+
<div class="hidden md:block w-[150px] bg-primary border-b border-lineGrey flex-shrink-0"></div>
|
|
5
5
|
|
|
6
|
-
<!--
|
|
7
|
-
<div class="relative w-full border-b border-l border-r border-lineGrey">
|
|
8
|
-
|
|
6
|
+
<!-- Center Content -->
|
|
7
|
+
<div class="relative w-full md:border-b md:border-l md:border-r border-lineGrey">
|
|
8
|
+
<!-- Non-Mobile Image -->
|
|
9
|
+
<img v-if="!isMobile" :src="imageSrc" alt="Hero Image" class="w-full h-full object-cover" />
|
|
9
10
|
|
|
10
11
|
<!-- Text Overlay for Desktop -->
|
|
11
12
|
<section class="hidden md:flex absolute inset-0 items-center justify-start px-8">
|
|
@@ -20,32 +21,33 @@
|
|
|
20
21
|
/>
|
|
21
22
|
</div>
|
|
22
23
|
</section>
|
|
24
|
+
|
|
25
|
+
<!-- Mobile Overlay -->
|
|
26
|
+
<div v-if="isMobile" class="flex justify-center text-left w-full px-6 py-8">
|
|
27
|
+
<div class="w-full">
|
|
28
|
+
<BaseText color="secondary" tag="h1" size="xl" weight="bold" class="mb-2 w-48">{{ title }}</BaseText>
|
|
29
|
+
<BaseText color="secondary" tag="p" size="xs" weight="normal" class="mb-6 w-48">{{ description }}</BaseText>
|
|
30
|
+
<BaseButton
|
|
31
|
+
:label="buttonLabel"
|
|
32
|
+
size="xs"
|
|
33
|
+
color="secondary"
|
|
34
|
+
border="gradient1"
|
|
35
|
+
class="w-1/2 m-auto"
|
|
36
|
+
@click="onClick"
|
|
37
|
+
/>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
23
40
|
</div>
|
|
24
41
|
|
|
25
|
-
<!-- Spacer -->
|
|
26
|
-
<div class="hidden md:block w-
|
|
42
|
+
<!-- Spacer (Right) -->
|
|
43
|
+
<div class="hidden md:block w-[150px] bg-primary border-b border-lineGrey flex-shrink-0"></div>
|
|
27
44
|
</section>
|
|
28
45
|
|
|
29
46
|
<!-- Desktop Footer Border Section -->
|
|
30
47
|
<section class="hidden md:flex border-t border-lineGrey w-full bg-primary">
|
|
31
|
-
<div class="
|
|
48
|
+
<div class="w-[150px] bg-primary border-b border-lineGrey flex-shrink-0"></div>
|
|
32
49
|
<div class="relative w-full border-b border-l border-r border-lineGrey h-36"></div>
|
|
33
|
-
<div class="
|
|
34
|
-
</section>
|
|
35
|
-
|
|
36
|
-
<!-- Mobile Overlay -->
|
|
37
|
-
<section class="flex justify-center md:hidden text-left bg-primary w-full">
|
|
38
|
-
<div class="w-full px-6 py-8 text-center">
|
|
39
|
-
<BaseText color="secondary" tag="h1" size="2xl" weight="bold" class="mb-2">{{ title }}</BaseText>
|
|
40
|
-
<BaseText color="secondary" tag="p" size="sm" weight="normal" class="mb-6">{{ description }}</BaseText>
|
|
41
|
-
<BaseButton
|
|
42
|
-
:label="buttonLabel"
|
|
43
|
-
color="secondary"
|
|
44
|
-
border="gradient1"
|
|
45
|
-
class="w-1/2 m-auto"
|
|
46
|
-
@click="onClick"
|
|
47
|
-
/>
|
|
48
|
-
</div>
|
|
50
|
+
<div class="w-[150px] bg-primary border-b border-lineGrey flex-shrink-0"></div>
|
|
49
51
|
</section>
|
|
50
52
|
</template>
|
|
51
53
|
|
|
@@ -77,7 +79,32 @@ export default {
|
|
|
77
79
|
required: true,
|
|
78
80
|
},
|
|
79
81
|
},
|
|
82
|
+
data() {
|
|
83
|
+
return {
|
|
84
|
+
isMobile: false
|
|
85
|
+
};
|
|
86
|
+
},
|
|
87
|
+
computed: {
|
|
88
|
+
backgroundStyle() {
|
|
89
|
+
return {
|
|
90
|
+
backgroundImage: `url(${this.imageSrc})`,
|
|
91
|
+
backgroundSize: 'cover',
|
|
92
|
+
backgroundPosition: 'center',
|
|
93
|
+
backgroundRepeat: 'no-repeat',
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
mounted() {
|
|
98
|
+
this.checkScreenSize();
|
|
99
|
+
window.addEventListener('resize', this.checkScreenSize);
|
|
100
|
+
},
|
|
101
|
+
beforeDestroy() {
|
|
102
|
+
window.removeEventListener('resize', this.checkScreenSize);
|
|
103
|
+
},
|
|
80
104
|
methods: {
|
|
105
|
+
checkScreenSize() {
|
|
106
|
+
this.isMobile = window.innerWidth < 768;
|
|
107
|
+
},
|
|
81
108
|
onClick() {
|
|
82
109
|
this.$emit('button-click');
|
|
83
110
|
},
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import DoubleButtonBanner from './DoubleButtonBanner.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Organisms/SectionBanner/DoubleButtonBanner',
|
|
5
|
+
component: DoubleButtonBanner,
|
|
6
|
+
argTypes: {
|
|
7
|
+
imageSrc: { control: 'text', description: 'The image displayed in the hero banner' },
|
|
8
|
+
title: { control: 'text', description: 'Main title text' },
|
|
9
|
+
buttonLabelOne: { control: 'text', description: 'Label for the button' },
|
|
10
|
+
'button-click': { action: 'button-click' },
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const Template = (args) => ({
|
|
15
|
+
components: { DoubleButtonBanner },
|
|
16
|
+
setup() {
|
|
17
|
+
return { args };
|
|
18
|
+
},
|
|
19
|
+
template: '<DoubleButtonBanner v-bind="args" @button-click="args[\'button-click\']" />',
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export const DefaultHeroBanner = Template.bind({});
|
|
23
|
+
DefaultHeroBanner.args = {
|
|
24
|
+
imageSrc: 'https://via.placeholder.com/1920x1080',
|
|
25
|
+
title: 'How Does Meyer Squared Work?',
|
|
26
|
+
buttonLabelOne: 'Run a Tournament',
|
|
27
|
+
buttonLabelTwo: 'Submit Results',
|
|
28
|
+
};
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section class="max-w-[1200px] mx-auto ">
|
|
3
|
+
<section class="hidden md:flex border-t border-lineGrey w-full bg-primary">
|
|
4
|
+
<div class="w-[150px] h-[150px] bg-primary border-b border-lineGrey flex-shrink-0"></div>
|
|
5
|
+
<div class="flex-grow h-[150px] border-b border-l border-r border-lineGrey"></div>
|
|
6
|
+
<div class="w-[150px] h-[150px] bg-primary border-b border-lineGrey flex-shrink-0"></div>
|
|
7
|
+
</section>
|
|
8
|
+
|
|
9
|
+
<section class="relative w-full h-3/4 flex justify-center bg-primary m-0">
|
|
10
|
+
<!-- Spacer -->
|
|
11
|
+
<div class="w-[150px] bg-primary border-b border-lineGrey flex-shrink-0"></div>
|
|
12
|
+
|
|
13
|
+
<!-- Image -->
|
|
14
|
+
<div class="relative w-full border-b border-l border-r border-lineGrey">
|
|
15
|
+
<section class="hidden md:flex h-80 justify-between items-center p-14">
|
|
16
|
+
<div class="text-left text-white max-w-lg w-96">
|
|
17
|
+
<BaseText color="secondary" tag="h1" size="5xl" weight="semibold" class="mb-4">{{ title }}</BaseText>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="flex flex-col w-1/3 align-right">
|
|
20
|
+
<BaseButton
|
|
21
|
+
:label="buttonLabelOne"
|
|
22
|
+
size="xs"
|
|
23
|
+
color="secondary"
|
|
24
|
+
border="gradient1"
|
|
25
|
+
weight="normal"
|
|
26
|
+
align="between"
|
|
27
|
+
class="mb-4 w-52 h-16 pl-8"
|
|
28
|
+
iconName="fa-arrow-right-long"
|
|
29
|
+
iconColor="secondary"
|
|
30
|
+
iconSize="lg"
|
|
31
|
+
iconType="fa-thin"
|
|
32
|
+
@click="onClickOne"
|
|
33
|
+
/>
|
|
34
|
+
<BaseButton
|
|
35
|
+
:label="buttonLabelTwo"
|
|
36
|
+
size="xs"
|
|
37
|
+
color="secondary"
|
|
38
|
+
border="gradient2"
|
|
39
|
+
weight="normal"
|
|
40
|
+
class="w-52 h-16 pl-8"
|
|
41
|
+
iconName="fa-arrow-right-long"
|
|
42
|
+
iconColor="secondary"
|
|
43
|
+
iconSize="lg"
|
|
44
|
+
iconType="fa-thin"
|
|
45
|
+
align="between"
|
|
46
|
+
@click="onClickOne"
|
|
47
|
+
/>
|
|
48
|
+
</div>
|
|
49
|
+
</section>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
<!-- Spacer -->
|
|
53
|
+
<div class="w-[150px] bg-primary border-b border-lineGrey flex-shrink-0"></div>
|
|
54
|
+
</section>
|
|
55
|
+
|
|
56
|
+
<!-- Desktop Footer Border Section -->
|
|
57
|
+
<section class="hidden md:flex border-t border-lineGrey w-full bg-primary">
|
|
58
|
+
<div class="w-[150px] h-[150px] bg-primary border-b border-lineGrey flex-shrink-0"></div>
|
|
59
|
+
<div class="flex-grow h-[150px] border-b border-l border-r border-lineGrey"></div>
|
|
60
|
+
<div class="w-[150px] h-[150px] bg-primary border-b border-lineGrey flex-shrink-0"></div>
|
|
61
|
+
</section>
|
|
62
|
+
|
|
63
|
+
<!-- Mobile Overlay -->
|
|
64
|
+
<section class="flex justify-center md:hidden text-left bg-primary w-full">
|
|
65
|
+
<div class="w-full px-6 py-8 text-center">
|
|
66
|
+
<BaseText color="secondary" tag="h1" size="2xl" weight="bold" class="mb-2">{{ title }}</BaseText>
|
|
67
|
+
<BaseText color="secondary" tag="p" size="sm" weight="normal" class="mb-6">{{ description }}</BaseText>
|
|
68
|
+
<BaseButton
|
|
69
|
+
:label="buttonLabel"
|
|
70
|
+
size="xs"
|
|
71
|
+
color="secondary"
|
|
72
|
+
border="gradient1"
|
|
73
|
+
class="w-1/2 m-auto"
|
|
74
|
+
@click="onClick"
|
|
75
|
+
/>
|
|
76
|
+
</div>
|
|
77
|
+
</section>
|
|
78
|
+
</section>
|
|
79
|
+
</template>
|
|
80
|
+
|
|
81
|
+
<script>
|
|
82
|
+
import BaseButton from '../../../Atoms/BaseButton/BaseButton.vue';
|
|
83
|
+
import BaseText from '../../../Atoms/BaseText/BaseText.vue';
|
|
84
|
+
|
|
85
|
+
export default {
|
|
86
|
+
name: 'DoubleButtonBanner',
|
|
87
|
+
components: {
|
|
88
|
+
BaseText,
|
|
89
|
+
BaseButton,
|
|
90
|
+
},
|
|
91
|
+
props: {
|
|
92
|
+
imageSrc: {
|
|
93
|
+
type: String,
|
|
94
|
+
required: true,
|
|
95
|
+
},
|
|
96
|
+
title: {
|
|
97
|
+
type: String,
|
|
98
|
+
required: true,
|
|
99
|
+
},
|
|
100
|
+
buttonLabelOne: {
|
|
101
|
+
type: String,
|
|
102
|
+
required: true,
|
|
103
|
+
},
|
|
104
|
+
buttonLabelTwo: {
|
|
105
|
+
type: String,
|
|
106
|
+
required: true,
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
methods: {
|
|
110
|
+
onClickOne() {
|
|
111
|
+
this.$emit('button-click-one');
|
|
112
|
+
},
|
|
113
|
+
onClickTwo() {
|
|
114
|
+
this.$emit('button-click-one');
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
</script>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import SingleButtonBanner from './SingleButtonBanner.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Organisms/SectionBanner/SingleButtonBanner',
|
|
5
|
+
component: SingleButtonBanner,
|
|
6
|
+
argTypes: {
|
|
7
|
+
buttonClick: { action: 'button-click' },
|
|
8
|
+
imageUrl: { control: 'text', description: 'Background image URL' },
|
|
9
|
+
description: { control: 'text', description: 'Overlay text' },
|
|
10
|
+
buttonLabel: { control: 'text', description: 'Label for the button' },
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const Template = (args) => ({
|
|
15
|
+
components: { SingleButtonBanner },
|
|
16
|
+
setup() {
|
|
17
|
+
return { args };
|
|
18
|
+
},
|
|
19
|
+
template: '<SingleButtonBanner v-bind="args" @button-click="args.buttonClick" />',
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export const Default = Template.bind({});
|
|
23
|
+
Default.args = {
|
|
24
|
+
imageUrl: 'https://via.placeholder.com/1200x400',
|
|
25
|
+
description: 'Look for a Club? <br> We can help.',
|
|
26
|
+
buttonLabel: 'Learn More',
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
export const SecondExample = Template.bind({});
|
|
31
|
+
SecondExample.args = {
|
|
32
|
+
imageUrl: 'https://via.placeholder.com/1200x400',
|
|
33
|
+
description: 'Banner Here',
|
|
34
|
+
buttonLabel: 'Learn More',
|
|
35
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section class="relative bg-cover bg-center h-80 max-w-[1200px] mx-auto rounded-lg overflow-hidden mb-10" :style="{ backgroundImage: 'url(' + imageUrl + ')' }">
|
|
3
|
+
<div class="flex flex-col justify-center items-center md:items-start h-full w-full text-center md:text-left px-6 md:px-20">
|
|
4
|
+
<BaseText color="secondary" tag="h3" size="5xl" weight="normal" class="mb-8" v-html="description" />
|
|
5
|
+
<BaseButton
|
|
6
|
+
:label="buttonLabel"
|
|
7
|
+
size="xs"
|
|
8
|
+
color="secondary"
|
|
9
|
+
border="gradient1"
|
|
10
|
+
@click="onClick"
|
|
11
|
+
class="w-40"
|
|
12
|
+
/>
|
|
13
|
+
</div>
|
|
14
|
+
</section>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
import BaseText from '../../../Atoms/BaseText/BaseText.vue';
|
|
19
|
+
import BaseButton from '../../../Atoms/BaseButton/BaseButton.vue';
|
|
20
|
+
|
|
21
|
+
export default {
|
|
22
|
+
name: 'SingleButtonBanner',
|
|
23
|
+
components: {
|
|
24
|
+
BaseText,
|
|
25
|
+
BaseButton,
|
|
26
|
+
},
|
|
27
|
+
props: {
|
|
28
|
+
imageUrl: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: 'https://via.placeholder.com/1200x400', // Default background image
|
|
31
|
+
},
|
|
32
|
+
description: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: 'Look for a Club? We can help.',
|
|
35
|
+
},
|
|
36
|
+
buttonLabel: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: 'Learn More',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
methods: {
|
|
42
|
+
onClick() {
|
|
43
|
+
this.$emit('button-click');
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
</script>
|
|
48
|
+
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import TestLayoutPage from './TestPage.vue';
|
|
2
|
-
|
|
2
|
+
import mockTournaments from "../../../mocks/getTournamentsMock.js";
|
|
3
|
+
import mockTopFencers from "../../../mocks/getTopFencers.js";
|
|
4
|
+
import mockArticles from "../../../mocks/getArticles.js";
|
|
3
5
|
export default {
|
|
4
6
|
title: 'Templates/TestLayoutPage',
|
|
5
7
|
component: TestLayoutPage,
|
|
@@ -18,5 +20,8 @@ export const Default = {
|
|
|
18
20
|
description: 'Find tournaments, explore clubs, and track your progress.',
|
|
19
21
|
buttonLabel: 'Find Out More',
|
|
20
22
|
imageSrc: 'https://meyersquared.com/images/Banner2.png',
|
|
21
|
-
|
|
23
|
+
tournaments: mockTournaments,
|
|
24
|
+
topFencers: mockTopFencers,
|
|
25
|
+
articles: mockArticles,
|
|
26
|
+
},
|
|
22
27
|
};
|