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(ui): add platform logos to landing page #2148

Merged
merged 24 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from 18 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 @@ -2,7 +2,10 @@
<div class="container">
<div class="text-center">
<h3 class="section-title">Discover Organizations</h3>
It takes a village to run a challenge - see who has been contributing their time and effort.
<p>
It takes a village to run a challenge. Explore from 300+ organizations who contributed their
time and effort.
</p>
</div>
<div class="card-group">
<openchallenges-organization-card
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
justify-items: center;
}
#organizations {
padding: 88px 0;
padding-top: 88px;

.see-more {
margin-top: 18px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ <h1>
<div class="metrics-text-box">
<h2
*ngIf="orgCount$ | async as orgCount"
[countUp]="16"
[countUp]="12"
[reanimateOnClick]="reanimateOnClick"
>
0
Expand Down
1 change: 1 addition & 0 deletions libs/openchallenges/home/src/lib/home.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ <h4>
<openchallenges-random-challenge-list *sageAppShellNoRender/>
<openchallenges-challenge-registration *sageAppShellNoRender/>
<openchallenges-challenge-host-list *sageAppShellNoRender/>
<openchallenges-platforms *sageAppShellNoRender/>
<openchallenges-sponsor-list *sageAppShellNoRender/>
</main>

Expand Down
2 changes: 2 additions & 0 deletions libs/openchallenges/home/src/lib/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { ChallengeRegistrationComponent } from './challenge-registration/challen
import { ChallengeSearchComponent } from './challenge-search/challenge-search.component';
import { FeaturedChallengeListComponent } from './featured-challenge-list/featured-challenge-list.component';
import { SponsorListComponent } from './sponsor-list/sponsor-list.component';
import { PlatformsComponent } from './platforms/platforms.component';
import { StatisticsViewerComponent } from './statistics-viewer/statistics-viewer.component';
import { TopicsViewerComponent } from './topics-viewer/topics-viewer.component';
import { getSeoData } from './home-seo-data';
Expand All @@ -27,6 +28,7 @@ import { RandomChallengeListComponent } from './random-challenge-list/random-cha
FeaturedChallengeListComponent,
RandomChallengeListComponent,
SponsorListComponent,
PlatformsComponent,
StatisticsViewerComponent,
TopicsViewerComponent,
FooterComponent,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<section id="platforms">
<div class="container text-center">
<h3 class="section-title">Platforms</h3>
<p>
The OC features challenges from various platforms used by the biomedical and research community
to evaluate and compare computational algorithms.
vpchung marked this conversation as resolved.
Show resolved Hide resolved
</p>
<div class="row">
<img [src]="(platforms$ | async)?.url" alt="Platforms on OpenChallenges" />
</div>
</div>
</section>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@use 'libs/openchallenges/styles/src/lib/_constants' as constants;

#platforms {
padding: 68px 0 88px;

img {
margin: 0 auto;
padding: 8px 0;
}
}

@media only screen and (max-width: constants.$lg-breakpoint) {
#platforms img {
width: 100%;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { PlatformsComponent } from './platforms.component';
import { HttpClientModule } from '@angular/common/http';

describe('PlatformsComponent', () => {
let component: PlatformsComponent;
let fixture: ComponentFixture<PlatformsComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [HttpClientModule, PlatformsComponent],
}).compileComponents();

fixture = TestBed.createComponent(PlatformsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { Component, OnInit } from '@angular/core';
import { CommonModule } from '@angular/common';
import {
Image,
ImageService,
} from '@sagebionetworks/openchallenges/api-client-angular';
import { Observable } from 'rxjs';

@Component({
selector: 'openchallenges-platforms',
standalone: true,
imports: [CommonModule],
templateUrl: './platforms.component.html',
styleUrls: ['./platforms.component.scss'],
})
export class PlatformsComponent implements OnInit {
public platforms$: Observable<Image> | undefined;

constructor(private imageService: ImageService) {}

ngOnInit() {
this.platforms$ = this.imageService.getImage({
objectKey: 'logo/platforms.svg',
});
}
}