Skip to content

Commit

Permalink
feat(ui): add platform logos to landing page (#2148)
Browse files Browse the repository at this point in the history
* add new section under Organizations

* update text; update layout

* typo

* remove platforms section from challenge-host-list

* add new platform component

* update padding

* update platform count

* add svg of platform logos

* add responsiveness

* add bold emphasis on section titles

* add CodaLab as platform

* text update

* remove OpenML and PapersWithCode as challenge platforms

* remove subtexts

* move list of platform logos to s3

* fix test

* add sub-texts back in

* update spacing

* update description

* fix layout

* use png image instead of svg

* update description pt 2
  • Loading branch information
vpchung authored Oct 2, 2023
1 parent f84d334 commit 45b5a7d
Show file tree
Hide file tree
Showing 9 changed files with 81 additions and 3 deletions.
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>
OC provides a catalog of various platforms used by the biomedical and research community.
These platforms enable participants to benchmark their computational tools and algorithms.
</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,12 @@
@use 'libs/openchallenges/styles/src/lib/_constants' as constants;

#platforms {
max-width: 1210px;
margin: 0 auto;
padding: 68px 0 88px;

img {
width: 100%;
padding: 15px 8px 0;
}
}
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();
});
});
26 changes: 26 additions & 0 deletions libs/openchallenges/home/src/lib/platforms/platforms.component.ts
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.png',
});
}
}

0 comments on commit 45b5a7d

Please sign in to comment.