Skip to content

Commit

Permalink
fix pour que ça build
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtyMaury committed Jun 18, 2024
1 parent 8bd6984 commit 55c21f2
Show file tree
Hide file tree
Showing 26 changed files with 1,226 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: /e/OS, mon smartphone Android sans Google
language: French
talkType: quickie
tags:
- null
- mobile
complexity: Beginner
speakers:
- benoit_masson
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
key: code_case___les_methodes_de_la_crim_adaptees_au_code_
title: 'Code Case : les méthodes de la crim adaptées au code!'
language: French
talkType: conference
tags:
- discovery
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Comment on a pimpé la 4L de Papy pour explorer Mars (ou presque)
language: French
talkType: conference
tags:
- null
- iot_hardware
complexity: Beginner
speakers:
- ilona_marie_lemaire_lefebvre
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: 'Dev dès 12 ans : Les Petits Hackers vous expliquent comment'
language: French
talkType: quickie
tags:
- null
- iot_hardware
complexity: Beginner
speakers:
- adrien
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: 'Mission Jetpack Compose : révolutionnez le développement mobile 🕵
language: French
talkType: codelab
tags:
- null
- mobile
complexity: Beginner
speakers:
- audrey_gentili
Expand Down
2 changes: 1 addition & 1 deletion data/sessions/our_future_without_passwords.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
key: our_future_without_passwords
title: Our future without passwords
language: American English
language: English
talkType: conference
tags:
- security
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
key: redecouvrir_la_cooperation___atelier_de_mob_programming
title: 'Redécouvrir la coopération : Atelier de Mob Programming'
language: French
talkType: codelab
tags:
- discovery
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Retourner le cerveau de sa Gameboy et les attraper (vraiment) tous 💪
language: French
talkType: conference
tags:
- null
- iot_hardware
complexity: Beginner
speakers:
- audren_burlot
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
key: survie_dans_les_tenebres_du_rendu_frontend__une_exploration_terrifiante______
title: 'Survie dans les ténèbres du rendu frontend: une exploration terrifiante 🫣 😱'
language: French
talkType: quickie
tags:
- web
Expand Down
2 changes: 1 addition & 1 deletion data/sessions/tinygo__petit_mais_costaud_____.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: TinyGo, petit mais costaud ! 💪
language: French
talkType: conference
tags:
- null
- iot_hardware
complexity: Beginner
speakers:
- aurelie_vache
Expand Down
16 changes: 16 additions & 0 deletions data/speakers/morgan_blanloeil.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
key: morgan_blanloeil
name: Morgan Blanloeil
feature: false
company: WeScale
companyLogo: /images/partners/wescale.png
photoUrl: https://lh3.googleusercontent.com/a/AEdFTp6KwXl6tyzkS5jZS9_sB9sXYPgX1ZPX_5YWmbxd=s96-c
socials:
twitter: morganBlan
bio: |+
Cloud Native Developer chez WeScale
Développeur Backend avec une forte appétence pour les sujets d'automatisation et de conteneurisation !
Je fais également partie de ceux qui pensent que le DevOps est bien une philosophie et non un métier !
7 changes: 1 addition & 6 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ exports.createPages = async ({ graphql, actions, reporter }) => {
// slides
const { data, errors } = await graphql(
`
{
allSessionsYaml {
edges {
node {
Expand All @@ -61,8 +62,6 @@ exports.createPages = async ({ graphql, actions, reporter }) => {
language
complexity
abstract
openfeedbackId
youtube
}
}
}
Expand All @@ -80,14 +79,10 @@ exports.createPages = async ({ graphql, actions, reporter }) => {
socials {
twitter
github
linkedin
instagram
website
}
}
}
}
{
allBlogsYaml {
edges {
node {
Expand Down
173 changes: 173 additions & 0 deletions src/components/schedule/common.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
import {
Brush,
Cloud,
Code, Computer, DeveloperBoard,
Language,
Lightbulb,
PhoneAndroid,
Security,
SmartToy,
} from "@mui/icons-material";
import { Avatar, Chip, Tooltip } from "@mui/material";
import { graphql, useStaticQuery } from "gatsby";
import React from "react";
import {
Rooms,
Session,
} from "../../../json_schemas/interfaces/schema_sessions";
import { Slot } from "../../../json_schemas/interfaces/schema_slots";
import { Speaker } from "../../../json_schemas/interfaces/schema_speakers";
import { MyLink } from "../../helpers/links";
import "./schedule.scss";

export type PartialSession = Omit<Session, "abstract"> & { slot: Slot };
export type PartialSpeaker = Pick<Speaker, "key" | "name" | "photoUrl">;

export const rooms: Rooms[] = [
"Jules Verne",
"Titan",
"Belem",
"Tour de Bretagne",
"Les Machines",
"Hangar",
"L'Atelier",
];

const tagLabels = {
iot_hardware: {
label: "IoT & Hardware",
icon: <DeveloperBoard />,
},
mobile: {
label: "Mobile",
icon: <PhoneAndroid />,
},
web: {
label: "Web",
icon: <Language />,
},
discovery: {
label: "Discovery",
icon: <Lightbulb />,
},
cloud_devops: {
label: "Cloud & DevOps",
icon: <Cloud />,
},
languages: {
label: "Languages",
icon: <Code />,
},
bigdata_ai: {
label: "BigData & AI",
icon: <SmartToy />,
},
security: {
label: "SECURITY",
icon: <Security />,
},
ux_ui: {
label: "UX / UI",
icon: <Brush />,
},
};
export const Tags: React.FC<{
tags: string[];
color?: "primary" | "secondary";
}> = ({ tags, color = "primary" }) => {
return (
<div className="tags">
{tags.map((tag) => (
<Chip
icon={tagLabels[tag].icon}
key={tag}
label={tagLabels[tag].label}
variant="outlined"
size="small"
color={color}
sx={{ fontSize: "10px" }}
/>
))}
</div>
);
};
export const SessionComplexity: React.FC<{
complexity: "Beginner" | "Intermediate" | "Advanced";
}> = ({ complexity }) => {
return (
<Chip
label={complexity}
variant="outlined"
size="small"
color="secondary"
sx={{ fontSize: "10px" }}
/>
);
};

export const Speakers: React.FC<{ speakers: string[] }> = ({ speakers }) => {
const { allSpeakersYaml } = useStaticQuery(graphql`
query {
allSpeakersYaml {
edges {
node {
key
name
photoUrl
}
}
}
}
`);

const speakersFull: PartialSpeaker[] = speakers.map(
(key) => {
const speaker = allSpeakersYaml.edges.find((edge) => edge.node.key === key);
if (!speaker) {
throw new Error(key + " not found")
}
return speaker.node;
}
);

return (
<div className="speakers">
{speakers.length === 1 ? (
<MyLink to={"/speakers/" + speakersFull[0].key}>
<div className="speaker">
<AvatarSpeaker speaker={speakersFull[0]} />
{speakersFull[0].name}
</div>
</MyLink>
) : (
<>
{speakersFull.map((speaker) => (
<MyLink to={"/speakers/" + speaker.key} key={speaker.key}>
<div className="speaker">
<AvatarSpeaker speaker={speaker} />
</div>
</MyLink>
))}
</>
)}
</div>
);
};

export const AvatarSpeaker: React.FC<{
speaker: PartialSpeaker;
size?: "small" | "medium" | "large";
}> = ({ speaker, size = "small" }) => {
const sizePx = size == "large" ? "150px" : size == "medium" ? "50px" : "24px";
return (
<MyLink to={"/speakers/" + speaker.key}>
<Tooltip title={speaker.name}>
<Avatar
alt={speaker.name}
src={speaker.photoUrl}
sx={{ width: sizePx, height: sizePx, margin: "4px 4px" }}
/>
</Tooltip>
</MyLink>
);
};
62 changes: 62 additions & 0 deletions src/components/schedule/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import { graphql, useStaticQuery } from "gatsby";
import React from "react";
import slots from "../../../data/slots.json";
import { Slot } from "../../../json_schemas/interfaces/schema_slots";
import { PartialSession } from "./common";
import { LargeSchedule } from "./large";
import { MobileSchedule } from "./mobile";
import "./schedule.scss";

const typedSlots = slots.slots as Slot[];

export const Schedule: React.FC<{ day: 1 | 2 }> = ({ day }) => {
const { allSessionsYaml } = useStaticQuery(graphql`
query {
allSessionsYaml {
edges {
node {
key
slot
speakers
tags
talkType
title
room
language
complexity
}
}
}
}
`);

const sessions: PartialSession[] = allSessionsYaml.edges
.map((x) => x.node)
.filter((s) => s.slot.startsWith("day-" + day))
.map((s) => ({
...s,
slot: typedSlots.find((slot) => s.slot === slot.key),
}));

const allHoursSlots: Slot[] = typedSlots //
.filter((s) => s.key.startsWith("day-" + day)) //
.filter((s) => s.type !== "codelab");
const fixedSlots: Slot[] = allHoursSlots.filter((s) =>
["opening", "lunch", "break", "keynote", "party"].includes(s.type)
);

return (
<>
<MobileSchedule
sessions={sessions}
allHoursSlots={allHoursSlots}
fixedSlots={fixedSlots}
/>
<LargeSchedule
sessions={sessions}
allHoursSlots={allHoursSlots}
fixedSlots={fixedSlots}
/>
</>
);
};
Loading

0 comments on commit 55c21f2

Please sign in to comment.