Skip to content

Commit

Permalink
feat: add partners to con 2024 and escape on con modal (#550)
Browse files Browse the repository at this point in the history
  • Loading branch information
ginifizz committed Jun 5, 2024
1 parent 8b5e15f commit b4911cf
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 15 deletions.
9 changes: 9 additions & 0 deletions pwa/app/(common)/components/ModalCon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,19 @@ export default function ModalCon() {
}
};

const handleKeyDown = (event: KeyboardEvent) => {
if (event.code === "Escape") {
setOpen(false);
document.removeEventListener("keydown", handleKeyDown);
}
}

document.addEventListener("mousedown", handleClickOutside);
document.addEventListener("keydown", handleKeyDown);

return () => {
document.removeEventListener("mousedown", handleClickOutside);
document.removeEventListener("keydown", handleKeyDown);
};
}, []);

Expand Down
20 changes: 10 additions & 10 deletions pwa/app/(con)/[locale]/con/2024/components/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -330,17 +330,17 @@ const HomePage = ({ speakers, partners, images }: HomePageProps) => {
</SectionTitle>
<LookingSponsorCard />
</div>
<Section
section="partners"
className="bg-white text-center relative z-10 pt-40 pb-40"
>
<div className="container text-center">
<div className="lined-center lined-blue font-bold uppercase text-2xl text-blue font-title">
<Translate translationKey="partners.title" />
</div>
<Partners data={partners} edition="2024" />
</Section>
<Section
section="partners"
className="bg-white text-center relative z-10 pt-40 pb-40"
>
<div className="container text-center">
<div className="lined-center lined-blue font-bold uppercase text-2xl text-blue font-title">
<Translate translationKey="partners.title" />
</div>
</Section>
<Partners data={partners} edition="2024" />
</div>
</Section>
</>
);
Expand Down
6 changes: 4 additions & 2 deletions pwa/components/con/common/ConLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ export default function ConLink({
}
const element = getRef(`section-${section}`);
element?.current?.scrollIntoView({ behavior: "smooth" });
window.history.replaceState({}, "", `${pathname}#${section}`);
},
[getRef]
[getRef, pathname]
);

const normalizedUrl = (url = "") => {
Expand All @@ -44,7 +45,8 @@ export default function ConLink({
const { pathname: currentPathname } = normalizedUrl(pathname);
const { pathname: linkPathname, anchor } = normalizedUrl(href);

return currentPathname == linkPathname ? (
return currentPathname === linkPathname ||
`/en${currentPathname}` === linkPathname ? (
<div
className={className}
onClick={() => goToAnchorLink(anchor)}
Expand Down
19 changes: 16 additions & 3 deletions pwa/data/con/2024/partners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ const partners: Partner[] = [
rank: 2,
highlight: true,
},
{
name: "Akawaka",
logo: "akawaka",
link: "https://www.akawaka.fr/",
rank: 2,
highlight: true,
},
{
name: "Bakslash",
logo: "bakslash",
Expand Down Expand Up @@ -61,9 +68,9 @@ const partners: Partner[] = [
rank: 4,
},
{
name: "Accor Group",
logo: "accor",
link: "https://all.accor.com/",
name: "Symfony",
logo: "symfony",
link: "https://symfony.com/",
rank: 4,
},
{
Expand All @@ -72,6 +79,12 @@ const partners: Partner[] = [
link: "https://www.euratechnologies.com/",
rank: 4,
},
{
name: "Accor Group",
logo: "accor",
link: "https://all.accor.com/",
rank: 4,
},
];

export default partners;
Binary file added pwa/public/images/con/2024/partners/akawaka.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pwa/public/images/con/2024/partners/symfony.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b4911cf

Please sign in to comment.