@dcrackel/meyersquaredui 1.0.78 → 1.0.80
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 +177 -166
- package/dist/meyersquaredui.umd.js +3 -3
- package/package.json +1 -1
- package/src/stories/Organisms/Cards/TournamentListCard/TournamentListCard.vue +6 -6
- package/src/stories/Organisms/GridLayout/GridLayout.vue +10 -5
- package/src/stories/Templates/HomePage/HomePage.vue +20 -3
- package/src/stories/Templates/TournamentDetailPage/TournamentDetailPage.vue +1 -1
- package/src/stories/Templates/TournamentListPage/TournamentListPage.vue +16 -13
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<section class="flex flex-col md:bg-white w-full border-b pb-2 mb-2 pt-1 cursor-pointer last:border-b-0" @click="handleCardClick">
|
|
3
|
-
<div class="flex">
|
|
2
|
+
<section class="flex flex-col md:bg-white w-full border-b pb-2 mb-2 pl-1 pt-1 cursor-pointer last:border-b-0" @click="handleCardClick">
|
|
3
|
+
<div class="flex pt-1">
|
|
4
4
|
<img :src="tournamentImage" :alt="imageAltText" class="w-24 h-16 md:w-32 md:h-20 object-cover rounded mr-2 md:mr-4 flex-shrink-0" />
|
|
5
5
|
<div class="flex flex-col">
|
|
6
|
-
<div class="flex items-center mb-
|
|
7
|
-
<div class="hidden md:flex items-center text-sm text-gray-600 mb-2"><BaseText color="primary" tag="p" size="
|
|
6
|
+
<div class="flex items-center mb-0"><BaseText color="primary" tag="h2" size="2xl" weight="bold">{{ tournamentName }}</BaseText></div>
|
|
7
|
+
<div class="hidden md:flex items-center text-sm text-gray-600 mb-2"><BaseText color="primary" tag="p" size="md" weight="normal">{{ addressName }}</BaseText></div>
|
|
8
8
|
</div>
|
|
9
9
|
</div>
|
|
10
10
|
|
|
11
11
|
<!-- Participants and Date Section -->
|
|
12
|
-
<div class="hidden md:flex mt-3">
|
|
12
|
+
<div class="hidden md:flex mt-3 mb-1">
|
|
13
13
|
<div class="flex flex-row w-full">
|
|
14
14
|
<div class="flex items-center mr-10">
|
|
15
15
|
<Icon icon="fa-users" size="sm" color="accent" class="mr-4" />
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<!-- Mobile Participants and Date Section -->
|
|
26
26
|
<div class="flex flex-col md:hidden mt-2">
|
|
27
27
|
<div class="flex items-center pb-2">
|
|
28
|
-
<BaseText color="primary" tag="p" size="sm" weight="
|
|
28
|
+
<BaseText color="primary" tag="p" size="sm" weight="normal">{{ addressName }}</BaseText>
|
|
29
29
|
</div>
|
|
30
30
|
<div class="flex flex-row">
|
|
31
31
|
<div class="flex items-center mr-4">
|
|
@@ -86,9 +86,12 @@ export default {
|
|
|
86
86
|
emits: ['grid-click', 'grid-card-click'],
|
|
87
87
|
computed: {
|
|
88
88
|
topClasses() {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
if (this.mobileHorizontal) {
|
|
90
|
+
return "w-screen overflow-x-auto";
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// For larger screens, limit the width to 1200px
|
|
94
|
+
return "max-w-[1200px] w-full flex justify-center mx-auto mt-8";
|
|
92
95
|
},
|
|
93
96
|
headerClasses() {
|
|
94
97
|
let retClasses = "w-full flex py-4 md:pb-10 ml-2 md:ml-0 mb-4";
|
|
@@ -97,15 +100,17 @@ export default {
|
|
|
97
100
|
},
|
|
98
101
|
gridClasses() {
|
|
99
102
|
let baseClasses = "md:grid md:gap-x-6 md:gap-y-4";
|
|
103
|
+
|
|
104
|
+
// Enable horizontal scrolling for mobile layout
|
|
100
105
|
if (this.mobileHorizontal) {
|
|
101
|
-
baseClasses = `flex space-x-4 md:grid md:gap-x-6 md:gap-y-4`;
|
|
106
|
+
baseClasses = `flex space-x-4 overflow-x-auto md:grid md:gap-x-6 md:gap-y-4`;
|
|
102
107
|
}
|
|
108
|
+
|
|
103
109
|
if (this.whiteStyle) {
|
|
104
110
|
baseClasses = `bg-white p-2 mx-2 md:mx-0 rounded-lg`;
|
|
105
111
|
}
|
|
106
112
|
|
|
107
113
|
let columnClasses;
|
|
108
|
-
|
|
109
114
|
switch (this.maxColumns) {
|
|
110
115
|
case 1:
|
|
111
116
|
columnClasses = "grid-cols-1";
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
:cardComponent="FencerCard"
|
|
23
23
|
:items="topFencers"
|
|
24
24
|
:maxColumns="5"
|
|
25
|
-
:mobileHorizontal="
|
|
25
|
+
:mobileHorizontal="mobileHorizontal"
|
|
26
26
|
:isLoading="topFencersIsLoading"
|
|
27
27
|
moreButtonLabel="Leaderboards"
|
|
28
28
|
title="Top Fencers"
|
|
@@ -34,19 +34,21 @@
|
|
|
34
34
|
@handle-button-click-one="changePage('submitresults')"
|
|
35
35
|
@handle-button-click-two="changePage('runtournament')"
|
|
36
36
|
/>
|
|
37
|
+
|
|
37
38
|
<GridLayout
|
|
38
39
|
:cardComponent="ArticleCard"
|
|
39
40
|
:items="articles"
|
|
40
41
|
:maxColumns="3"
|
|
41
|
-
:mobileHorizontal="
|
|
42
|
+
:mobileHorizontal="mobileHorizontal"
|
|
42
43
|
:isLoading="articlesIsLoading"
|
|
43
44
|
moreButtonLabel="See More"
|
|
44
45
|
title="Interesting Articles"
|
|
45
46
|
@grid-click="changePage('articles')"
|
|
46
47
|
@grid-card-click="handleGridCardClick"
|
|
47
48
|
/>
|
|
49
|
+
</div>
|
|
48
50
|
<Footer @changePage="changePage"/>
|
|
49
|
-
|
|
51
|
+
|
|
50
52
|
</template>
|
|
51
53
|
|
|
52
54
|
<script>
|
|
@@ -126,12 +128,27 @@ export default {
|
|
|
126
128
|
return this.tournaments.slice(0, 6);
|
|
127
129
|
}
|
|
128
130
|
},
|
|
131
|
+
mounted() {
|
|
132
|
+
// Check initial screen size
|
|
133
|
+
this.checkScreenSize();
|
|
134
|
+
|
|
135
|
+
// Add listener for window resize
|
|
136
|
+
window.addEventListener('resize', this.checkScreenSize);
|
|
137
|
+
},
|
|
138
|
+
beforeUnmount() {
|
|
139
|
+
// Clean up the event listener when the component is destroyed
|
|
140
|
+
window.removeEventListener('resize', this.checkScreenSize);
|
|
141
|
+
},
|
|
129
142
|
data() {
|
|
130
143
|
return {
|
|
131
144
|
TournamentCard: markRaw(TournamentCard),
|
|
145
|
+
mobileHorizontal: true,
|
|
132
146
|
};
|
|
133
147
|
},
|
|
134
148
|
methods: {
|
|
149
|
+
checkScreenSize() {
|
|
150
|
+
this.mobileHorizontal = window.matchMedia('(max-width: 768px)').matches;
|
|
151
|
+
},
|
|
135
152
|
handleGridCardClick() {
|
|
136
153
|
console.log('Grid Card Clicked');
|
|
137
154
|
},
|
|
@@ -5,19 +5,22 @@
|
|
|
5
5
|
<TournamentHeader :weapons="['All Weapons', 'Longsword', 'Saber', 'Rapier', 'Smallsword', 'Sword and Buckler']" />
|
|
6
6
|
|
|
7
7
|
<div class="w-full flex justify-center">
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
8
|
+
<section class="mb-20 flex w-full md:w-7/12">
|
|
9
|
+
<GridLayout
|
|
10
|
+
:cardComponent="cardComponent"
|
|
11
|
+
:items="limitedTournaments"
|
|
12
|
+
:maxColumns="1"
|
|
13
|
+
:isLoading="tournamentsIsLoading"
|
|
14
|
+
:whiteStyle="true"
|
|
15
|
+
moreButtonLabel="See All Tournaments"
|
|
16
|
+
:title="formattedDate"
|
|
17
|
+
@grid-card-click="handleCardClick"
|
|
18
|
+
topBoxClass="w-full md:w-3/4 md:mr-10 md:-mt-3"
|
|
19
|
+
/>
|
|
20
|
+
<div class="flex md:w-60 justify-start">
|
|
21
|
+
<Calendar :tournaments="tournaments" class="hidden md:block mt-32 items-start" />
|
|
22
|
+
</div>
|
|
23
|
+
</section>
|
|
21
24
|
</div>
|
|
22
25
|
|
|
23
26
|
<Footer />
|