@dcrackel/meyersquaredui 1.0.42 → 1.0.44
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 +634 -515
- package/dist/meyersquaredui.umd.js +1 -1
- package/package.json +4 -3
- package/src/index.js +1 -1
- package/src/mocks/getAllClubs.js +106 -0
- package/src/mocks/getClubById.js +130 -0
- package/src/mocks/getFencersByWeapon.js +2167 -0
- package/src/mocks/getTouranmentDetailsMock.js +92 -0
- package/src/stories/Atoms/BaseButton/BaseButton.vue +5 -3
- package/src/stories/Atoms/BaseText/BaseText.vue +1 -1
- package/src/stories/Atoms/Icon/Icon.vue +4 -2
- package/src/stories/Atoms/InputField/InputField.stories.js +28 -9
- package/src/stories/Atoms/InputField/InputField.vue +20 -2
- package/src/stories/Molecules/Calendar/Calendar.stories.js +39 -0
- package/src/stories/Molecules/Calendar/Calendar.vue +110 -0
- package/src/stories/Molecules/DropDowns/BasicDropDown.stories.js +31 -0
- package/src/stories/Molecules/DropDowns/BasicDropDown.vue +78 -0
- package/src/stories/Molecules/MapBox/MapBox.stories.js +30 -0
- package/src/stories/Molecules/MapBox/MapBox.vue +67 -0
- package/src/stories/Molecules/SearchBox/SearchBox.vue +2 -1
- package/src/stories/Molecules/SearchBox/Searchbox.stories.js +1 -1
- package/src/stories/Organisms/Cards/ArticleCard/ArticleCard.vue +8 -3
- package/src/stories/Organisms/Cards/ClubListCard/CLubListCard.stories.js +31 -0
- package/src/stories/Organisms/Cards/ClubListCard/ClubListCard.vue +72 -0
- package/src/stories/Organisms/Cards/ClubMember/ClubMember.stories.js +40 -0
- package/src/stories/Organisms/Cards/ClubMember/ClubMember.vue +56 -0
- package/src/stories/Organisms/Cards/EventListCard/EventListCard.stories.js +38 -0
- package/src/stories/Organisms/Cards/EventListCard/EventListCard.vue +64 -0
- package/src/stories/Organisms/Cards/FencerCard/FencerCard.vue +9 -10
- package/src/stories/Organisms/Cards/FencerListCard/FencerListCard.stories.js +30 -0
- package/src/stories/Organisms/Cards/FencerListCard/FencerListCard.vue +86 -0
- package/src/stories/Organisms/Cards/PhotoCard/PhotoCard.stories.js +28 -0
- package/src/stories/Organisms/Cards/PhotoCard/PhotoCard.vue +18 -0
- package/src/stories/Organisms/Cards/SocialMediaLinkCard/SocialMediaLinkCard.stories.js +40 -0
- package/src/stories/Organisms/Cards/SocialMediaLinkCard/SocialMediaLinkCard.vue +54 -0
- package/src/stories/Organisms/Cards/TournamentCard/TournamentCard.stories.js +1 -1
- package/src/stories/Organisms/Cards/TournamentCard/TournamentCard.vue +9 -1
- package/src/stories/Organisms/Cards/TournamentDetails/TournamentDetails.stories.js +35 -0
- package/src/stories/Organisms/Cards/TournamentDetails/TournamentDetails.vue +59 -0
- package/src/stories/Organisms/Cards/TournamentListCard/TournamentListCard.stories.js +26 -0
- package/src/stories/Organisms/Cards/TournamentListCard/TournamentListCard.vue +103 -0
- package/src/stories/Organisms/Column/HostColumn.stories.js +39 -0
- package/src/stories/Organisms/Column/HostColumn.vue +105 -0
- package/src/stories/Organisms/GridLayout/GridLayout.vue +36 -6
- package/src/stories/Organisms/Headers/ClubHeader/ClubHeader.stories.js +21 -0
- package/src/stories/Organisms/Headers/ClubHeader/ClubHeader.vue +58 -0
- package/src/stories/Organisms/Headers/LeaderboardHeader/LeaderboardHeader.stories.js +29 -0
- package/src/stories/Organisms/Headers/LeaderboardHeader/LeaderboardHeader.vue +59 -0
- package/src/stories/Organisms/Headers/{Header.stories.js → PageHeader/PageHeader.stories.js} +2 -2
- package/src/stories/Organisms/Headers/PageHeader/PageHeader.vue +101 -0
- package/src/stories/Organisms/Headers/TournamentHeader/TournamentHeader.stories.js +34 -0
- package/src/stories/Organisms/Headers/TournamentHeader/TournamentHeader.vue +73 -0
- package/src/stories/Organisms/HeroBanners/HomePage/HeroBanner.stories.js +3 -3
- package/src/stories/Organisms/HeroBanners/HomePage/HeroBanner.vue +1 -1
- package/src/stories/Organisms/HeroBanners/TournamentDetails/TournamentDetailsBanner.stories.js +39 -0
- package/src/stories/Organisms/HeroBanners/TournamentDetails/TournamentDetailsBanner.vue +129 -0
- package/src/stories/Organisms/HeroBanners/Tournaments/TournamentBanner.stories.js +25 -0
- package/src/stories/Organisms/HeroBanners/Tournaments/TournamentBanner.vue +79 -0
- package/src/stories/Organisms/SectionBanners/DoubleButtonBanner/DoubleButtonBanner.vue +4 -0
- package/src/stories/Organisms/SectionBanners/SingleButtonBanner/SingleButtonBanner.vue +1 -1
- package/src/stories/Templates/ClubDetailPage/ClubDetailPage.stories.js +43 -0
- package/src/stories/Templates/ClubDetailPage/ClubDetailPage.vue +127 -0
- package/src/stories/Templates/ClubListPage/ClubListPage.stories.js +43 -0
- package/src/stories/Templates/ClubListPage/ClubListPage.vue +84 -0
- package/src/stories/Templates/HomePage/HomePage.stories.js +6 -6
- package/src/stories/Templates/HomePage/HomePage.vue +20 -13
- package/src/stories/Templates/Leaderboard/Leaderboard.stories.js +43 -0
- package/src/stories/Templates/Leaderboard/Leaderboard.vue +93 -0
- package/src/stories/Templates/TournamentDetailPage/TournamentDetail.stories.js +32 -0
- package/src/stories/Templates/TournamentDetailPage/TournamentDetailPage.vue +121 -0
- package/src/stories/Templates/TournamentListPage/TournamentListPage.stories.js +41 -0
- package/src/stories/Templates/TournamentListPage/TournamentListPage.vue +91 -0
- package/src/stories/Organisms/Headers/Header.vue +0 -62
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="m-0 w-full bg-secondary">
|
|
3
|
+
<Header />
|
|
4
|
+
<TournamentBanner :title="title" :description="description" :imageSrc="imageSrc" />
|
|
5
|
+
|
|
6
|
+
<div class="w-full flex justify-center">
|
|
7
|
+
<div class="flex flex-col md:flex-row w-full max-w-7xl mt-16 mb-20">
|
|
8
|
+
|
|
9
|
+
<section class="w-full md:w-2/3 pr-8">
|
|
10
|
+
<div class="mb-16">
|
|
11
|
+
<BaseText size="xl" color="primary" weight="bold" class="mb-10">{{ club.Name }}</BaseText>
|
|
12
|
+
<BaseText size="md" color="primary" weight="normal" v-html="club.Description"></BaseText>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<div class="w-full mb-16">
|
|
16
|
+
<BaseText size="xl" color="primary" weight="bold" class="mb-10">Location</BaseText>
|
|
17
|
+
<Mapbox
|
|
18
|
+
:apiKey="apiKey"
|
|
19
|
+
:center="club.Location"
|
|
20
|
+
:zoom="12"
|
|
21
|
+
:isFullWidth="true"
|
|
22
|
+
/>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<div class="w-full mb-16 hidden md:block">
|
|
26
|
+
<GridLayout
|
|
27
|
+
:cardComponent="PhotoCard"
|
|
28
|
+
:items="club.Images"
|
|
29
|
+
:maxColumns="6"
|
|
30
|
+
:isLoading="clubsIsLoading"
|
|
31
|
+
:mobile-horizontal="true"
|
|
32
|
+
:whiteStyle="false"
|
|
33
|
+
title="Images"
|
|
34
|
+
moreButtonLabel=""
|
|
35
|
+
/>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
<div class="w-full mb-20 hidden md:block">
|
|
39
|
+
<GridLayout
|
|
40
|
+
:cardComponent="ClubMember"
|
|
41
|
+
:items="club.People"
|
|
42
|
+
:maxColumns="6"
|
|
43
|
+
:isLoading="clubsIsLoading"
|
|
44
|
+
:whiteStyle="false"
|
|
45
|
+
title="Club Members"
|
|
46
|
+
moreButtonLabel=""
|
|
47
|
+
/>
|
|
48
|
+
</div>
|
|
49
|
+
</section>
|
|
50
|
+
|
|
51
|
+
<section class="w-full md:w-1/3 mt-8 md:mt-0 flex flex-col justify-start">
|
|
52
|
+
<SocialMediaLinkCard :socialMedia="club.SocialMedia"/>
|
|
53
|
+
</section>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<Footer />
|
|
58
|
+
</div>
|
|
59
|
+
</template>
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
<script>
|
|
63
|
+
import Header from "../../Organisms/Headers/PageHeader/PageHeader.vue";
|
|
64
|
+
import Footer from "../../Organisms/Footer/Footer.vue";
|
|
65
|
+
import TournamentBanner from "../../Organisms/HeroBanners/Tournaments/TournamentBanner.vue";
|
|
66
|
+
import GridLayout from "../../Organisms/GridLayout/GridLayout.vue";
|
|
67
|
+
import ClubMember from "../../Organisms/Cards/ClubMember/ClubMember.vue";
|
|
68
|
+
import PhotoCard from "../../Organisms/Cards/PhotoCard/PhotoCard.vue";
|
|
69
|
+
import BaseText from "../../Atoms/BaseText/BaseText.vue";
|
|
70
|
+
import Mapbox from "../../Molecules/MapBox/MapBox.vue";
|
|
71
|
+
import SocialMediaLinkCard from "../../Organisms/Cards/SocialMediaLinkCard/SocialMediaLinkCard.vue";
|
|
72
|
+
|
|
73
|
+
export default {
|
|
74
|
+
name: 'ClubDetailPage',
|
|
75
|
+
components: {
|
|
76
|
+
SocialMediaLinkCard,
|
|
77
|
+
Mapbox,
|
|
78
|
+
BaseText,
|
|
79
|
+
PhotoCard,
|
|
80
|
+
ClubMember,
|
|
81
|
+
GridLayout,
|
|
82
|
+
Header,
|
|
83
|
+
Footer,
|
|
84
|
+
TournamentBanner
|
|
85
|
+
},
|
|
86
|
+
props: {
|
|
87
|
+
title: {
|
|
88
|
+
type: String,
|
|
89
|
+
default: 'Hero Banner Title'
|
|
90
|
+
},
|
|
91
|
+
description: {
|
|
92
|
+
type: String,
|
|
93
|
+
default: 'This is the description that goes under the hero banner.'
|
|
94
|
+
},
|
|
95
|
+
imageSrc: {
|
|
96
|
+
type: String,
|
|
97
|
+
default: 'https://meyersquared.com/images/Banner2.png'
|
|
98
|
+
},
|
|
99
|
+
club: {
|
|
100
|
+
type: Object,
|
|
101
|
+
default: () => ({})
|
|
102
|
+
},
|
|
103
|
+
clubsIsLoading: {
|
|
104
|
+
type: Boolean,
|
|
105
|
+
default: false
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
computed: {
|
|
109
|
+
PhotoCard() {
|
|
110
|
+
return PhotoCard
|
|
111
|
+
},
|
|
112
|
+
ClubMember() {
|
|
113
|
+
return ClubMember
|
|
114
|
+
},
|
|
115
|
+
ClubListCard() {
|
|
116
|
+
return ClubListCard
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
},
|
|
120
|
+
data() {
|
|
121
|
+
return {
|
|
122
|
+
apiKey: "AIzaSyC5kuJeMLopgjHDqsQPjRZ6Fkg3PFydw9Q"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
</script>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import ClubListPage from './ClubListPage.vue';
|
|
2
|
+
import mockAllClubs from "../../../mocks/getAllClubs.js";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Templates/ClubListPage',
|
|
6
|
+
component: ClubListPage,
|
|
7
|
+
argTypes: {
|
|
8
|
+
title: { control: 'text' },
|
|
9
|
+
description: { control: 'text' },
|
|
10
|
+
imageSrc: { control: 'text' },
|
|
11
|
+
tournaments: { control: 'array' },
|
|
12
|
+
tournamentsIsLoading: { control: 'boolean' },
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const Template = (args) => ({
|
|
17
|
+
components: { ClubListPage },
|
|
18
|
+
setup() {
|
|
19
|
+
return { args };
|
|
20
|
+
},
|
|
21
|
+
template: '<ClubListPage v-bind="args" />',
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export const Default = Template.bind({});
|
|
25
|
+
Default.args = {
|
|
26
|
+
title: 'Local Clubs',
|
|
27
|
+
description: 'Explore clubs near you<br> and join the community!',
|
|
28
|
+
imageSrc: 'https://meyersquared.com/images/banners/largebanner03.jpg',
|
|
29
|
+
clubs: mockAllClubs,
|
|
30
|
+
clubsIsLoading: false,
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const LoadingState = Template.bind({});
|
|
34
|
+
LoadingState.args = {
|
|
35
|
+
...Default.args,
|
|
36
|
+
tournamentsIsLoading: true,
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const NoTournaments = Template.bind({});
|
|
40
|
+
NoTournaments.args = {
|
|
41
|
+
...Default.args,
|
|
42
|
+
tournaments: [],
|
|
43
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="m-0 w-full bg-secondary">
|
|
3
|
+
<Header />
|
|
4
|
+
<TournamentBanner :title="title" :description="description" :imageSrc="imageSrc" />
|
|
5
|
+
<ClubHeader />
|
|
6
|
+
|
|
7
|
+
<div class="w-full flex justify-center">
|
|
8
|
+
<section class="w-full md:w-2/3 mb-20 flex">
|
|
9
|
+
<GridLayout
|
|
10
|
+
:cardComponent="ClubListCard"
|
|
11
|
+
:items="clubs"
|
|
12
|
+
:maxColumns="1"
|
|
13
|
+
:isLoading="clubsIsLoading"
|
|
14
|
+
:whiteStyle="true"
|
|
15
|
+
moreButtonLabel="See All Tournaments"
|
|
16
|
+
title=""
|
|
17
|
+
/>
|
|
18
|
+
</section>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<Footer />
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
<script>
|
|
27
|
+
import TournamentBanner from "../../Organisms/HeroBanners/Tournaments/TournamentBanner.vue";
|
|
28
|
+
import Header from "../../Organisms/Headers/PageHeader/PageHeader.vue";
|
|
29
|
+
import FencerCard from "../../Organisms/Cards/FencerCard/FencerCard.vue";
|
|
30
|
+
import GridLayout from "../../Organisms/GridLayout/GridLayout.vue";
|
|
31
|
+
import Footer from "../../Organisms/Footer/Footer.vue";
|
|
32
|
+
import TournamentHeader from "../../Organisms/Headers/TournamentHeader/TournamentHeader.vue";
|
|
33
|
+
import ClubHeader from "../../Organisms/Headers/ClubHeader/ClubHeader.vue";
|
|
34
|
+
import ClubListCard from "../../Organisms/Cards/ClubListCard/ClubListCard.vue";
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
export default {
|
|
38
|
+
name: 'ClubListPage',
|
|
39
|
+
components: {
|
|
40
|
+
ClubHeader,
|
|
41
|
+
ClubListCard,
|
|
42
|
+
TournamentHeader,
|
|
43
|
+
Footer,
|
|
44
|
+
GridLayout,
|
|
45
|
+
FencerCard,
|
|
46
|
+
Header,
|
|
47
|
+
TournamentBanner,
|
|
48
|
+
},
|
|
49
|
+
props: {
|
|
50
|
+
title: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: 'Hero Banner Title'
|
|
53
|
+
},
|
|
54
|
+
description: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: 'This is the description that goes under the hero banner.'
|
|
57
|
+
},
|
|
58
|
+
imageSrc: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: 'https://meyersquared.com/images/Banner2.png'
|
|
61
|
+
},
|
|
62
|
+
clubs: {
|
|
63
|
+
type: Array,
|
|
64
|
+
default: () => []
|
|
65
|
+
},
|
|
66
|
+
clubsIsLoading: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: false
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
computed: {
|
|
72
|
+
ClubListCard() {
|
|
73
|
+
return ClubListCard
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
},
|
|
77
|
+
data() {
|
|
78
|
+
return {
|
|
79
|
+
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
</script>
|
|
@@ -3,7 +3,7 @@ import mockTournaments from "../../../mocks/getTournamentsMock.js";
|
|
|
3
3
|
import mockTopFencers from "../../../mocks/getTopFencers.js";
|
|
4
4
|
import mockArticles from "../../../mocks/getArticles.js";
|
|
5
5
|
export default {
|
|
6
|
-
title: 'Templates/
|
|
6
|
+
title: 'Templates/HomePageLayout',
|
|
7
7
|
component: HomePage,
|
|
8
8
|
argTypes: {
|
|
9
9
|
'button-click': { action: 'button-click' },
|
|
@@ -16,10 +16,10 @@ export default {
|
|
|
16
16
|
|
|
17
17
|
export const Default = {
|
|
18
18
|
args: {
|
|
19
|
-
title: '
|
|
20
|
-
description: '
|
|
19
|
+
title: 'Find your next HEMA Tournament!',
|
|
20
|
+
description: '',
|
|
21
21
|
buttonLabel: 'Find Out More',
|
|
22
|
-
imageSrc: 'https://meyersquared.com/images/
|
|
22
|
+
imageSrc: 'https://meyersquared.com/images/banners/largebanner01.jpg',
|
|
23
23
|
tournaments: mockTournaments,
|
|
24
24
|
topFencers: mockTopFencers,
|
|
25
25
|
articles: mockArticles,
|
|
@@ -29,9 +29,9 @@ export const Default = {
|
|
|
29
29
|
export const AllLoading = {
|
|
30
30
|
args: {
|
|
31
31
|
title: 'Discover, Compete, Connect',
|
|
32
|
-
description: '
|
|
32
|
+
description: '',
|
|
33
33
|
buttonLabel: 'Find Out More',
|
|
34
|
-
imageSrc: 'https://meyersquared.com/images/
|
|
34
|
+
imageSrc: 'https://meyersquared.com/images/banners/largebanner01.jpg',
|
|
35
35
|
tournaments: mockTournaments,
|
|
36
36
|
topFencers: mockTopFencers,
|
|
37
37
|
articles: mockArticles,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="m-0 w-full bg-secondary">
|
|
3
|
-
<
|
|
3
|
+
<PageHeader @changePage="changePage" />
|
|
4
4
|
<HeroBanner :title="title" :buttonLabel="buttonLabel" :description="description" :imageSrc="imageSrc" />
|
|
5
5
|
<GridLayout
|
|
6
6
|
:cardComponent="TournamentCard"
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<SingleButtonBanner
|
|
14
14
|
buttonLabel="Learn More"
|
|
15
15
|
description="Look for a Club? <br> We can help."
|
|
16
|
-
imageUrl="https://
|
|
16
|
+
imageUrl="https://meyersquared.com/images/banners/largebanner03.jpg"
|
|
17
17
|
/>
|
|
18
18
|
<GridLayout
|
|
19
19
|
:cardComponent="FencerCard"
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
:isLoading="topFencersIsLoading"
|
|
24
24
|
moreButtonLabel="Leaderboards"
|
|
25
25
|
title="Top Fencers"
|
|
26
|
+
@grid-card-click="handleGridCardClick"
|
|
26
27
|
/>
|
|
27
28
|
<DoubleButtonBanner title="How Does Meyer Squared work?" button-label-two="Run a tournament" button-label-one="Submit Results" image-src="" />
|
|
28
29
|
<GridLayout
|
|
@@ -38,10 +39,9 @@
|
|
|
38
39
|
</div>
|
|
39
40
|
</template>
|
|
40
41
|
|
|
41
|
-
|
|
42
42
|
<script>
|
|
43
43
|
import HeroBanner from "../../Organisms/HeroBanners/HomePage/HeroBanner.vue";
|
|
44
|
-
import
|
|
44
|
+
import PageHeader from "../../Organisms/Headers/PageHeader/PageHeader.vue";
|
|
45
45
|
import TournamentCard from "../../Organisms/Cards/TournamentCard/TournamentCard.vue";
|
|
46
46
|
import FencerCard from "../../Organisms/Cards/FencerCard/FencerCard.vue";
|
|
47
47
|
import ArticleCard from "../../Organisms/Cards/ArticleCard/ArticleCard.vue";
|
|
@@ -49,6 +49,7 @@ import GridLayout from "../../Organisms/GridLayout/GridLayout.vue";
|
|
|
49
49
|
import SingleButtonBanner from "../../Organisms/SectionBanners/SingleButtonBanner/SingleButtonBanner.vue";
|
|
50
50
|
import DoubleButtonBanner from "../../Organisms/SectionBanners/DoubleButtonBanner/DoubleButtonBanner.vue";
|
|
51
51
|
import Footer from "../../Organisms/Footer/Footer.vue";
|
|
52
|
+
import { markRaw } from 'vue';
|
|
52
53
|
|
|
53
54
|
export default {
|
|
54
55
|
name: 'HomePage',
|
|
@@ -57,10 +58,9 @@ export default {
|
|
|
57
58
|
DoubleButtonBanner,
|
|
58
59
|
SingleButtonBanner,
|
|
59
60
|
GridLayout,
|
|
60
|
-
TournamentCard,
|
|
61
61
|
ArticleCard,
|
|
62
62
|
FencerCard,
|
|
63
|
-
|
|
63
|
+
PageHeader,
|
|
64
64
|
HeroBanner,
|
|
65
65
|
},
|
|
66
66
|
props: {
|
|
@@ -107,20 +107,27 @@ export default {
|
|
|
107
107
|
},
|
|
108
108
|
computed: {
|
|
109
109
|
ArticleCard() {
|
|
110
|
-
return ArticleCard
|
|
110
|
+
return ArticleCard;
|
|
111
111
|
},
|
|
112
112
|
FencerCard() {
|
|
113
|
-
return FencerCard
|
|
113
|
+
return FencerCard;
|
|
114
114
|
},
|
|
115
|
-
limitedTournaments() {
|
|
115
|
+
limitedTournaments() {
|
|
116
116
|
return this.tournaments.slice(0, 6);
|
|
117
117
|
}
|
|
118
118
|
},
|
|
119
119
|
data() {
|
|
120
120
|
return {
|
|
121
|
-
TournamentCard: TournamentCard
|
|
121
|
+
TournamentCard: markRaw(TournamentCard), // Make TournamentCard raw to avoid reactivity
|
|
122
|
+
};
|
|
123
|
+
},
|
|
124
|
+
methods: {
|
|
125
|
+
handleGridCardClick() {
|
|
126
|
+
console.log('Grid Card Clicked');
|
|
127
|
+
},
|
|
128
|
+
changePage(item) {
|
|
129
|
+
console.log('Change Page', item);
|
|
122
130
|
}
|
|
123
131
|
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
</script>
|
|
132
|
+
};
|
|
133
|
+
</script>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import Leaderboard from './Leaderboard.vue';
|
|
2
|
+
import getFencersByWeapon from "../../../mocks/getFencersByWeapon.js";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Templates/LeaderboardPage',
|
|
6
|
+
component: Leaderboard,
|
|
7
|
+
argTypes: {
|
|
8
|
+
title: { control: 'text' },
|
|
9
|
+
description: { control: 'text' },
|
|
10
|
+
imageSrc: { control: 'text' },
|
|
11
|
+
tournaments: { control: 'array' },
|
|
12
|
+
tournamentsIsLoading: { control: 'boolean' },
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const Template = (args) => ({
|
|
17
|
+
components: { Leaderboard },
|
|
18
|
+
setup() {
|
|
19
|
+
return { args };
|
|
20
|
+
},
|
|
21
|
+
template: '<Leaderboard v-bind="args" />',
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export const Default = Template.bind({});
|
|
25
|
+
Default.args = {
|
|
26
|
+
title: 'Leaderboard',
|
|
27
|
+
description: 'Track Your Progress, Outshine the Competition.',
|
|
28
|
+
imageSrc: 'https://meyersquared.com/images/banners/thinbanner04.jpg',
|
|
29
|
+
fencers: getFencersByWeapon,
|
|
30
|
+
fencersIsLoading: false,
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const LoadingState = Template.bind({});
|
|
34
|
+
LoadingState.args = {
|
|
35
|
+
...Default.args,
|
|
36
|
+
fencersIsLoading: true,
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const NoTournaments = Template.bind({});
|
|
40
|
+
NoTournaments.args = {
|
|
41
|
+
...Default.args,
|
|
42
|
+
tournaments: [],
|
|
43
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="m-0 w-full bg-secondary">
|
|
3
|
+
<Header @search="onSearch"/>
|
|
4
|
+
<TournamentBanner :title="title" :description="description" :imageSrc="imageSrc" />
|
|
5
|
+
<LeaderboardHeader :weapons="['Longsword', 'Rapier', 'Saber', 'Sword & Buckler', 'Dagger']" @weaponSelected="changeLeaderBoarder"/>
|
|
6
|
+
|
|
7
|
+
<div class="w-full flex justify-center">
|
|
8
|
+
<section class="w-full md:w-2/3 mb-20 flex">
|
|
9
|
+
<GridLayout
|
|
10
|
+
:cardComponent="FencerListCard"
|
|
11
|
+
:items="fencers"
|
|
12
|
+
:maxColumns="1"
|
|
13
|
+
:isLoading="fencersIsLoading"
|
|
14
|
+
:whiteStyle="true"
|
|
15
|
+
moreButtonLabel="See All Tournaments"
|
|
16
|
+
:title="selectedWeapon"
|
|
17
|
+
@grid-card-click="handleCardClicked"
|
|
18
|
+
/>
|
|
19
|
+
</section>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<Footer />
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
<script>
|
|
28
|
+
import TournamentBanner from "../../Organisms/HeroBanners/Tournaments/TournamentBanner.vue";
|
|
29
|
+
import Header from "../../Organisms/Headers/PageHeader/PageHeader.vue";
|
|
30
|
+
import Footer from "../../Organisms/Footer/Footer.vue";
|
|
31
|
+
import TournamentHeader from "../../Organisms/Headers/TournamentHeader/TournamentHeader.vue";
|
|
32
|
+
import LeaderboardHeader from "../../Organisms/Headers/LeaderboardHeader/LeaderboardHeader.vue";
|
|
33
|
+
import GridLayout from "../../Organisms/GridLayout/GridLayout.vue";
|
|
34
|
+
import FencerListCard from "../../Organisms/Cards/FencerListCard/FencerListCard.vue";
|
|
35
|
+
|
|
36
|
+
export default {
|
|
37
|
+
name: 'LeaderboardPage',
|
|
38
|
+
components: {
|
|
39
|
+
FencerListCard,
|
|
40
|
+
GridLayout,
|
|
41
|
+
LeaderboardHeader,
|
|
42
|
+
TournamentHeader,
|
|
43
|
+
Footer,
|
|
44
|
+
Header,
|
|
45
|
+
TournamentBanner,
|
|
46
|
+
},
|
|
47
|
+
props: {
|
|
48
|
+
title: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: 'Hero Banner Title'
|
|
51
|
+
},
|
|
52
|
+
description: {
|
|
53
|
+
type: String,
|
|
54
|
+
default: 'This is the description that goes under the hero banner.'
|
|
55
|
+
},
|
|
56
|
+
imageSrc: {
|
|
57
|
+
type: String,
|
|
58
|
+
default: 'https://meyersquared.com/images/Banner2.png'
|
|
59
|
+
},
|
|
60
|
+
fencers: {
|
|
61
|
+
type: Array,
|
|
62
|
+
default: () => []
|
|
63
|
+
},
|
|
64
|
+
fencersIsLoading: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: false
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
computed: {
|
|
70
|
+
FencerListCard() {
|
|
71
|
+
return FencerListCard
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
},
|
|
75
|
+
data() {
|
|
76
|
+
return {
|
|
77
|
+
selectedWeapon: 'Longsword',
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
methods: {
|
|
81
|
+
changeLeaderBoarder(selected) {
|
|
82
|
+
this.selectedWeapon = selected;
|
|
83
|
+
},
|
|
84
|
+
onSearch(searchQuery) {
|
|
85
|
+
console.log('Search Query:', searchQuery);
|
|
86
|
+
},
|
|
87
|
+
handleCardClicked(fencer) {
|
|
88
|
+
console.log('Fencer:', fencer);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
</script>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import HomePage from './TournamentDetailPage.vue';
|
|
2
|
+
import mockTournamentDetails from "../../../mocks/getTouranmentDetailsMock.js";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Templates/TournamentDetailsPage',
|
|
6
|
+
component: HomePage,
|
|
7
|
+
argTypes: {
|
|
8
|
+
'button-click': { action: 'button-click' },
|
|
9
|
+
title: { control: 'text', description: 'Title for the HeroBanner' },
|
|
10
|
+
description: { control: 'text', description: 'Description for the HeroBanner' },
|
|
11
|
+
buttonLabel: { control: 'text', description: 'Button label for the HeroBanner' },
|
|
12
|
+
imageSrc: { control: 'text', description: 'Image source for the HeroBanner' },
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const Default = {
|
|
17
|
+
args: {
|
|
18
|
+
title: mockTournamentDetails.Name,
|
|
19
|
+
imageSrc: 'https://meyersquared.com/images/banners/thinbanner01.jpg',
|
|
20
|
+
tournament: mockTournamentDetails,
|
|
21
|
+
apiKey: 'AIzaSyC5kuJeMLopgjHDqsQPjRZ6Fkg3PFydw9Q',
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const AllLoading = {
|
|
26
|
+
args: {
|
|
27
|
+
title: 'Discover, Compete, Connect',
|
|
28
|
+
imageSrc: 'https://meyersquared.com/images/banners/thinbanner01.jpg',
|
|
29
|
+
tournament: mockTournamentDetails,
|
|
30
|
+
apiKey: 'AIzaSyC5kuJeMLopgjHDqsQPjRZ6Fkg3PFydw9Q',
|
|
31
|
+
},
|
|
32
|
+
};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="m-0 w-full bg-secondary">
|
|
3
|
+
<Header/>
|
|
4
|
+
<TournamentDetailsBanner :title="title"
|
|
5
|
+
:imageSrc="imageSrc"
|
|
6
|
+
:club-logo="tournament.Club.Images[0].URL"
|
|
7
|
+
:hosting-club-name="tournament.Club.Name"
|
|
8
|
+
:tournament-start-date="tournament.StartDate"
|
|
9
|
+
/>
|
|
10
|
+
|
|
11
|
+
<section class="flex flex-col md:flex-row justify-center">
|
|
12
|
+
<section>
|
|
13
|
+
<div class="w-full flex justify-center mt-4 md:mt-12 md:pr-4">
|
|
14
|
+
<TournamentDetails
|
|
15
|
+
:imageSrc="tournament.Images[0].URL"
|
|
16
|
+
:description="tournament.Description"
|
|
17
|
+
/>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="w-full max-w-4xl mx-auto md:p-4">
|
|
20
|
+
<GridLayout
|
|
21
|
+
:cardComponent="EventListCard"
|
|
22
|
+
:items="tournament.Events"
|
|
23
|
+
:maxColumns="1"
|
|
24
|
+
:isLoading="false"
|
|
25
|
+
:whiteStyle="true"
|
|
26
|
+
:title="'Events'"
|
|
27
|
+
/>
|
|
28
|
+
</div>
|
|
29
|
+
<div class="w-full flex justify-center md:mb-20">
|
|
30
|
+
<BaseButton label="Register" backgroundColor="secondary" border="primary" class="w-40 mx-auto mt-10"/>
|
|
31
|
+
</div>
|
|
32
|
+
</section>
|
|
33
|
+
<section class="mt-8 md:mt-16">
|
|
34
|
+
<HostColumn
|
|
35
|
+
:organizerName="tournament.PrimaryContact.DisplayName"
|
|
36
|
+
:organizerPortrait="tournament.PrimaryContact.Images[0].URL"
|
|
37
|
+
:address="tournament.Address"
|
|
38
|
+
:fencersGoing="tournament.TotalParticipants"
|
|
39
|
+
:bookmarksCount="tournament.TotalBookmarks"
|
|
40
|
+
:apiKey="apiKey"
|
|
41
|
+
@rulesClick="onRulesClick"
|
|
42
|
+
/>
|
|
43
|
+
</section>
|
|
44
|
+
</section>
|
|
45
|
+
<Footer/>
|
|
46
|
+
</div>
|
|
47
|
+
</template>
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
<script>
|
|
51
|
+
import TournamentDetailsBanner from "../../Organisms/HeroBanners/TournamentDetails/TournamentDetailsBanner.vue";
|
|
52
|
+
import Header from "../../Organisms/Headers/PageHeader/PageHeader.vue";
|
|
53
|
+
import Footer from "../../Organisms/Footer/Footer.vue";
|
|
54
|
+
import TournamentDetails from "../../Organisms/Cards/TournamentDetails/TournamentDetails.vue";
|
|
55
|
+
import GridLayout from "../../Organisms/GridLayout/GridLayout.vue";
|
|
56
|
+
import EventListCard from "../../Organisms/Cards/EventListCard/EventListCard.vue";
|
|
57
|
+
import BaseText from "../../Atoms/BaseText/BaseText.vue";
|
|
58
|
+
import BaseButton from "../../Atoms/BaseButton/BaseButton.vue";
|
|
59
|
+
import HostColumn from "../../Organisms/Column/HostColumn.vue";
|
|
60
|
+
|
|
61
|
+
export default {
|
|
62
|
+
name: 'TournamentDetailPage',
|
|
63
|
+
components: {
|
|
64
|
+
HostColumn,
|
|
65
|
+
BaseButton,
|
|
66
|
+
BaseText,
|
|
67
|
+
GridLayout,
|
|
68
|
+
TournamentDetails,
|
|
69
|
+
Footer,
|
|
70
|
+
Header,
|
|
71
|
+
TournamentDetailsBanner,
|
|
72
|
+
EventListCard
|
|
73
|
+
},
|
|
74
|
+
props: {
|
|
75
|
+
title: {
|
|
76
|
+
type: String,
|
|
77
|
+
default: 'Hero Banner Title'
|
|
78
|
+
},
|
|
79
|
+
imageSrc: {
|
|
80
|
+
type: String,
|
|
81
|
+
default: 'https://images.squarespace-cdn.com/content/v1/588e439e1b10e309aeed2280/1549377422004-9SSG2INBP1HGR5OK4DIN/FacebookMockup2.png?format=1000w'
|
|
82
|
+
},
|
|
83
|
+
tournament: {
|
|
84
|
+
type: Object,
|
|
85
|
+
required: true,
|
|
86
|
+
},
|
|
87
|
+
tournamentsIsLoading: {
|
|
88
|
+
type: Boolean,
|
|
89
|
+
default: false
|
|
90
|
+
},
|
|
91
|
+
apiKey: {
|
|
92
|
+
type: String,
|
|
93
|
+
required: true
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
computed: {
|
|
97
|
+
EventListCard() {
|
|
98
|
+
return EventListCard
|
|
99
|
+
},
|
|
100
|
+
formattedDate() {
|
|
101
|
+
return new Date().toLocaleDateString(undefined, {
|
|
102
|
+
weekday: 'long',
|
|
103
|
+
month: 'short',
|
|
104
|
+
day: 'numeric',
|
|
105
|
+
});
|
|
106
|
+
},
|
|
107
|
+
limitedTournaments() {
|
|
108
|
+
return this.tournaments;
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
data() {
|
|
112
|
+
return {}
|
|
113
|
+
},
|
|
114
|
+
methods: {
|
|
115
|
+
onRulesClick() {
|
|
116
|
+
this.$emit('rules-click');
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
</script>
|