Skip to content

Commit fb52e97

Browse files
Copilotfredleger
andcommitted
fix: disable CFP CTA button when CFP is not open yet
Co-authored-by: fredleger <2778741+fredleger@users.noreply.github.com>
1 parent c4b9235 commit fb52e97

File tree

3 files changed

+20
-7
lines changed

3 files changed

+20
-7
lines changed

application/src/data/pages/home/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ export default {
172172
},
173173
cta: 'Submit via Conference HALL',
174174
ctaHref: 'https://conference-hall.io/cloud-native-provence-2026',
175+
ctaDisabled: true,
175176
image: {
176177
src: '~/assets/images/pages/home/event.jpg',
177178
alt: 'Call for Papers',

application/src/data/pages/home/fr.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ export default {
173173
},
174174
cta: 'Soumettre via Conference HALL',
175175
ctaHref: 'https://conference-hall.io/cloud-native-provence-2026',
176+
ctaDisabled: true,
176177
image: {
177178
src: '~/assets/images/pages/home/event.jpg',
178179
alt: 'Appel à conférenciers',

application/src/pages/home/_content.astro

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ export interface Props {
6969
};
7070
cta?: string;
7171
ctaHref?: string;
72+
ctaDisabled?: boolean;
7273
};
7374
venue?: {
7475
title?: string;
@@ -270,13 +271,23 @@ const heroBadge = hero?.badge;
270271

271272
{cfp.cta && (
272273
<div class="pt-2 text-center">
273-
<a
274-
href={cfp.ctaHref ?? '#'}
275-
class="inline-flex items-center justify-center rounded-md bg-primary px-6 py-3 font-semibold text-white transition hover:opacity-90"
276-
{...(cfp.ctaHref?.startsWith('http') ? { target: '_blank', rel: 'noopener noreferrer' } : {})}
277-
>
278-
{cfp.cta}
279-
</a>
274+
{cfp.ctaDisabled ? (
275+
<span
276+
role="button"
277+
aria-disabled="true"
278+
class="inline-flex cursor-not-allowed items-center justify-center rounded-md bg-gray-400 px-6 py-3 font-semibold text-white opacity-60 dark:bg-gray-600"
279+
>
280+
{cfp.cta}
281+
</span>
282+
) : (
283+
<a
284+
href={cfp.ctaHref ?? '#'}
285+
class="inline-flex items-center justify-center rounded-md bg-primary px-6 py-3 font-semibold text-white transition hover:opacity-90"
286+
{...(cfp.ctaHref?.startsWith('http') ? { target: '_blank', rel: 'noopener noreferrer' } : {})}
287+
>
288+
{cfp.cta}
289+
</a>
290+
)}
280291
</div>
281292
)}
282293
</div>

0 commit comments

Comments
 (0)