Skip to content

Commit 1a0d959

Browse files
committed
all wip
1 parent 085ed7c commit 1a0d959

12 files changed

Lines changed: 76 additions & 17 deletions

File tree

public/imgs/macfrut-2025.png

176 KB
Loading

src/components/Hero.astro

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ interface Dat {
66
}
77
88
interface Props {
9-
data: string[] | Dat[]
9+
data?: string[] | Dat[]
1010
}
1111
1212
const contents = Astro.props.data || [
1313
{ title: '18+ Years of Expertise', url: '/blog/testurl' },
1414
{ title: 'A Strong Network', url: '/blog/testurl' },
15-
{ title: 'Egyptian Artichokes', url: '/product/lines' },
1615
{ title: 'A New Venture, Rooted in Tradition', url: '/blog/testurl' },
1716
];
1817
@@ -24,7 +23,7 @@ const contents = Astro.props.data || [
2423
]*/
2524
---
2625

27-
<div class='w-full mt-15'>
26+
<div class='w-full mt-15 mb-10'>
2827
<ul id="phrases" class="relative h-16 text-xl flex items-center justify-center">
2928
{contents.map((feature, i) => (
3029
<li class={`absolute transition-opacity duration-700 ease-in-out text-center ${

src/components/Slide.astro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
interface Props {
3-
color: string;
3+
color?: string;
44
height?: string | number;
55
hfull?: boolean;
66
cookieConsent?: boolean;
@@ -9,14 +9,14 @@ interface Props {
99
1010
const isTop = Astro.props.top || false;
1111
const position = isTop ? 'justify-start' : 'justify-center';
12-
12+
const bgdiv = Astro.props.color ? Astro.props.color : 'bg-div';
1313
const color = Astro.props.color || 'bg-gray-900';
1414
const height =
1515
Astro.props.height && Astro.props.height == 100
1616
? 'min-h-full'
1717
: `min-h-${Astro.props.height}` || 'bg-gray-900';
1818
19-
const mainDiv = `w-full ${height} bg-amber-500 ${color} flex flex-col ${position} bg-div`;
19+
const mainDiv = `w-full ${height} bg-amber-500 ${color} flex flex-col ${position} ${bgdiv}`;
2020
const hfull = Astro.props.hfull ? 'h-full' : '';
2121
2222

src/components/cards/Event.astro

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
3+
interface Props {
4+
name: string;
5+
cta: string;
6+
slug: string;
7+
link?: string;
8+
img: string;
9+
startdate: string;
10+
enddate: string;
11+
}
12+
13+
14+
const idCall = Astro.props.slug;
15+
16+
const backImg = Astro.props.img;
17+
const style = `background-image: url('${backImg}');`
18+
19+
const start = new Date(Astro.props.startdate);
20+
21+
22+
23+
---
24+
25+
<div
26+
class="relative rounded-xl w-80 aspect-square bg-cover bg-center overflow-hidden"
27+
style={style}
28+
>
29+
<div class="absolute inset-0 bg-black/50 flex flex-col items-center justify-center text-white p-6">
30+
<h3 class="text-xl font-bold">{ Astro.props.name }</h3>
31+
<p class="text-sm mt-1">3–5 Ottobre 2025<br />Madrid, Spagna</p>
32+
<button data-cal-link="alismardare/reserve-a-meeting-fruit-attraction-2025" data-cal-namespace="reserve-a-meeting-fruit-attraction-2025" data-cal-config='{"layout":"month_view"}' class="mt-4 px-4 py-2 bg-indigo-600 rounded-lg hover:bg-indigo-700">
33+
<a >{Astro.props.cta}</a>
34+
</button>
35+
</div>
36+
</div>
37+
<!-- Cal element-click embed code begins -->
38+
<script type="text/javascript">
39+
(function (C, A, L) { let p = function (a, ar) { a.q.push(ar); }; let d = C.document; C.Cal = C.Cal || function () { let cal = C.Cal; let ar = arguments; if (!cal.loaded) { cal.ns = {}; cal.q = cal.q || []; d.head.appendChild(d.createElement("script")).src = A; cal.loaded = true; } if (ar[0] === L) { const api = function () { p(api, arguments); }; const namespace = ar[1]; api.q = api.q || []; if(typeof namespace === "string"){cal.ns[namespace] = cal.ns[namespace] || api;p(cal.ns[namespace], ar);p(cal, ["initNamespace", namespace]);} else p(cal, ar); return;} p(cal, ar); }; })(window, "https://app.cal.com/embed/embed.js", "init");
40+
Cal("init", "reserve-a-meeting-fruit-attraction-2025", {origin:"https://app.cal.com"});
41+
42+
43+
// Important: Please add the following attributes to the element that should trigger the calendar to open upon clicking.
44+
// `data-cal-link="alismardare/reserve-a-meeting-fruit-attraction-2025"`
45+
// data-cal-namespace="reserve-a-meeting-fruit-attraction-2025"
46+
// `data-cal-config='{"layout":"month_view"}'`
47+
48+
Cal.ns[idCall]("ui", {"hideEventTypeDetails":false,"layout":"month_view"});
49+
</script>
50+
<!-- Cal element-click embed code ends -->

src/content.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const tradeFairs = defineCollection({
3636
slug: z.string().optional(),
3737
location: z.string().optional(),
3838
description: z.string().optional(),
39+
image: z.string()
3940
}),
4041
});
4142

src/content/trade-fairs/fruit-attraction-2025.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
---
22

33
title: "Fruit Attraction"
4-
startdate: "2025-05-08"
5-
enddate: "2025-05-11"
6-
location: "Rimini, Italy"
4+
startdate: "2025-09-30"
5+
enddate: "2025-09-02"
6+
location: "Madrid, Spain"
7+
image: 'imgs/macfrut-2025.png'
78

89
---
910

src/content/trade-fairs/mac-frut-2025.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
---
22

33
title: "Mac Frut"
4-
startdate: "2025-05-08"
4+
startdate: "2025-09-08"
55
enddate: "2025-05-11"
66
location: "Rimini, Italy"
77

8+
image: 'imgs/macfrut-2025.png'
9+
810
---
911

1012
## MacFrut

src/layouts/CategoryListing.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const title = Astro.props.title;
3131
</head>
3232
<body>
3333

34-
<Slide color='bg-slate-300' height={100} top={true}>
34+
<Slide height={100} top={true}>
3535
<div class='container flex justify-around flex-col items-center gap-4 px-5 lg: py-10'>
3636
<h1 class='text-2xl mb-5 font-[EUR42] text-white'>{title}</h1>
3737
<BusinessCard />

src/pages/[slug].astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ const { Content } = await page.render();
2424
---
2525

2626
<Layout>
27-
<Slide color='bg-slate-300' height={100}>
27+
<Slide height={100}>
2828
<div class='container flex flex-col justify-around items-center gap-4 px-5 lg: py-10'>
29-
<h1 class='text-2xl mb-5 font-[EUR42]'>{ page.data.title }</h1>
29+
<h2 class='text-2xl mb-5 font-[EUR42] text-white'>{ page.data.title }</h2>
3030
<BusinessCard />
3131

3232
<Paper><Content /></Paper>

src/pages/index.astro

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,18 @@ import Layout from '@/layouts/White.astro';
33
import Slide from '@/components/Slide.astro';
44
import BusinessCard from '@/components/BusinessCard.astro';
55
import Hero from '@/components/Hero.astro';
6+
import Event from '@/components/cards/Event.astro';
67
---
78

89
<Layout>
9-
<Slide color='bg-slate-300' height={100}>
10+
<Slide height={100}>
1011
<div class='container flex flex-col justify-around items-center gap-4 px-5 lg: py-10'>
1112
<BusinessCard />
1213
<Hero />
14+
<Event name='Fruit Attraction 2025' img='/imgs/macfrut-2025.png' startdate='2025-09-30' enddate='2025-10-2' slug='reserve-a-meeting-fruit-attraction-2025' link='https://cal.com/alismardare/reserve-a-meeting-fruit-attraction-2025' cta='Reserve a Meeting' />
15+
1316
</div>
1417
</Slide>
1518
</Layout>
19+
20+

0 commit comments

Comments
 (0)