Skip to content

Commit

Permalink
Rearrange logos (#799)
Browse files Browse the repository at this point in the history
dockstore/dockstore#2911

Separate languages and partners into their own rows.
  • Loading branch information
coverbeck authored Sep 18, 2019
1 parent e922503 commit 75d3921
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
13 changes: 12 additions & 1 deletion src/app/sponsors/sponsors.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,18 @@ <h5 style="color:#21335B">In Affiliation With</h5>
</div>
</div>
</div>
<div *ngIf="showSecondRow" class="row text-center">
<div *ngIf="showAdditionalRows" class="row text-center">
<h5 style="color:#21335B">Workflow Languages</h5>
<br />
<div fxLayout="row wrap" fxLayoutAlign="space-around stretch">
<div *ngFor="let partner of languages" class="pb-5 px-1">
<a href="{{ partner.url }}" target="_blank">
<img [src]="partner.current" />
</a>
</div>
</div>
</div>
<div *ngIf="showAdditionalRows" class="row text-center">
<h5 style="color:#21335B">Works With</h5>
<br />
<div fxLayout="row wrap" fxLayoutAlign="space-around stretch">
Expand Down
8 changes: 5 additions & 3 deletions src/app/sponsors/sponsors.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ import { SponsorsService } from './sponsors.service';
export class SponsorsComponent extends Base implements OnInit {
public sponsors: Sponsor[];
public partners: Sponsor[];
public showSecondRow = false;
public languages: Sponsor[];
public showAdditionalRows = false;

constructor(private sponsorsService: SponsorsService, private location: Location, private router: Router) {
super();
Expand All @@ -49,15 +50,16 @@ export class SponsorsComponent extends Base implements OnInit {
// Initialize sponsors and partners
this.sponsors = this.sponsorsService.getSponsors();
this.partners = this.sponsorsService.getPartners();
this.languages = this.sponsorsService.getLanguages();
}

hideSecondRow() {
// Hide the second row if not on the home page
const currentPath = this.location.prepareExternalUrl(this.location.path());
if (currentPath === '/') {
this.showSecondRow = true;
this.showAdditionalRows = true;
} else {
this.showSecondRow = false;
this.showAdditionalRows = false;
}
}
}
11 changes: 9 additions & 2 deletions src/app/sponsors/sponsors.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@ export class SponsorsService {
// new Sponsor('broad.png', new URL('https://www.broadinstitute.org/'))
];

private partners: Sponsor[] = [
private languages: Sponsor[] = [
new Sponsor('cwl.png', new URL('https://www.commonwl.org')),
new Sponsor('wdl.png', new URL('http://openwdl.org')),
new Sponsor('nfl.png', new URL('https://www.nextflow.io')),
new Sponsor('nfl.png', new URL('https://www.nextflow.io'))
];

private partners: Sponsor[] = [
new Sponsor('dnastack.png', new URL('https://dnastack.com')),
new Sponsor('sevenbridges.png', new URL('https://www.sevenbridges.com'))
];
Expand All @@ -41,4 +44,8 @@ export class SponsorsService {
getPartners(): Sponsor[] {
return this.partners;
}

getLanguages(): Sponsor[] {
return this.languages;
}
}

0 comments on commit 75d3921

Please sign in to comment.