Skip to content

Commit 087da88

Browse files
committed
better destino event mobile view
1 parent 259034d commit 087da88

2 files changed

Lines changed: 18 additions & 12 deletions

File tree

devconnect/src/pages/destino.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ import { SEO } from 'common/components/SEO'
88
const DestinoPage = ({ content, events }: { content: any; events: any }) => {
99
const { data }: { data: any } = useTina(content)
1010

11-
console.log(events, 'EVENTS')
12-
1311
return (
1412
<>
1513
<SEO

devconnect/src/pages/destino/[event].tsx

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,24 @@ ${currentUrl}`
5050
className="w-full h-full absolute object-cover object-position opacity-40"
5151
/>
5252

53-
<div className="relative z-10 flex flex-col items-center sm:justify-center h-full w-full px-4">
54-
<div className="mb-2 md:mb-4 hidden sm:flex text-white flex-col text-xs text-center relative">
53+
<div className="relative z-10 flex flex-col items-center justify-center h-full w-full px-4">
54+
<div className="mb-2 md:mb-4 flex text-white flex-col text-xs text-center relative">
5555
<Image
5656
src={DestinoLogo}
5757
alt="Destino Logo"
58-
className="object-cover w-[250px] max-w-[70vw] absolute hidden sm:block top-0 translate-y-[calc(-100%-24px)] left-1/2 -translate-x-1/2"
58+
className="object-cover w-[250px] max-w-[50vw] absolute top-0 translate-y-[calc(-100%-0px)] sm:translate-y-[calc(-100%-24px)] left-1/2 -translate-x-1/2"
5959
/>
60-
<Link href="/destino" className="" indicateExternal style={{ '--icon-color': 'white' }} target="_blank">
60+
<Link
61+
href="/destino"
62+
className="hidden sm:inline-flex"
63+
indicateExternal
64+
style={{ '--icon-color': 'white' }}
65+
target="_blank"
66+
>
6167
{(globalThis as any).translations.this_is_a_destino_devconnect_event}
6268
</Link>
6369
</div>
70+
6471
<Tilty
6572
className="max-w-full relative contents md:block"
6673
style={{ transformStyle: 'preserve-3d' }}
@@ -77,7 +84,7 @@ ${currentUrl}`
7784
/>
7885
</div>
7986
<div className="py-4 px-6 flex flex-col">
80-
<div className="flex flex-col md:flex-row md:items-start md:justify-between gap-4 mb-3">
87+
<div className="flex flex-col md:flex-row md:items-start md:justify-between gap-2 sm:gap-4 mb-3">
8188
<h1 className="text-xl md:text-2xl font-extrabold text-gray-900 leading-tight">{eventData?.name}</h1>
8289
<span className="inline-flex items-center gap-1 text-gray-500 text-xs font-medium">
8390
<svg
@@ -96,9 +103,9 @@ ${currentUrl}`
96103
{eventData?.location}
97104
</span>
98105
</div>
99-
<p className="mb-4 text-xs md:text-base">{eventData?.content}</p>
100-
<div className="flex flex-col sm:flex-row gap-4 text-sm justify-between">
101-
<div className="flex gap-4">
106+
<p className="mb-2 sm:mb-4 text-xs md:text-base">{eventData?.content}</p>
107+
<div className="flex flex-col sm:flex-row gap-2 sm:gap-4 text-sm justify-between">
108+
<div className="flex gap-2 sm:gap-4">
102109
<div className="flex items-center gap-1 ">{moment(eventData?.date).format('MMMM D, YYYY')}</div>
103110

104111
<div className="flex items-center gap-1 font-semibold">
@@ -115,6 +122,7 @@ ${currentUrl}`
115122
</div>
116123
</div>
117124
</Tilty>
125+
118126
<div className="mt-2 md:mt-4 text-white flex flex-col text-xs text-center relative">
119127
{hasLink && (
120128
<Link href={eventData.link} target="_blank">
@@ -136,7 +144,7 @@ ${currentUrl}`
136144
</div>
137145
</div>
138146

139-
<div className="flex flex-col items-center mb-4 absolute bottom-0 margin-auto z-10">
147+
<div className="hidden sm:flex flex-col items-center mb-4 absolute bottom-0 margin-auto z-10">
140148
<p className="text-sm mb-2 text-white">{(globalThis as any).translations.destino_share_on}</p>
141149
<div className="flex gap-4">
142150
<a
@@ -186,7 +194,7 @@ export const getStaticPaths = async ({ locales }: { locales: string[] }) => {
186194

187195
return {
188196
paths,
189-
fallback: 'blocking', // Show a fallback page while generating new pages
197+
fallback: 'blocking',
190198
}
191199
}
192200

0 commit comments

Comments
 (0)