-
+
Overview
-
+
+ Challenge Details
+
+
Organizers
-
+
Contributors
>
-->
diff --git a/libs/openchallenges/challenge/src/lib/challenge.component.ts b/libs/openchallenges/challenge/src/lib/challenge.component.ts
index cbe2e25dd4..fd51974b28 100644
--- a/libs/openchallenges/challenge/src/lib/challenge.component.ts
+++ b/libs/openchallenges/challenge/src/lib/challenge.component.ts
@@ -1,20 +1,20 @@
import { Component, OnInit } from '@angular/core';
-import { ActivatedRoute, ParamMap, Router } from '@angular/router';
+import { ActivatedRoute, Router } from '@angular/router';
import {
Challenge,
ChallengeService,
} from '@sagebionetworks/openchallenges/api-client-angular';
import {
catchError,
- map,
+ // map,
Observable,
of,
- Subscription,
+ // Subscription,
switchMap,
throwError,
} from 'rxjs';
-import { Tab } from './tab.model';
-import { CHALLENGE_TABS } from './challenge-tabs';
+// import { Tab } from './tab.model';
+// import { CHALLENGE_TABS } from './challenge-tabs';
import { Avatar } from '@sagebionetworks/openchallenges/ui';
import { ConfigService } from '@sagebionetworks/openchallenges/config';
import {
@@ -35,10 +35,10 @@ export class ChallengeComponent implements OnInit {
// progressValue = 0;
// remainDays!: number | undefined;
challengeAvatar!: Avatar;
- tabs = CHALLENGE_TABS;
- tabKeys: string[] = Object.keys(this.tabs);
- activeTab!: Tab;
- private subscriptions: Subscription[] = [];
+ // tabs = CHALLENGE_TABS;
+ // tabKeys: string[] = Object.keys(this.tabs);
+ // activeTab!: Tab;
+ // private subscriptions: Subscription[] = [];
constructor(
private activatedRoute: ActivatedRoute,
@@ -89,14 +89,14 @@ export class ChallengeComponent implements OnInit {
// : undefined;
});
- const activeTabSub = this.activatedRoute.queryParamMap
- .pipe(
- map((params: ParamMap) => params.get('tab')),
- map((key) => (key === null ? 'overview' : key))
- )
- .subscribe((key) => (this.activeTab = this.tabs[key]));
+ // const activeTabSub = this.activatedRoute.queryParamMap
+ // .pipe(
+ // map((params: ParamMap) => params.get('tab')),
+ // map((key) => (key === null ? 'overview' : key))
+ // )
+ // .subscribe((key) => (this.activeTab = this.tabs[key]));
- this.subscriptions.push(activeTabSub);
+ // this.subscriptions.push(activeTabSub);
}
// calcDays(startDate: string, endDate: string): number {
From 6030c6c959b7fe0aa7f53de7f203b191d88db39d Mon Sep 17 00:00:00 2001
From: verena <9377970+vpchung@users.noreply.github.com>
Date: Mon, 7 Aug 2023 20:09:58 +0000
Subject: [PATCH 02/17] move profile footer out to main content div
---
.../challenge/src/lib/_challenge-theme.scss | 9 ++++++++
.../_challenge-overview-theme.scss | 7 ------
.../challenge-overview.component.html | 23 -------------------
.../src/lib/challenge.component.html | 13 +++++++++--
.../src/lib/challenge.component.scss | 8 +++++++
5 files changed, 28 insertions(+), 32 deletions(-)
diff --git a/libs/openchallenges/challenge/src/lib/_challenge-theme.scss b/libs/openchallenges/challenge/src/lib/_challenge-theme.scss
index f249285579..cfc5f3d627 100644
--- a/libs/openchallenges/challenge/src/lib/_challenge-theme.scss
+++ b/libs/openchallenges/challenge/src/lib/_challenge-theme.scss
@@ -63,6 +63,12 @@
.text-grey {
color: rgba(black, 0.38);
}
+ .created-updated-dates {
+ color: mat.get-color-from-palette($figma, dl-color-default-navbardark);
+ }
+ hr {
+ background-color: map.get($figma, dl-color-default-primary1);
+ }
@media (max-width: 479px) {
.profile-pic {
@@ -83,6 +89,9 @@
font-family: 'Lato', sans-serif !important;
}
}
+ .created-updated-dates {
+ font-style: italic !important;
+ }
@media screen and (max-width: 641px) {
#profile-details > h2 {
font-size: 32px;
diff --git a/libs/openchallenges/challenge/src/lib/challenge-overview/_challenge-overview-theme.scss b/libs/openchallenges/challenge/src/lib/challenge-overview/_challenge-overview-theme.scss
index b39ff2f066..a1719d5ff8 100644
--- a/libs/openchallenges/challenge/src/lib/challenge-overview/_challenge-overview-theme.scss
+++ b/libs/openchallenges/challenge/src/lib/challenge-overview/_challenge-overview-theme.scss
@@ -7,10 +7,6 @@
$accent: map.get($config, 'accent');
$figma: map.get($config, 'figma');
- .created-updated-dates {
- color: mat.get-color-from-palette($figma, dl-color-default-navbardark);
- }
-
.text-grey {
color: rgba(black, 0.38);
}
@@ -20,9 +16,6 @@
.text-right {
font-weight: 600;
}
- .created-updated-dates {
- font-style: italic !important;
- }
}
@mixin theme($theme) {
diff --git a/libs/openchallenges/challenge/src/lib/challenge-overview/challenge-overview.component.html b/libs/openchallenges/challenge/src/lib/challenge-overview/challenge-overview.component.html
index b9f9deed9f..deec47b7fc 100644
--- a/libs/openchallenges/challenge/src/lib/challenge-overview/challenge-overview.component.html
+++ b/libs/openchallenges/challenge/src/lib/challenge-overview/challenge-overview.component.html
@@ -75,27 +75,4 @@
Challenge Details
-
-
-
- Added to the OC on {{ challenge.createdAt }} and last modified on {{ challenge.updatedAt }} //
- See something missing or not up-to-date?
- Suggest an edit here!
-
diff --git a/libs/openchallenges/challenge/src/lib/challenge.component.html b/libs/openchallenges/challenge/src/lib/challenge.component.html
index bf5f592089..e7788c7f18 100644
--- a/libs/openchallenges/challenge/src/lib/challenge.component.html
+++ b/libs/openchallenges/challenge/src/lib/challenge.component.html
@@ -61,9 +61,18 @@
+
+
+ Added to the OC on {{ challenge.createdAt }} and last modified on {{ challenge.updatedAt }} //
+ See something missing or not up-to-date?
+ Suggest an edit here!
- -->
-
+
diff --git a/libs/openchallenges/challenge/src/lib/challenge.component.scss b/libs/openchallenges/challenge/src/lib/challenge.component.scss
index 272a6a191d..cff85254d1 100644
--- a/libs/openchallenges/challenge/src/lib/challenge.component.scss
+++ b/libs/openchallenges/challenge/src/lib/challenge.component.scss
@@ -4,6 +4,14 @@
padding: 0 12px;
}
+hr {
+ border: 0;
+ clear:both;
+ display:block;
+ width: 100%;
+ height: 1px;
+}
+
@media screen and (min-width: constants.$md-breakpoint) {
.main {
max-width: 1120px;
From 46c1d9777cf57a20d63da4d5fcd648ae0c298864 Mon Sep 17 00:00:00 2001
From: verena <9377970+vpchung@users.noreply.github.com>
Date: Mon, 7 Aug 2023 20:10:35 +0000
Subject: [PATCH 03/17] html cleanup
---
.../lib/challenge-overview/challenge-overview.component.html | 4 ----
1 file changed, 4 deletions(-)
diff --git a/libs/openchallenges/challenge/src/lib/challenge-overview/challenge-overview.component.html b/libs/openchallenges/challenge/src/lib/challenge-overview/challenge-overview.component.html
index deec47b7fc..42a09d9f9f 100644
--- a/libs/openchallenges/challenge/src/lib/challenge-overview/challenge-overview.component.html
+++ b/libs/openchallenges/challenge/src/lib/challenge-overview/challenge-overview.component.html
@@ -24,10 +24,6 @@
DOI |
From 416b39cdf5adb8d631c97e1e089327bb625a0b5d Mon Sep 17 00:00:00 2001
From: verena <9377970+vpchung@users.noreply.github.com>
Date: Mon, 7 Aug 2023 22:08:14 +0000
Subject: [PATCH 04/17] remove main tag
---
.../challenge-contributors.component.html | 44 +++++++++----------
.../challenge-organizers.component.html | 38 ++++++++--------
.../challenge-overview.component.html | 8 ++--
.../challenge-stargazers.component.html | 24 +++++-----
4 files changed, 54 insertions(+), 60 deletions(-)
diff --git a/libs/openchallenges/challenge/src/lib/challenge-contributors/challenge-contributors.component.html b/libs/openchallenges/challenge/src/lib/challenge-contributors/challenge-contributors.component.html
index 1c10ef3b32..0e2be65c82 100644
--- a/libs/openchallenges/challenge/src/lib/challenge-contributors/challenge-contributors.component.html
+++ b/libs/openchallenges/challenge/src/lib/challenge-contributors/challenge-contributors.component.html
@@ -1,23 +1,21 @@
-
-
- Contributors
-
- List of organizations whose contributions made possible the challenge. Contributions can range
- from planning and organizing the challenge to contributing data and providing technical
- support.
-
- 0; else na_text">
-
-
-
-
-
-
- Not available
-
-
-
+
+ Contributors
+
+ List of organizations whose contributions made possible the challenge. Contributions can range
+ from planning and organizing the challenge to contributing data and providing technical
+ support.
+
+ 0; else na_text">
+
+
+
+
+
+
+ Not available
+
+
diff --git a/libs/openchallenges/challenge/src/lib/challenge-organizers/challenge-organizers.component.html b/libs/openchallenges/challenge/src/lib/challenge-organizers/challenge-organizers.component.html
index 297da4e9f0..3532bdb8a9 100644
--- a/libs/openchallenges/challenge/src/lib/challenge-organizers/challenge-organizers.component.html
+++ b/libs/openchallenges/challenge/src/lib/challenge-organizers/challenge-organizers.component.html
@@ -1,20 +1,18 @@
-
-
- Organizers
- The organizing team for the challenge (names and affiliations).
- 0; else na_text">
-
-
-
-
-
-
- Not available
-
-
-
+
+ Organizers
+ The organizing team for the challenge (names and affiliations).
+ 0; else na_text">
+
+
+
+
+
+
+ Not available
+
+
diff --git a/libs/openchallenges/challenge/src/lib/challenge-overview/challenge-overview.component.html b/libs/openchallenges/challenge/src/lib/challenge-overview/challenge-overview.component.html
index 42a09d9f9f..304a9d844a 100644
--- a/libs/openchallenges/challenge/src/lib/challenge-overview/challenge-overview.component.html
+++ b/libs/openchallenges/challenge/src/lib/challenge-overview/challenge-overview.component.html
@@ -1,9 +1,9 @@
-
-
+
+
Overview
{{ use_default(challenge.description) }}
-
+
Challenge Details
@@ -71,4 +71,4 @@ Challenge Details
-
+
diff --git a/libs/openchallenges/challenge/src/lib/challenge-stargazers/challenge-stargazers.component.html b/libs/openchallenges/challenge/src/lib/challenge-stargazers/challenge-stargazers.component.html
index e1c554319d..f04528f347 100644
--- a/libs/openchallenges/challenge/src/lib/challenge-stargazers/challenge-stargazers.component.html
+++ b/libs/openchallenges/challenge/src/lib/challenge-stargazers/challenge-stargazers.component.html
@@ -1,14 +1,12 @@
-
-
- Stargazers
-
-
-
-
+
From ce8f99b8ad7284140dd4f1f219933f0f3c7b6605 Mon Sep 17 00:00:00 2001
From: verena <9377970+vpchung@users.noreply.github.com>
Date: Mon, 7 Aug 2023 22:08:39 +0000
Subject: [PATCH 05/17] add links
---
.../src/lib/challenge.component.html | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/libs/openchallenges/challenge/src/lib/challenge.component.html b/libs/openchallenges/challenge/src/lib/challenge.component.html
index e7788c7f18..c38d50227a 100644
--- a/libs/openchallenges/challenge/src/lib/challenge.component.html
+++ b/libs/openchallenges/challenge/src/lib/challenge.component.html
@@ -26,16 +26,27 @@
diff --git a/libs/openchallenges/challenge/src/lib/challenge.component.ts b/libs/openchallenges/challenge/src/lib/challenge.component.ts
index 34ada91bb3..b62b37a773 100644
--- a/libs/openchallenges/challenge/src/lib/challenge.component.ts
+++ b/libs/openchallenges/challenge/src/lib/challenge.component.ts
@@ -6,15 +6,13 @@ import {
} from '@sagebionetworks/openchallenges/api-client-angular';
import {
catchError,
- // map,
Observable,
of,
- // Subscription,
+ Subscription,
switchMap,
throwError,
} from 'rxjs';
-// import { Tab } from './tab.model';
-// import { CHALLENGE_TABS } from './challenge-tabs';
+import { CHALLENGE_LINKS } from './challenge-links';
import { Avatar } from '@sagebionetworks/openchallenges/ui';
import { ConfigService } from '@sagebionetworks/openchallenges/config';
import {
@@ -32,13 +30,11 @@ export class ChallengeComponent implements OnInit {
public dataUpdatedOn: string;
challenge$!: Observable ;
loggedIn = false;
- // progressValue = 0;
- // remainDays!: number | undefined;
challengeAvatar!: Avatar;
- // tabs = CHALLENGE_TABS;
- // tabKeys: string[] = Object.keys(this.tabs);
- // activeTab!: Tab;
- // private subscriptions: Subscription[] = [];
+ private subscriptions: Subscription[] = [];
+ rootUrl = this.router.url.split('#')[0];
+ links = CHALLENGE_LINKS;
+ public activeLink = 'overview';
constructor(
private activatedRoute: ActivatedRoute,
@@ -74,40 +70,19 @@ export class ChallengeComponent implements OnInit {
src: challenge.avatarUrl ?? '',
size: 250,
};
-
- // this.progressValue =
- // challenge.startDate && challenge.endDate
- // ? this.calcProgress(
- // new Date().toUTCString(),
- // challenge.startDate,
- // challenge.endDate
- // )
- // : 0;
-
- // this.remainDays = challenge.endDate
- // ? this.calcDays(new Date().toUTCString(), challenge.endDate)
- // : undefined;
});
- // const activeTabSub = this.activatedRoute.queryParamMap
- // .pipe(
- // map((params: ParamMap) => params.get('tab')),
- // map((key) => (key === null ? 'overview' : key))
- // )
- // .subscribe((key) => (this.activeTab = this.tabs[key]));
+ this.subscriptions.push(
+ this.activatedRoute.fragment.subscribe((fragment) => {
+ if (fragment != null) {
+ this.activeLink = fragment;
- // this.subscriptions.push(activeTabSub);
+ const target = document.getElementById(this.activeLink);
+ if (target) {
+ target.scrollIntoView();
+ }
+ }
+ })
+ );
}
-
- // calcDays(startDate: string, endDate: string): number {
- // const timeDiff = +new Date(endDate) - +new Date(startDate);
- // return Math.round(timeDiff / (1000 * 60 * 60 * 24));
- // }
-
- // calcProgress(today: string, startDate: string, endDate: string): number {
- // return (
- // (this.calcDays(startDate, today) / this.calcDays(startDate, endDate)) *
- // 100
- // );
- // }
}
diff --git a/libs/openchallenges/challenge/src/lib/link.model.ts b/libs/openchallenges/challenge/src/lib/link.model.ts
new file mode 100644
index 0000000000..3bc62fbf81
--- /dev/null
+++ b/libs/openchallenges/challenge/src/lib/link.model.ts
@@ -0,0 +1,4 @@
+export interface Link {
+ id: string;
+ name: string;
+}
diff --git a/libs/openchallenges/challenge/src/lib/tab.model.ts b/libs/openchallenges/challenge/src/lib/tab.model.ts
deleted file mode 100644
index 308e8279b6..0000000000
--- a/libs/openchallenges/challenge/src/lib/tab.model.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export interface Tab {
- name: string;
- visible: boolean;
-}
From f052b6c7788a0e410ca12f9dc9e1bc9a93217587 Mon Sep 17 00:00:00 2001
From: verena <9377970+vpchung@users.noreply.github.com>
Date: Wed, 9 Aug 2023 05:45:15 +0000
Subject: [PATCH 13/17] cleanup
---
.../challenge/src/lib/challenge.component.ts | 1 -
.../org-profile-challenges.component.html | 28 +++++++--------
.../org-profile/src/lib/org-profile-links.ts | 2 +-
.../org-profile-members.component.html | 36 +++++++++----------
.../org-profile-overview.component.html | 4 +--
.../src/lib/org-profile.component.ts | 1 -
6 files changed, 33 insertions(+), 39 deletions(-)
diff --git a/libs/openchallenges/challenge/src/lib/challenge.component.ts b/libs/openchallenges/challenge/src/lib/challenge.component.ts
index b62b37a773..e43cdf344b 100644
--- a/libs/openchallenges/challenge/src/lib/challenge.component.ts
+++ b/libs/openchallenges/challenge/src/lib/challenge.component.ts
@@ -76,7 +76,6 @@ export class ChallengeComponent implements OnInit {
this.activatedRoute.fragment.subscribe((fragment) => {
if (fragment != null) {
this.activeLink = fragment;
-
const target = document.getElementById(this.activeLink);
if (target) {
target.scrollIntoView();
diff --git a/libs/openchallenges/org-profile/src/lib/org-profile-challenges/org-profile-challenges.component.html b/libs/openchallenges/org-profile/src/lib/org-profile-challenges/org-profile-challenges.component.html
index 7b92302249..4fd3a8d33c 100644
--- a/libs/openchallenges/org-profile/src/lib/org-profile-challenges/org-profile-challenges.component.html
+++ b/libs/openchallenges/org-profile/src/lib/org-profile-challenges/org-profile-challenges.component.html
@@ -1,16 +1,14 @@
-
-
- Challenges
-
-
-
-
-
+
diff --git a/libs/openchallenges/org-profile/src/lib/org-profile-links.ts b/libs/openchallenges/org-profile/src/lib/org-profile-links.ts
index 3566e5bdc0..c5b6bf5933 100644
--- a/libs/openchallenges/org-profile/src/lib/org-profile-links.ts
+++ b/libs/openchallenges/org-profile/src/lib/org-profile-links.ts
@@ -7,7 +7,7 @@ export const ORG_PROFILE_LINKS: Link[] = [
},
{
id: 'details',
- name: 'Details',
+ name: 'Organization Details',
},
{
id: 'challenges',
diff --git a/libs/openchallenges/org-profile/src/lib/org-profile-members/org-profile-members.component.html b/libs/openchallenges/org-profile/src/lib/org-profile-members/org-profile-members.component.html
index fa1d61c1c0..f34199be0d 100644
--- a/libs/openchallenges/org-profile/src/lib/org-profile-members/org-profile-members.component.html
+++ b/libs/openchallenges/org-profile/src/lib/org-profile-members/org-profile-members.component.html
@@ -1,19 +1,17 @@
-
-
- Members
- 0; else na_text">
-
-
-
-
-
-
- Not available
-
-
-
+
+ Members
+ 0; else na_text">
+
+
+
+
+
+
+ Not available
+
+
diff --git a/libs/openchallenges/org-profile/src/lib/org-profile-overview/org-profile-overview.component.html b/libs/openchallenges/org-profile/src/lib/org-profile-overview/org-profile-overview.component.html
index 27409487eb..daa9b30aab 100644
--- a/libs/openchallenges/org-profile/src/lib/org-profile-overview/org-profile-overview.component.html
+++ b/libs/openchallenges/org-profile/src/lib/org-profile-overview/org-profile-overview.component.html
@@ -1,4 +1,4 @@
-
+
Overview
@@ -22,4 +22,4 @@ Organization Details
|
-
+
diff --git a/libs/openchallenges/org-profile/src/lib/org-profile.component.ts b/libs/openchallenges/org-profile/src/lib/org-profile.component.ts
index 2e07b8492d..cc73a5c554 100644
--- a/libs/openchallenges/org-profile/src/lib/org-profile.component.ts
+++ b/libs/openchallenges/org-profile/src/lib/org-profile.component.ts
@@ -95,7 +95,6 @@ export class OrgProfileComponent implements OnInit {
this.activatedRoute.fragment.subscribe((fragment) => {
if (fragment != null) {
this.activeLink = fragment;
-
const target = document.getElementById(this.activeLink);
if (target) {
target.scrollIntoView();
From 9782701f72087f601e8d7ebd72e783507dc2c2df Mon Sep 17 00:00:00 2001
From: verena <9377970+vpchung@users.noreply.github.com>
Date: Wed, 9 Aug 2023 06:24:39 +0000
Subject: [PATCH 14/17] add sticky to toc
---
.../org-profile-overview/org-profile-overview.component.html | 4 ----
libs/openchallenges/styles/src/lib/_general.scss | 3 +++
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/libs/openchallenges/org-profile/src/lib/org-profile-overview/org-profile-overview.component.html b/libs/openchallenges/org-profile/src/lib/org-profile-overview/org-profile-overview.component.html
index daa9b30aab..616b8e7a6b 100644
--- a/libs/openchallenges/org-profile/src/lib/org-profile-overview/org-profile-overview.component.html
+++ b/libs/openchallenges/org-profile/src/lib/org-profile-overview/org-profile-overview.component.html
@@ -8,10 +8,6 @@