Skip to content
This repository was archived by the owner on Jan 29, 2025. It is now read-only.

Commit d04b26b

Browse files
committed
Added the right rendering to keynotes on website.
1 parent 4257131 commit d04b26b

File tree

5 files changed

+38
-16
lines changed

5 files changed

+38
-16
lines changed

src/app/landing-page/schedule/schedule.component.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,17 @@ <h6 class="highlight">Keynotes</h6>
9494
</strong>
9595
</mat-card-title>
9696
<mat-card-subtitle *ngIf="session.speakers.length > 0 && session.speakers[0]">
97-
<p>{{session.speakers[0].name}}</p>
97+
<!-- FIXME
98+
-- Every check for session.speakers.length > 1 is checking if a keynote is a panel
99+
-- For keynotes with more than 1 speaker and arent a panel this needs to be revisited
100+
-->
101+
<p>{{session.speakers.length > 1 ? '' : session.speakers[0].name}}</p>
98102
</mat-card-subtitle>
99103
</mat-card-header>
100104

101105
<mat-card-content>
102106
<h6 class=" title">
103-
<strong *ngFor="let speaker of session.speakers" class="highlight speaker-name">
104-
{{session.name.split(' - ')[0]}}
105-
</strong>
106-
-- {{session.name.split(' - ')[1]}}
107+
{{session.name}}
107108
</h6>
108109
<div class="panel-collapse collapse in schedule-item-body">
109110
<article>

src/app/landing-page/schedule/schedule.component.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,13 @@ export class ScheduleComponent implements OnInit, OnChanges {
8585
}
8686

8787
if (val.kind === 'Keynote') {
88+
// FIXME
89+
// Sets the session image to a static image in digital ocean for the panel (only case where seapers.len > 1 !!! FOR NOW !!!)
90+
// Change this link if panel image changes
91+
// If a normal talk has more than 1 speaker this need to be revisited
92+
if (val.speakers.length > 1){
93+
val.img = "https://static.sinfo.org/static/31-sinfo/websiteImages/panel-31.png"
94+
}
8895
tempSchedule[registeredDays].sessions[val.kind].push(val)
8996
} else {
9097
let place = (val.place === 'Room 2') ? 'sala2' : 'sala1'

src/app/session/session.component.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ p {
2323
max-height: 300px;
2424
}
2525

26+
.panelSpeaker-img {
27+
border-radius: 15px;
28+
max-height: 300px;
29+
width: 20dvh;
30+
height: 20dvh;
31+
object-fit: cover;
32+
}
33+
2634
.session-details h5 {
2735
margin: 15px auto;
2836
}

src/app/session/session.component.html

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,16 @@ <h3 class="title">{{session.kind}}</h3>
6464
</div>
6565
</div>
6666

67-
<div class="row session-details" *ngIf="session.kind === 'Keynote' && speaker">
68-
<div class="col-sm-3 col-xs-12">
69-
<img class="speaker-img" src='{{speaker.img}}'>
70-
</div>
71-
72-
<div class="col-sm-9 col-xs-12 align-left justify">
73-
<h5 class="name">{{speaker.name}}</h5>
74-
<h5>{{speaker.title}}</h5>
67+
<div class="row session-details" *ngIf="session.kind === 'Keynote' && speakers.length > 0">
68+
<div *ngFor="let speaker of speakers; let iSession=index">
69+
<div class="col-sm-3 col-xs-12">
70+
<img [ngClass]="speakers.length > 1 ? 'panelSpeaker-img' : 'speaker-img'" src='{{speaker.img}}'>
71+
</div>
72+
73+
<div class="col-sm-9 col-xs-12 align-left justify">
74+
<h5 class="name">{{speaker.name}}</h5>
75+
<h5>{{speaker.title}}</h5>
76+
</div>
7577
</div>
7678
</div>
7779

src/app/session/session.component.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import { User } from '../user/user.model';
3535

3636
export class SessionComponent implements OnInit {
3737
session: Session
38-
speaker: Speaker
38+
speakers: Speaker[] = []
3939
description: SafeHtml
4040
user: User
4141
showMore = false
@@ -80,8 +80,12 @@ export class SessionComponent implements OnInit {
8080
}
8181

8282
getSpeaker(session: Session): void {
83-
this.speakerService.getSpeaker(session.speakers[0]['id'])
84-
.subscribe(speaker => this.speaker = speaker)
83+
for(let sessionSpeaker of session.speakers){
84+
this.speakerService.getSpeaker(sessionSpeaker['id'])
85+
.subscribe(speaker => {
86+
this.speakers.push(speaker);
87+
})
88+
}
8589
}
8690

8791
onSelect(id: string): void {

0 commit comments

Comments
 (0)