Skip to content

Commit

Permalink
- mise en place de l'affichage du planning de la conference.
Browse files Browse the repository at this point in the history
- correction du bug de la time zone
  • Loading branch information
schassande committed Nov 15, 2024
1 parent ec2468b commit 4f26e06
Show file tree
Hide file tree
Showing 15 changed files with 76 additions and 25 deletions.
Binary file added public/img/schedule.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/components/DateTimeChangingChild.astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const id = Math.round(Math.random() * 100000);
const beforeId = 'before' + id;
const doingId = 'doing' + id;
const afterId = 'after' + id;
// console.log(beginDate, endDate, refreshInterval, id);
console.log(beginDate, endDate, refreshInterval, id);
---
<astro-interval-reloader data-genid={id} data-begindate={beginDate} data-enddate={endDate} data-refreshinterval={refreshInterval}>
<span id={beforeId}>
Expand Down
8 changes: 3 additions & 5 deletions src/components/Menu.astro
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,13 @@ const path_fr = path.replace('/en/','/');
<a class="dropdown-item" href={url_prefix+'/previous-editions/'}>{t("past_editions")}</a>
</div>
</li>
<!-- <li class="nav-item"><a class="nav-link" href={url_prefix+'/#program'}>
{ !cfp.published ? t("program_translation") : t("schedule_translation") }
</a></li> -->
<li class="nav-item"><a class="nav-link" href={url_prefix+'/schedule/'}>{ t("schedule_menu") }</a></li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href={url_prefix+'/program/'} id="navCfpDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<a class="nav-link dropdown-toggle" href={url_prefix+'/cfp/'} id="navCfpDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
CFP <span class="caret"></span>
</a>
<div class="dropdown-menu" aria-labelledby="navCfpDropdown">
<a class="nav-link" href={url_prefix+'/program/'}>{ !cfp.published ? t("program_translation") : t("schedule_translation") }</a>
<a class="nav-link" href={url_prefix+'/cfp/'}>{t("program_translation")}</a>
<a class="dropdown-item" href={url_prefix+'/tremplin/'}>Le Tremplin</a>
<a class="dropdown-item" href={url_prefix+'/editorial-line/'}>Ligne éditoriale</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/StorePackage.astro
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const price = days === 3 ? store.price_univ : store.price_conf;
<li><i class="fa fa-check" aria-hidden="true"></i> {t('store_access_meet_and_greet')}</li>
</ul>

<DateTimeChangingChild beginDate={Date.parse(store.beginDate)} endDate={Date.parse(store.endDate)} refreshInterval="10000">
<DateTimeChangingChild beginDate={new Date(store.beginDate).getTime()} endDate={new Date(store.endDate).getTime()} refreshInterval="10000">
<span class="snc-btn disabled" slot="before">{t('store_opens_on', (store.open_date as any)[lang])}</span>
<StoreButton store={store} slot="doing"></StoreButton>
<span class="snc-btn disabled" slot="after">{t('store_is_soldout')}</span>
Expand Down
13 changes: 11 additions & 2 deletions src/data/cfp.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,27 @@
"feedback_url": "",
"dates": {
"open_date": {
"date": "2024-09-07T00:00:00.000",
"date": "2024-09-07T00:00:00.000+02:00",
"fr": "7 Septembre 2024",
"en": "7th of September 2024"
},
"close_date": {
"date": "2024-10-15T00:00:00.000",
"date": "2024-10-15T00:00:00.000+02:00",
"fr": "15 Octobre 2024",
"en": "15th of October 2024"
},
"notification_date": {
"fr": "Début Novembre 2024",
"en": "Beginning November 2024"
},
"schedule" : {
"date": "2024-11-15T00:00:00.000+01:00",
"fr": "15 Novembre 2024",
"en": "15th of November 2024",
"url" : {
"embedded": "https://app-demo.voxxr.in/events/snowcamp25/embedded-schedule",
"full": "https://app-demo.voxxr.in/events/snowcamp25/schedule"
}
}
}
}
5 changes: 0 additions & 5 deletions src/data/organisation.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,6 @@
"linkedin": "ludovicp",
"github": "ludomp"
},
{
"name": "Mathieu Poissard",
"img": "mathieu.png",
"linkedin": "mathieu-poissard-769800b8"
},
{
"name": "Michel Barret",
"img": "michel.jpg",
Expand Down
4 changes: 2 additions & 2 deletions src/data/ticket.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"price_univ": 160,
"possible_status": ["not_open", "open", "closed", "deactivated"],
"status": "not_open",
"beginDate": "2024-11-18T11:00:00.000",
"endDate": "2025-01-20T00:00:00.000",
"beginDate": "2024-11-18T11:00:00.000+01:00",
"endDate": "2025-01-20T00:00:00.000+01:00",
"open_date": {
"default": "unknown",
"fr": "18 Novembre à 11h00",
Expand Down
9 changes: 8 additions & 1 deletion src/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -491,5 +491,12 @@ Candidate is coached from ideation to the final 20-minute session, that will tak
<p>Of course, if we notice that your submission is missing information or that your topic/abstract isn’t clear enough, we will do our best to let you know so you can make adjustments.</p>
<p>However, note that this is only possible while the CFP is open and you can still modify your submission. The closer you submit your session to the CFP closing date, the fewer chances you'll have to revise your text.</p>
`;
return i18n;
i18n.schedule_menu ='Program';
i18n.schedule_title ='Program';
i18n.schedule_unavailable =`The program will be available the ${cfp.dates.schedule.en}.`;
i18n.schedule_available =`The programm is available since the ${cfp.dates.schedule.en}.`;
i18n.schedule_openfullschedule =`To see the program on a full page click on `;
i18n.schedule_change =`Until the last minute, some minor changes are possible. A speaker can be unavailable or the Snowcamp organisation team can decided to swap some talk of room due to the number of expected attendees.`;

return i18n;
}
6 changes: 6 additions & 0 deletions src/i18n/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,12 @@ contrat avec ce sponsoring pour laisser la place à un autre sponsor.`;
<p>Bien sûr si nous constatons qu'il manque des informations à votre soumission ou que votre sujet/abstract n'est pas assez clair nous ferons au mieux pour vous en faire part afin que vous puissiez corriger le tir.</p>
<p>Cependant notez que cela ne nous est possible que pendant que le CFP est ouvert et que vous pouvez modifier votre soumission. Donc plus vous soumettez votre session proche de la date de fermeture du CFP, plus vous réduisez vos chances d'avoir droit à retravailler votre texte.</p>
`;
i18n.schedule_menu ='Programme';
i18n.schedule_title ='Programme';
i18n.schedule_unavailable =`Le programme sera disponible le ${cfp.dates.schedule.fr}.`;
i18n.schedule_available =`Le programme est disponible depuis le ${cfp.dates.schedule.fr}.`;
i18n.schedule_openfullschedule =`Pour le voir sur une page complète cliquer sur `;
i18n.schedule_change =`Jusqu'à la dernière minute un ajustement de programme est possible car un speaker peut être indisponible ou l'organisation peut décider d'inverser 2 salles par rapport à la fréquentation supposée.`;

return i18n;
}
3 changes: 2 additions & 1 deletion src/i18n/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ export async function initConfig(lang: string) {
i18nconfig.i18n = en_init();
} else if (lang === 'fr') {
i18nconfig.i18n = fr_init();
} else {
i18nconfig.i18n = en_init();
}
}
export function t(key: string, ...params:any[]): any {
Expand All @@ -23,7 +25,6 @@ export function t(key: string, ...params:any[]): any {
case 3: return value(params[0], params[1], params[2]);
default: return value(params);
}
return value(params);
} else {
return value;
}
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/Redirect.astro
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ const content = `0; url=${target}`;
</head>
</head>
<body lang="fr">
<h1>Redirect to {target}</h1>
<h3 style="margin: 50px auto; text-align: center;">Redirect to {target}</h3>
</body>
2 changes: 1 addition & 1 deletion src/pages/program.astro → src/pages/cfp.astro
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const lang = (Astro.locals as any).lang;
</div>
<div class="col-xs-12 col-sm-6 col-md-6">
<div class="single">
<DateTimeChangingChild beginDate={Date.parse(cfp.dates.open_date.date)} endDate={Date.parse(cfp.dates.close_date.date)} refreshInterval="30000">
<DateTimeChangingChild beginDate={new Date(cfp.dates.open_date.date).getTime()} endDate={new Date(cfp.dates.close_date.date).getTime()} refreshInterval="30000">
<span slot="before" set:html={t('cfp_open_soon_desc')}></span>
<span slot="doing" set:html={t('cfp_open_desc')}></span>
<span slot="after" set:html={t('cfp_closed_desc')}></span>
Expand Down
5 changes: 5 additions & 0 deletions src/pages/schedule-full.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
import Redirect from '../layouts/Redirect.astro';
import cfp from '../data/cfp.json';
---
<Redirect target={cfp.dates.schedule.url.full}></Redirect>
35 changes: 35 additions & 0 deletions src/pages/schedule.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
import Layout from '../layouts/Layout.astro';
import { t } from "../i18n/i18n";
import cfp from '../data/cfp.json';
import DateTimeChangingChild from "../components/DateTimeChangingChild.astro";
---
<Layout title={t('schedule_title')}>
<section>
<div style="height: 70px;"></div>
<DateTimeChangingChild beginDate={new Date(cfp.dates.schedule.date).getTime()} refreshInterval="10000">
<div slot="before" style="margin: 20px auto 0 auto; text-align: center; min-height: 500px;">
{t('schedule_unavailable')}
</div>

<div slot="doing" style="margin: 20px auto 50px auto; width: 700px; text-align: center;">
<p>{t('schedule_available')}
<br>{t('schedule_openfullschedule')}
<br><a href="/schedule-full/"><img src="/img/schedule.png" height="100px" ></a>
</p>
<p>{t('schedule_change')}</p>
<div style="margin-top: 50px;">
<iframe
id="schedule_iframe"
title="Embedded schedule"
width="500"
height="900"
src={cfp.dates.schedule.url.embedded}>
</iframe>
</div>
</div>
</DateTimeChangingChild>
</section>
</Layout>

5 changes: 0 additions & 5 deletions src/pages/scheduling.astro

This file was deleted.

0 comments on commit 4f26e06

Please sign in to comment.