@dcrackel/meyersquaredui 1.0.43 → 1.0.45
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 +615 -498
- 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 +3 -5
- 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 +7 -2
- 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 +28 -8
- 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 +3 -3
- 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 +21 -14
- 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,101 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<header class="border-b border-lineGrey w-full bg-primary m-0">
|
|
3
|
+
<section class="w-full hidden md:flex ">
|
|
4
|
+
<div class="w-[150px] h-[150px] bg-primary flex-shrink-0 flex items-center justify-center">
|
|
5
|
+
<img :src="logo" alt="Logo" class="h-14 w-18 bg-accent" />
|
|
6
|
+
</div>
|
|
7
|
+
|
|
8
|
+
<section class="flex w-full items-center border-r border-l border-lineGrey">
|
|
9
|
+
<div class="hidden lg:flex w-1/3 pl-20 mb-3">
|
|
10
|
+
<SearchBox class="w-24 md:w-32 lg:w-52 xl:w-64" @search="onSearch" />
|
|
11
|
+
</div>
|
|
12
|
+
<nav class="ml-8 w-2/3 flex justify-around">
|
|
13
|
+
<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">Tournaments</BaseText>
|
|
14
|
+
<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">Clubs</BaseText>
|
|
15
|
+
<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">Leaderboard</BaseText>
|
|
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
|
+
</nav>
|
|
18
|
+
</section>
|
|
19
|
+
<div class="w-[150px] h-[150px] bg-primary flex-shrink-0 flex items-center justify-center">
|
|
20
|
+
<BaseButton
|
|
21
|
+
backgroundColor="primary"
|
|
22
|
+
border="secondary"
|
|
23
|
+
color="secondary"
|
|
24
|
+
label="Login"
|
|
25
|
+
size="xs"
|
|
26
|
+
/>
|
|
27
|
+
</div>
|
|
28
|
+
</section>
|
|
29
|
+
|
|
30
|
+
<!-- mobile header -->
|
|
31
|
+
<section class="w-full flex md:hidden fixed top-0 left-0 z-10 bg-primary">
|
|
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" @click="openMenu($event)" />
|
|
35
|
+
</div>
|
|
36
|
+
</section>
|
|
37
|
+
<div v-if="dropdownOpen" class="fixed right-2 mt-8 w-40 bg-secondary border rounded-lg border-lineGrey shadow-xl z-50" @click.stop>
|
|
38
|
+
<ul>
|
|
39
|
+
<li v-for="item in items"
|
|
40
|
+
:key="item.label"
|
|
41
|
+
@click="selectItem(item)"
|
|
42
|
+
class="px-2 py-2 cursor-pointer hover:bg-hoverColor justify-end flex">
|
|
43
|
+
<BaseText color="primary" size="xs sm" tag="p" weight="normal" class="mt-0.5">{{ item.label }}</BaseText>
|
|
44
|
+
<Icon :icon="item.icon" type="fa-regular" size="sm" color="accent" class="ml-2" />
|
|
45
|
+
</li>
|
|
46
|
+
</ul>
|
|
47
|
+
</div>
|
|
48
|
+
</header>
|
|
49
|
+
</template>
|
|
50
|
+
|
|
51
|
+
<script>
|
|
52
|
+
import logo from '../../../../assets/images/m2.png';
|
|
53
|
+
import SearchBox from '../../../Molecules/SearchBox/SearchBox.vue';
|
|
54
|
+
import BaseText from '../../../Atoms/BaseText/BaseText.vue';
|
|
55
|
+
import Icon from '../../../Atoms/Icon/Icon.vue';
|
|
56
|
+
import BaseButton from '../../../Atoms/BaseButton/BaseButton.vue';
|
|
57
|
+
|
|
58
|
+
export default {
|
|
59
|
+
name: 'PageHeader',
|
|
60
|
+
components: {
|
|
61
|
+
SearchBox,
|
|
62
|
+
BaseText,
|
|
63
|
+
BaseButton,
|
|
64
|
+
Icon
|
|
65
|
+
},
|
|
66
|
+
data() {
|
|
67
|
+
return {
|
|
68
|
+
logo: logo,
|
|
69
|
+
dropdownOpen: false,
|
|
70
|
+
items: [
|
|
71
|
+
{ label: 'Home', icon: 'fa-home' },
|
|
72
|
+
{ label: 'Tournaments', icon: 'fa-trophy' },
|
|
73
|
+
{ label: 'Clubs', icon: 'fa-users' },
|
|
74
|
+
{ label: 'Leaderboard', icon: 'fa-star' }
|
|
75
|
+
]
|
|
76
|
+
};
|
|
77
|
+
},
|
|
78
|
+
methods: {
|
|
79
|
+
onSearch(searchQuery) {
|
|
80
|
+
this.$emit('search', searchQuery);
|
|
81
|
+
},
|
|
82
|
+
openMenu() {
|
|
83
|
+
this.dropdownOpen = true;
|
|
84
|
+
event.stopPropagation();
|
|
85
|
+
},
|
|
86
|
+
selectItem(item) {
|
|
87
|
+
this.dropdownOpen = false;
|
|
88
|
+
this.$emit('changePage', item);
|
|
89
|
+
},
|
|
90
|
+
handleClickOutside() {
|
|
91
|
+
if (this.dropdownOpen) this.dropdownOpen = false;
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
mounted() {
|
|
95
|
+
document.addEventListener('click', this.handleClickOutside);
|
|
96
|
+
},
|
|
97
|
+
beforeUnmount() {
|
|
98
|
+
document.removeEventListener('click', this.handleClickOutside);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
</script>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import LeaderboardHeader from './TournamentHeader.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Molecules/LeaderboardHeader',
|
|
5
|
+
component: LeaderboardHeader,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const Template = (args, { argTypes }) => ({
|
|
9
|
+
components: { LeaderboardHeader },
|
|
10
|
+
setup() {
|
|
11
|
+
return { args };
|
|
12
|
+
},
|
|
13
|
+
template: `
|
|
14
|
+
<LeaderboardHeader
|
|
15
|
+
v-bind="args"
|
|
16
|
+
@filter-change="onFilterChange"
|
|
17
|
+
@weapon-change="onWeaponChange"
|
|
18
|
+
/>
|
|
19
|
+
`,
|
|
20
|
+
methods: {
|
|
21
|
+
onFilterChange(filter) {
|
|
22
|
+
alert(`Filter selected: ${filter}`);
|
|
23
|
+
},
|
|
24
|
+
onWeaponChange(weapon) {
|
|
25
|
+
alert(`Weapon selected: ${weapon}`);
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export const Default = Template.bind({});
|
|
31
|
+
Default.args = {
|
|
32
|
+
filters: ['Top Ranked', 'All Time', 'Regional', 'Club Members'],
|
|
33
|
+
weapons: ['All Weapons', 'Longsword', 'Saber', 'Rapier', 'Smallsword', 'Sword and Buckler'],
|
|
34
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<header class="w-full bg-white py-4 flex justify-center h-24">
|
|
3
|
+
<div class="container flex justify-between items-center w-full md:w-3/4 overflow-x-auto md:overflow-x-visible">
|
|
4
|
+
<nav class="flex space-x-4 w-full justify-start md:justify-around whitespace-nowrap mx-4 md:mx-0">
|
|
5
|
+
<!-- Filter Buttons -->
|
|
6
|
+
<BaseText
|
|
7
|
+
v-for="filter in filters"
|
|
8
|
+
:key="filter"
|
|
9
|
+
@click="onFilterSelect(filter)"
|
|
10
|
+
class="cursor-pointer border-b-2 pb-1 duration-300 ease-in-out px-4 md:p-0"
|
|
11
|
+
:class="{
|
|
12
|
+
'border-accent': selectedFilter === filter,
|
|
13
|
+
'hover:border-accent': selectedFilter !== filter,
|
|
14
|
+
'border-transparent px-4 md:p-0': selectedFilter !== filter
|
|
15
|
+
}"
|
|
16
|
+
color="primary"
|
|
17
|
+
size="xs md"
|
|
18
|
+
tag="p"
|
|
19
|
+
weight="bold"
|
|
20
|
+
>
|
|
21
|
+
{{ filter }}
|
|
22
|
+
</BaseText>
|
|
23
|
+
|
|
24
|
+
<!-- Weapon Dropdown Component -->
|
|
25
|
+
<BasicDropDown
|
|
26
|
+
:weapons="weapons"
|
|
27
|
+
:selectedWeapon="selectedWeapon"
|
|
28
|
+
@weapon-select="onWeaponSelect"
|
|
29
|
+
class="hidden md:block pl-4 pr-8 md:p-0"
|
|
30
|
+
/>
|
|
31
|
+
</nav>
|
|
32
|
+
</div>
|
|
33
|
+
</header>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
<script>
|
|
37
|
+
import BaseText from '../../../Atoms/BaseText/BaseText.vue';
|
|
38
|
+
import BasicDropDown from '../../../Molecules/DropDowns/BasicDropDown.vue';
|
|
39
|
+
|
|
40
|
+
export default {
|
|
41
|
+
name: 'LeaderboardHeader',
|
|
42
|
+
components: {
|
|
43
|
+
BaseText,
|
|
44
|
+
BasicDropDown,
|
|
45
|
+
},
|
|
46
|
+
props: {
|
|
47
|
+
filters: {
|
|
48
|
+
type: Array,
|
|
49
|
+
default: () => ['Top Ranked', 'All Time', 'Regional', 'Club Members'],
|
|
50
|
+
},
|
|
51
|
+
weapons: {
|
|
52
|
+
type: Array,
|
|
53
|
+
default: () => ['All Weapons', 'Longsword', 'Saber', 'Rapier', 'Smallsword', 'Sword and Buckler'],
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
data() {
|
|
57
|
+
return {
|
|
58
|
+
selectedFilter: 'Top Ranked',
|
|
59
|
+
selectedWeapon: 'All Weapons',
|
|
60
|
+
};
|
|
61
|
+
},
|
|
62
|
+
methods: {
|
|
63
|
+
onFilterSelect(filter) {
|
|
64
|
+
this.selectedFilter = filter;
|
|
65
|
+
this.$emit('filter-change', filter); // Emit an event when a filter is selected
|
|
66
|
+
},
|
|
67
|
+
onWeaponSelect(weapon) {
|
|
68
|
+
this.selectedWeapon = weapon;
|
|
69
|
+
this.$emit('weapon-change', weapon); // Emit an event when a weapon is selected
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
</script>
|
|
@@ -22,8 +22,8 @@ const Template = (args) => ({
|
|
|
22
22
|
|
|
23
23
|
export const DefaultHeroBanner = Template.bind({});
|
|
24
24
|
DefaultHeroBanner.args = {
|
|
25
|
-
imageSrc: 'https://
|
|
26
|
-
title: '
|
|
27
|
-
description: '
|
|
25
|
+
imageSrc: 'https://meyersquared.com/images/banners/largebanner01.jpg',
|
|
26
|
+
title: 'Find your next HEMA Touranment!',
|
|
27
|
+
description: '',
|
|
28
28
|
buttonLabel: 'Get Started',
|
|
29
29
|
};
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<img v-if="!isMobile" :src="imageSrc" alt="Hero Image" class="w-full h-full object-cover" />
|
|
10
10
|
|
|
11
11
|
<!-- Text Overlay for Desktop -->
|
|
12
|
-
<section class="hidden md:flex absolute inset-0 items-center justify-start px-8">
|
|
12
|
+
<section class="hidden md:flex absolute inset-0 items-center justify-start px-8 mt-40">
|
|
13
13
|
<div class="text-left text-white max-w-lg">
|
|
14
14
|
<BaseText color="secondary" tag="h1" size="4xl" weight="bold" class="mb-4">{{ title }}</BaseText>
|
|
15
15
|
<BaseText color="secondary" tag="p" size="lg" weight="normal" class="mb-6">{{ description }}</BaseText>
|
package/src/stories/Organisms/HeroBanners/TournamentDetails/TournamentDetailsBanner.stories.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import TournamentDetailsBanner from './TournamentDetailsBanner.vue';
|
|
2
|
+
import mockTournamentDetails from '../../../../mocks/getTouranmentDetailsMock.js';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Organisms/HeroBanners/Tournaments/TournamentDetailsBanner',
|
|
6
|
+
component: TournamentDetailsBanner,
|
|
7
|
+
argTypes: {
|
|
8
|
+
imageSrc: { control: 'text', description: 'URL of the tournament image' },
|
|
9
|
+
tournamentStartDate: { control: 'text', description: 'Start date of the tournament in YYYY-MM-DD format' },
|
|
10
|
+
title: { control: 'text', description: 'Tournament name or title' },
|
|
11
|
+
description: { control: 'text', description: 'Tournament description' },
|
|
12
|
+
clubLogo: { control: 'text', description: 'URL of the hosting club logo' },
|
|
13
|
+
hostingClubName: { control: 'text', description: 'Name of the hosting club' },
|
|
14
|
+
registeredParticipants: { control: 'number', description: 'Number of registered participants' },
|
|
15
|
+
eventsCount: { control: 'number', description: 'Number of events' },
|
|
16
|
+
isGoing: { control: 'boolean', description: 'Status if user is going' },
|
|
17
|
+
isBookmarked: { control: 'boolean', description: 'Status if tournament is bookmarked' },
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const Template = (args, { argTypes }) => ({
|
|
22
|
+
props: Object.keys(argTypes),
|
|
23
|
+
components: { TournamentDetailsBanner },
|
|
24
|
+
template: `<TournamentDetailsBanner v-bind="$props" />`,
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export const Default = Template.bind({});
|
|
28
|
+
Default.args = {
|
|
29
|
+
imageSrc: 'https://meyersquared.com/images/banners/thinbanner02.jpg',
|
|
30
|
+
tournamentStartDate: '2024-07-20',
|
|
31
|
+
title: mockTournamentDetails.Name,
|
|
32
|
+
description: mockTournamentDetails.Description,
|
|
33
|
+
clubLogo: 'https://via.placeholder.com/100',
|
|
34
|
+
hostingClubName: 'Queen City Sword Guild',
|
|
35
|
+
registeredParticipants: 50,
|
|
36
|
+
eventsCount: 5,
|
|
37
|
+
isGoing: true,
|
|
38
|
+
isBookmarked: true,
|
|
39
|
+
};
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section class="relative w-full flex justify-center bg-primary m-0 bg-top" :style="backgroundStyle">
|
|
3
|
+
<!-- Left Spacer -->
|
|
4
|
+
<div class="hidden md:block w-[150px] bg-primary border-b border-lineGrey flex-shrink-0"></div>
|
|
5
|
+
|
|
6
|
+
<!-- Main Content -->
|
|
7
|
+
<div class="relative w-full md:border-b md:border-l md:border-r border-lineGrey">
|
|
8
|
+
<!-- Background Image -->
|
|
9
|
+
<img v-if="!isMobile" :src="imageSrc" alt="Hero Image" class="w-full h-full object-cover object-top max-h-96"/>
|
|
10
|
+
|
|
11
|
+
<!-- Text Overlay for Desktop -->
|
|
12
|
+
<section class="hidden w-full md:flex absolute inset-0 justify-between items-end">
|
|
13
|
+
<div class="w-1/2 p-4 bg-opacity-50 rounded-lg">
|
|
14
|
+
<BaseText color="secondary" tag="h1" size="md" weight="bold" class="mb-2">{{ formattedDate }}</BaseText>
|
|
15
|
+
<BaseText color="secondary" tag="h1" size="4xl" weight="bold" class="mb-4">{{ title }}</BaseText>
|
|
16
|
+
|
|
17
|
+
<!-- Hosting Club Info and Stats -->
|
|
18
|
+
<div class="flex justify-between mb-4 w-full">
|
|
19
|
+
<!-- Club Info -->
|
|
20
|
+
<div class="flex items-center space-x-4 w-1/2">
|
|
21
|
+
<img :src="clubLogo" alt="Club Logo" class="w-10 h-10 rounded-full"/>
|
|
22
|
+
<div>
|
|
23
|
+
<BaseText color="secondary" tag="p" size="xs" weight="normal" class="">Hosted by:</BaseText>
|
|
24
|
+
<BaseText color="secondary" tag="p" size="lg" weight="bold">{{ hostingClubName }}</BaseText>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
<!-- Additional Info -->
|
|
31
|
+
<div class="flex justify-between items-center">
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</section>
|
|
35
|
+
|
|
36
|
+
<!-- Mobile Overlay -->
|
|
37
|
+
<div v-if="isMobile" class="flex justify-center text-left w-full px-6 mt-10">
|
|
38
|
+
<div class="w-full">
|
|
39
|
+
<BaseText color="secondary" tag="h1" size="lg" weight="bold" class="mb-2">{{ formattedDate }}</BaseText>
|
|
40
|
+
<BaseText color="secondary" tag="h1" size="xl" weight="bold" class="mb-2">{{ title }}</BaseText>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<!-- Right Spacer -->
|
|
46
|
+
<div class="hidden md:block w-[150px] bg-primary border-b border-lineGrey flex-shrink-0"></div>
|
|
47
|
+
</section>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<script>
|
|
51
|
+
import BaseText from '../../../Atoms/BaseText/BaseText.vue';
|
|
52
|
+
import Icon from '../../../Atoms/Icon/Icon.vue';
|
|
53
|
+
|
|
54
|
+
export default {
|
|
55
|
+
name: 'TournamentDetailsBanner',
|
|
56
|
+
components: {
|
|
57
|
+
BaseText,
|
|
58
|
+
Icon,
|
|
59
|
+
},
|
|
60
|
+
props: {
|
|
61
|
+
imageSrc: {
|
|
62
|
+
type: String,
|
|
63
|
+
required: true,
|
|
64
|
+
default: 'https://meyersquared.com/images/banners/thinbanner01.jpg',
|
|
65
|
+
},
|
|
66
|
+
tournamentStartDate: {
|
|
67
|
+
type: String,
|
|
68
|
+
required: true,
|
|
69
|
+
default: '2024-07-20',
|
|
70
|
+
},
|
|
71
|
+
title: {
|
|
72
|
+
type: String,
|
|
73
|
+
required: true,
|
|
74
|
+
default: 'Tournament Name',
|
|
75
|
+
},
|
|
76
|
+
clubLogo: {
|
|
77
|
+
type: String,
|
|
78
|
+
required: true,
|
|
79
|
+
default: 'https://via.placeholder.com/100',
|
|
80
|
+
},
|
|
81
|
+
hostingClubName: {
|
|
82
|
+
type: String,
|
|
83
|
+
required: true,
|
|
84
|
+
default: 'Hosting Club Name',
|
|
85
|
+
},
|
|
86
|
+
isGoing: {
|
|
87
|
+
type: Boolean,
|
|
88
|
+
default: false,
|
|
89
|
+
},
|
|
90
|
+
isBookmarked: {
|
|
91
|
+
type: Boolean,
|
|
92
|
+
default: false,
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
data() {
|
|
96
|
+
return {
|
|
97
|
+
isMobile: false,
|
|
98
|
+
};
|
|
99
|
+
},
|
|
100
|
+
computed: {
|
|
101
|
+
formattedDate() {
|
|
102
|
+
// Format the date using plain JavaScript
|
|
103
|
+
const date = new Date(this.tournamentStartDate);
|
|
104
|
+
const options = {weekday: 'long', year: 'numeric', month: 'short', day: 'numeric'};
|
|
105
|
+
return date.toLocaleDateString('en-US', options);
|
|
106
|
+
},
|
|
107
|
+
backgroundStyle() {
|
|
108
|
+
return {
|
|
109
|
+
backgroundImage: `url(${this.imageSrc})`,
|
|
110
|
+
backgroundSize: 'cover',
|
|
111
|
+
backgroundPosition: 'top',
|
|
112
|
+
backgroundRepeat: 'no-repeat',
|
|
113
|
+
};
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
mounted() {
|
|
117
|
+
this.checkScreenSize();
|
|
118
|
+
window.addEventListener('resize', this.checkScreenSize);
|
|
119
|
+
},
|
|
120
|
+
beforeDestroy() {
|
|
121
|
+
window.removeEventListener('resize', this.checkScreenSize);
|
|
122
|
+
},
|
|
123
|
+
methods: {
|
|
124
|
+
checkScreenSize() {
|
|
125
|
+
this.isMobile = window.innerWidth < 768;
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
</script>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import TournamentBanner from './TournamentBanner.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Organisms/HeroBanners/Tournaments/TournamentBanner',
|
|
5
|
+
component: TournamentBanner,
|
|
6
|
+
argTypes: {
|
|
7
|
+
imageSrc: { control: 'text' },
|
|
8
|
+
title: { control: 'text' },
|
|
9
|
+
description: { control: 'text' },
|
|
10
|
+
'button-click': { action: 'button-click' }
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const Template = (args, { argTypes }) => ({
|
|
15
|
+
props: Object.keys(argTypes),
|
|
16
|
+
components: { TournamentBanner },
|
|
17
|
+
template: `<TournamentBanner v-bind="$props" />`,
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export const Default = Template.bind({});
|
|
21
|
+
Default.args = {
|
|
22
|
+
imageSrc: 'https://meyersquared.com/images/banners/thinbanner01.jpg',
|
|
23
|
+
title: 'Find Tournaments',
|
|
24
|
+
description: 'Find your next HEMA Tournaments near you!',
|
|
25
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section class="relative w-full flex justify-center bg-primary m-0 bg-top" :style="backgroundStyle">
|
|
3
|
+
<div class="hidden md:block w-[150px] bg-primary border-b border-lineGrey flex-shrink-0"></div>
|
|
4
|
+
|
|
5
|
+
<div class="relative w-full md:border-b md:border-l md:border-r border-lineGrey">
|
|
6
|
+
<img v-if="!isMobile" :src="imageSrc" alt="Hero Image" class="w-full h-full object-cover object-top max-h-96" />
|
|
7
|
+
|
|
8
|
+
<section class="hidden md:flex absolute inset-0 items-center justify-start px-8 pt-32">
|
|
9
|
+
<div class="text-left text-white max-w-lg">
|
|
10
|
+
<BaseText color="secondary" tag="h1" size="4xl" weight="bold" class="mb-4">{{ title }}</BaseText>
|
|
11
|
+
<BaseText color="secondary" tag="p" size="xl" weight="normal" class="mb-6" v-html="description"></BaseText>
|
|
12
|
+
</div>
|
|
13
|
+
</section>
|
|
14
|
+
|
|
15
|
+
<div v-if="isMobile" class="flex justify-center text-left w-full px-4 mt-8">
|
|
16
|
+
<div class="w-full mb-4">
|
|
17
|
+
<BaseText color="secondary" tag="h1" size="lg" weight="bold" class="mb-0 w-1/2">{{ title }}</BaseText>
|
|
18
|
+
<BaseText color="secondary" tag="p" size="xs" weight="normal" class="w-8/12">{{ description }}</BaseText>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<div class="hidden md:block w-[150px] bg-primary border-b border-lineGrey flex-shrink-0"></div>
|
|
24
|
+
</section>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script>
|
|
28
|
+
import BaseText from '../../../Atoms/BaseText/BaseText.vue';
|
|
29
|
+
|
|
30
|
+
export default {
|
|
31
|
+
name: 'TournamentBanner',
|
|
32
|
+
components: {
|
|
33
|
+
BaseText,
|
|
34
|
+
},
|
|
35
|
+
props: {
|
|
36
|
+
imageSrc: {
|
|
37
|
+
type: String,
|
|
38
|
+
required: true
|
|
39
|
+
},
|
|
40
|
+
title: {
|
|
41
|
+
type: String,
|
|
42
|
+
required: true,
|
|
43
|
+
default: 'Hero Banner Title',
|
|
44
|
+
},
|
|
45
|
+
description: {
|
|
46
|
+
type: String,
|
|
47
|
+
required: true,
|
|
48
|
+
default: 'This is the description that goes under the hero banner.',
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
data() {
|
|
52
|
+
return {
|
|
53
|
+
isMobile: false,
|
|
54
|
+
};
|
|
55
|
+
},
|
|
56
|
+
computed: {
|
|
57
|
+
backgroundStyle() {
|
|
58
|
+
return {
|
|
59
|
+
backgroundImage: `url(${this.imageSrc})`,
|
|
60
|
+
backgroundSize: 'cover',
|
|
61
|
+
backgroundPosition: 'top',
|
|
62
|
+
backgroundRepeat: 'no-repeat',
|
|
63
|
+
};
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
mounted() {
|
|
67
|
+
this.checkScreenSize();
|
|
68
|
+
window.addEventListener('resize', this.checkScreenSize);
|
|
69
|
+
},
|
|
70
|
+
beforeDestroy() {
|
|
71
|
+
window.removeEventListener('resize', this.checkScreenSize);
|
|
72
|
+
},
|
|
73
|
+
methods: {
|
|
74
|
+
checkScreenSize() {
|
|
75
|
+
this.isMobile = window.innerWidth < 768;
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
</script>
|
|
@@ -108,13 +108,13 @@ export default {
|
|
|
108
108
|
BaseButton,
|
|
109
109
|
},
|
|
110
110
|
props: {
|
|
111
|
-
|
|
111
|
+
title: {
|
|
112
112
|
type: String,
|
|
113
113
|
required: true,
|
|
114
114
|
},
|
|
115
|
-
|
|
115
|
+
description: {
|
|
116
116
|
type: String,
|
|
117
|
-
|
|
117
|
+
default: '',
|
|
118
118
|
},
|
|
119
119
|
buttonLabelOne: {
|
|
120
120
|
type: String,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<section class="relative bg-cover bg-
|
|
2
|
+
<section class="relative bg-cover bg-top h-80 max-w-[1200px] mx-auto rounded-lg overflow-hidden mb-10" :style="{ backgroundImage: 'url(' + imageUrl + ')' }">
|
|
3
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
4
|
<BaseText color="secondary" tag="h3" size="5xl" weight="normal" class="mb-8" v-html="description" />
|
|
5
5
|
<BaseButton
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import ClubDetailPage from './ClubDetailPage.vue';
|
|
2
|
+
import mockGetClubById from "../../../mocks/getClubById.js";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Templates/ClubDetailPage',
|
|
6
|
+
component: ClubDetailPage,
|
|
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: { ClubDetailPage },
|
|
18
|
+
setup() {
|
|
19
|
+
return { args };
|
|
20
|
+
},
|
|
21
|
+
template: '<ClubDetailPage 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/thinbannerclub.jpg',
|
|
29
|
+
club: mockGetClubById[0],
|
|
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
|
+
};
|