Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(openchallenges): update footer #2307

Merged
merged 3 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@
</div>
<div class="col-4 app-info">
<ul>
<li><img height="55px" [src]="(sageLogo$ | async)?.url" alt="Sage Bionetworks"/></li>
<li>App version: {{ appVersion }}</li>
<li>Data updated on: {{ dataUpdatedOn }}</li>
<li>Code licensed under Apache License 2.0</li>
<li>Documentation licensed under CC-BY 4.0</li>
</ul>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ footer {

@media only screen and (max-width: constants.$md-breakpoint) {
footer {
height: 370px;
height: 410px;
}
.about-oc,
.app-info,
Expand Down
19 changes: 17 additions & 2 deletions libs/openchallenges/ui/src/lib/footer/footer.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { Component, Input } from '@angular/core';
import { Component, Input, OnInit } from '@angular/core';
import { CommonModule } from '@angular/common';
import {
Image,
ImageService,
} from '@sagebionetworks/openchallenges/api-client-angular';
import { Observable } from 'rxjs';
import { RouterModule } from '@angular/router';

@Component({
Expand All @@ -9,10 +14,20 @@ import { RouterModule } from '@angular/router';
templateUrl: './footer.component.html',
styleUrls: ['./footer.component.scss'],
})
export class FooterComponent {
export class FooterComponent implements OnInit {
public sageLogo$: Observable<Image> | undefined;

@Input({ required: true }) appVersion = '';
@Input({ required: true }) dataUpdatedOn = '';
@Input({ required: true }) privacyPolicyUrl = '';
@Input({ required: true }) termsOfUseUrl = '';
@Input({ required: true }) apiDocsUrl = '';

constructor(private imageService: ImageService) {}

ngOnInit() {
this.sageLogo$ = this.imageService.getImage({
objectKey: 'logo/sage-bionetworks-alt-white.svg',
});
}
}