Skip to content

Commit

Permalink
fix affichage schedule + suppression jfrog
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtyMaury committed Sep 1, 2024
1 parent a0051bf commit 5534c73
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 53 deletions.
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,11 @@
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
"[scss]": {
"editor.defaultFormatter": "vscode.css-language-features"
}
}
5 changes: 0 additions & 5 deletions data/partners.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,6 @@
"id": "isilog",
"website": "https://www.isilog.com"
},
{
"title": "JFrog",
"id": "jfrog",
"website": "https://jfrog.com/fr/"
},
{
"title": "Kaïbee",
"id": "kaibee",
Expand Down
12 changes: 7 additions & 5 deletions src/components/schedule/common.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export const Speakers: React.FC<{ speakers: string[] }> = ({ speakers }) => {
{speakers.length === 1 ? (
<MyLink to={"/speakers/" + speakersFull[0].key}>
<div className="speaker">
<AvatarSpeaker speaker={speakersFull[0]} />
<AvatarSpeaker speaker={speakersFull[0]} noLink/>
{speakersFull[0].name}
</div>
</MyLink>
Expand All @@ -145,7 +145,7 @@ export const Speakers: React.FC<{ speakers: string[] }> = ({ speakers }) => {
{speakersFull.map((speaker) => (
<MyLink to={"/speakers/" + speaker.key} key={speaker.key}>
<div className="speaker">
<AvatarSpeaker speaker={speaker} />
<AvatarSpeaker speaker={speaker} noLink/>
</div>
</MyLink>
))}
Expand All @@ -158,17 +158,19 @@ export const Speakers: React.FC<{ speakers: string[] }> = ({ speakers }) => {
export const AvatarSpeaker: React.FC<{
speaker: PartialSpeaker;
size?: "small" | "medium" | "large";
}> = ({ speaker, size = "small" }) => {
noLink?: boolean
}> = ({ speaker, size = "small", noLink }) => {
const sizePx = size == "large" ? "150px" : size == "medium" ? "50px" : "24px";
const Wrapper = noLink ? React.Fragment : ({children}) => <MyLink to={"/speakers/" + speaker.key}>{children}</MyLink>;
return (
<MyLink to={"/speakers/" + speaker.key}>
<Wrapper>
<Tooltip title={speaker.name}>
<Avatar
alt={speaker.name}
src={speaker.photoUrl}
sx={{ width: sizePx, height: sizePx, margin: "4px 4px" }}
/>
</Tooltip>
</MyLink>
</Wrapper>
);
};
22 changes: 5 additions & 17 deletions src/components/schedule/large.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const LargeSchedule: React.FC<{
<FixedSlot slot={slot} key={slot.key} />
))}
{sessionsByHours[hourSlot.start].map((session) => (
<Session session={session} key={session.key} />
<SessionInfo session={session} key={session.key} />
))}
</React.Fragment>
);
Expand Down Expand Up @@ -106,30 +106,18 @@ const Room: React.FC<{ name: string }> = ({ name }) => {
);
};

const Session: React.FC<{ session: PartialSession }> = ({ session }) => {
const SessionInfo: React.FC<{ session: PartialSession }> = ({ session }) => {
const gridColumn = columnFromRoom(session.room);
return (
<MyLink
key={session.title}
to={"/sessions/" + session.key}
className="slot session"
<div
className={classNames("slot session-info", session.cancelled && "cancelled")}
style={{
gridColumn,
gridRow: slotToRow(session.slot),
zIndex: 1,
}}
>
<SessionInfo session={session} />
</MyLink>
);
};

const SessionInfo: React.FC<{ session: PartialSession }> = ({ session }) => {
return (
<div
className={classNames("session-info", session.cancelled && "cancelled")}
>
<span className="session-title">{session.title}</span>
<MyLink to={"/sessions/" + session.key}><span className="session-title">{session.title}</span></MyLink>
<span className="sr-only">Salle {session.room}</span>
<div className="session-info-bottom">
<Stack direction="row" alignItems="center" spacing={1}>
Expand Down
18 changes: 3 additions & 15 deletions src/components/schedule/mobile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const MobileSchedule: React.FC<{
<React.Fragment key={hour}>
<Hour hour={hour} />
{sessionsByHours[hour].map((session) => (
<Session session={session} key={session.key} />
<SessionInfo session={session} key={session.key} />
))}
{fixedSlotsByHours[hour].map((slot) => (
<FixedSlot slot={slot} key={slot.key} />
Expand All @@ -61,24 +61,12 @@ const FixedSlot: React.FC<{ slot: Slot }> = ({ slot }) => {
);
};

const Session: React.FC<{ session: PartialSession }> = ({ session }) => {
return (
<MyLink
key={session.title}
to={"/sessions/" + session.key}
className="slot session"
>
<SessionInfo session={session} />
</MyLink>
);
};

const SessionInfo: React.FC<{ session: PartialSession }> = ({ session }) => {
return (
<div
className={classNames("session-info", session.cancelled && "cancelled")}
className={classNames("slot session-info", session.cancelled && "cancelled")}
>
<span className="session-title">{session.title}</span>
<MyLink to={"/sessions/" + session.key}><span className="session-title">{session.title}</span></MyLink>
<Stack spacing={2} alignItems="center" direction="row">
{session.tags && <Tags tags={session.tags}/>}
<Flag lang={session.language} size="small" />
Expand Down
47 changes: 38 additions & 9 deletions src/components/schedule/schedule.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

&.room {
align-items: center;

&:not(:first-of-type)::before {
content: "";
height: 50%;
Expand All @@ -46,6 +47,7 @@
margin-left: -10px;
width: 10px;
}

h3 {
width: 100%;
font-weight: 600;
Expand All @@ -54,11 +56,6 @@
}
}

&.session {
background-color: var(--tertiary);
color: var(--primary-dark);
}

&.fixed {
align-items: center;
}
Expand All @@ -67,34 +64,59 @@
&.party {
background-color: var(--primary);
}

&.break {
// background-color: #75743c;
border: 1px solid white;
}

&.lunch,
&.opening {
background: linear-gradient(to right, #fdcc79, #e04545);

h3 {
color: var(--primary-dark);
font-weight: 600;
}
}

.session-info {
&.session-info {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: flex-start;
position: relative;
background-color: var(--tertiary);
color: var(--primary-dark);

&.cancelled {
opacity: 50%;

.session-title {
text-decoration: line-through;
}
}

> a {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: flex-start;

&::after {
content: "";
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
}
}

.session-title {
font-size: 13px;
text-align: left;
Expand Down Expand Up @@ -125,8 +147,9 @@
display: flex;
justify-content: space-evenly;
align-items: center;
padding: 0 10px;
font-size: 10px;
position: relative;
color: var(--tertiary);
}
}
}
Expand All @@ -145,17 +168,20 @@
vertical-align: middle;
margin-top: 20px;
}

.slot {
min-height: 80px;

.session-title {
font-size: 13px;
text-align: left;
}

.session-info-middle {
flex-direction: row;
justify-content: start;
align-items: center;

.speakers {
margin-left: 10px;
}
Expand All @@ -169,18 +195,21 @@

&:not(.current) {
color: var(--tertiary-darker);

&:hover {
color: inherit;
}

background-color: var(--primary);
}

&.current {
background-color: var(--secondary);
}
}


.tags .MuiChip-iconSmall {
font-size: 14px !important ;
font-size: 14px !important;
margin-left: 4px;
}
}
2 changes: 1 addition & 1 deletion src/components/session/sessionPageTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ const SpeakerCard: React.FC<{ speakerKey }> = ({ speakerKey }) => {
alignItems="center"
sx={{ minHeight: "75px", paddingLeft: "10px" }}
>
<AvatarSpeaker speaker={speaker} size="medium" />
<AvatarSpeaker speaker={speaker} size="medium" noLink />
<Stack direction="column" spacing={1} justifyContent="center">
<Typography variant="h4" color="inherit" style={{ color: "white" }}>
{speaker.name}
Expand Down
2 changes: 1 addition & 1 deletion src/layout/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ a {
.secondary,
.primary-dark {
a {
color: var(--tertiary);
// color: var(--tertiary);
font-weight: 500;
}
}
Expand Down

0 comments on commit 5534c73

Please sign in to comment.