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

Commit d9a93fe

Browse files
authored
Merge pull request #427 from sinfo/misc/andre
Misc improvements and fixes
2 parents 4aa4b23 + 21bbf18 commit d9a93fe

File tree

10 files changed

+48
-26
lines changed

10 files changed

+48
-26
lines changed

src/app/events/event.service.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ export class EventService {
6161
}
6262
}
6363

64+
getCalendarUrl(): Observable<string> {
65+
return this.http.get<string>(`${environment.cannonUrl}/calendar`, { responseType: 'text' as 'json' })
66+
.pipe(
67+
catchError(this.handleError<string>('getCalendarUrl', ''))
68+
)
69+
}
70+
6471
/**
6572
* Handle Http operation that failed.
6673
* Let the app continue.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ <h6>About Us</h6>
401401
SINFO is a college student and non-profitable organization responsible for the planning of one of
402402
the
403403
biggest Tech events
404-
in Portugal. It’s an annual conference that takes place at the Alameda Campus of Técnico Lisboa, in
404+
in Portugal. It’s an annual conference that takes place at Técnico Innovation Center, in
405405
the
406406
capital
407407
city of Portugal, Lisbon. We had a record breaking attendance of participants last year, achievement

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ <h3>Schedule</h3>
99
<br />
1010

1111
<br />
12-
<a class="btn btn-sm btn-outline-clr ics" href="https://deck.sinfo.org/calendar.ics" target="_blank" style="margin-bottom: 50px">
12+
<a *ngIf="calendarUrl"
13+
class="btn btn-sm btn-outline-clr ics" href={{calendarUrl}} target="_blank" style="margin-bottom: 50px">
1314
Download calendar
1415
<span class="fa fa-download icon"></span>
1516
</a>

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { Router } from '@angular/router'
33

44
import { Session } from '../../session/session.model'
55
import { SessionService } from '../../session/session.service'
6+
import { EventService } from '../../events/event.service'
67

78
import { environment } from '../../../environments/environment'
89

@@ -22,14 +23,17 @@ export class ScheduleComponent implements OnInit, OnChanges {
2223

2324
sessions: Session[]
2425
private schedule
26+
calendarUrl: string
2527

2628
constructor(
2729
private sessionService: SessionService,
30+
private eventService: EventService,
2831
private router: Router,
2932
) { }
3033

3134
ngOnInit() {
3235
this.getSessions()
36+
this.getCalendarUrl()
3337
this.showOrHideDropdown()
3438
}
3539

@@ -45,6 +49,11 @@ export class ScheduleComponent implements OnInit, OnChanges {
4549
})
4650
}
4751

52+
getCalendarUrl(): void {
53+
this.eventService.getCalendarUrl()
54+
.subscribe(url => this.calendarUrl = url)
55+
}
56+
4857
createSchedule(sessions: Session[]): void {
4958
let tempSchedule = []
5059
let registeredDays = -1

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ <h5>Gold Sponsors</h5>
4040
<hr>
4141
<h5>Silver Sponsors</h5>
4242
<div class="row" *ngIf="silvers.length">
43-
<mat-card class="example-card speaker-card silver cursor-pointer" *ngFor="let silver of silvers" (click)="onSelect(silver)"
43+
<mat-card class="example-card speaker-card silver cursor-pointer" *ngFor="let silver of silvers" (click)="visitSite(silver)"
4444
[ngStyle]="{'background-image': 'url(' + silver.img + ')' }">
4545
</mat-card>
4646
</div>

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,8 @@ export class SponsorsComponent implements OnInit {
7676
this.router.navigate(['/sponsors', sponsor.id])
7777
}
7878

79+
visitSite(sponsor: Sponsor) {
80+
if (sponsor.site) window.open(sponsor.site, '_blank')
81+
}
82+
7983
}

src/app/session/session.component.html

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,12 @@ <h3 class="title">{{session.kind}}</h3>
6666

6767
<div class="row session-details" *ngIf="session.kind === 'Keynote' && speaker">
6868
<div class="col-sm-3 col-xs-12">
69-
<a (click)="onSelect(speaker.id)">
70-
<img class="speaker-img" src='{{speaker.img}}'>
71-
</a>
69+
<img class="speaker-img" src='{{speaker.img}}'>
7270
</div>
7371

7472
<div class="col-sm-9 col-xs-12 align-left justify">
75-
<a (click)="onSelect(speaker.id)">
76-
<h5 class="name">{{speaker.name}}</h5>
77-
<h5>{{speaker.title}}</h5>
78-
</a>
73+
<h5 class="name">{{speaker.name}}</h5>
74+
<h5>{{speaker.title}}</h5>
7975
</div>
8076
</div>
8177

@@ -87,23 +83,23 @@ <h5>{{speaker.title}}</h5>
8783
<div class="col-md-7 col-sm-12 align-left justify">
8884
<h5 class="name">{{session.name}}</h5>
8985
<!--TODO Add the rest of the information-->
90-
<div class="description-wrapper" *ngIf="session.description">
91-
<p @myInsertRemoveTrigger class="description" *ngIf="showMore || session.description.length <= 300">
92-
{{ session.description }}
93-
<span *ngIf="showMore" (click)="showMore = !showMore" class="seeMore">
94-
<b> see less </b>
95-
</span>
96-
</p>
97-
<p @myInsertRemoveTrigger class="description" *ngIf="!showMore && session.description.length > 300">
98-
{{ session.description | slice:0:300 }}
99-
<span *ngIf="!showMore" (click)="showMore = !showMore" class="seeMore">
100-
<b>... see more </b>
101-
</span>
102-
</p>
103-
</div>
10486
</div>
10587
</div>
10688

89+
<div class="description-wrapper" *ngIf="session.description">
90+
<p @myInsertRemoveTrigger class="description" *ngIf="showMore || session.description.length <= 300">
91+
{{ session.description }}
92+
<span *ngIf="showMore" (click)="showMore = !showMore" class="seeMore">
93+
<b> see less </b>
94+
</span>
95+
</p>
96+
<p @myInsertRemoveTrigger class="description" *ngIf="!showMore && session.description.length > 300">
97+
{{ session.description | slice:0:300 }}
98+
<span *ngIf="!showMore" (click)="showMore = !showMore" class="seeMore">
99+
<b>... see more </b>
100+
</span>
101+
</p>
102+
</div>
107103

108104
<!--TODO Fetch users checked-in -->
109105

src/app/sponsor/sponsor.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161

6262
<div class="row speaker-section">
6363
<div class="col-sm-3 col-xs-12">
64-
<img src='{{sponsor.img}}'
64+
<img src='{{sponsor.img}}' (click)="visitSite(sponsor)"
6565
onerror="this.src='https://sinfo.ams3.digitaloceanspaces.com/static/25-sinfo/speakers/hacky.png'">
6666
</div>
6767

src/app/sponsor/sponsor.component.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { Company } from '../company/company.model';
1212
import { CompanyService } from '../company/company.service';
1313
import { EventService } from './../events/event.service'
1414
import { Event } from '../events/event.model';
15+
import { Sponsor } from '../landing-page/sponsors/sponsor.model';
1516

1617
@Component({
1718
selector: 'app-sponsor',
@@ -75,5 +76,9 @@ export class SponsorComponent implements OnInit {
7576
this.router.navigate(['/sessions', id])
7677
}
7778

79+
visitSite(sponsor: Sponsor) {
80+
if (sponsor.site) window.open(sponsor.site, '_blank')
81+
}
82+
7883
}
7984

src/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<meta name="og:locale" content="en_US" />
3939
<meta name="fb:admins" content="134758406571284" />
4040
<meta name="og:type" content="website" />
41-
<meta name="og:image" content="assets/img/PowerOn.png" />
41+
<meta name="og:image" content="https://static.sinfo.org/static/31-sinfo/websiteImages/previewLogo-SINFO31.png" />
4242

4343
<!-- Favicons -->
4444
<link rel="shortcut icon" href="favicon.ico" />

0 commit comments

Comments
 (0)