From 1cfdb4b2a7b1d87dbbb2d35b35b4f653180ddc82 Mon Sep 17 00:00:00 2001 From: verena <9377970+vpchung@users.noreply.github.com> Date: Mon, 7 Aug 2023 20:08:40 +0000 Subject: [PATCH 01/17] convert to single-page layout --- .../src/lib/challenge.component.html | 55 ++++++------------- .../challenge/src/lib/challenge.component.ts | 32 +++++------ 2 files changed, 34 insertions(+), 53 deletions(-) diff --git a/libs/openchallenges/challenge/src/lib/challenge.component.html b/libs/openchallenges/challenge/src/lib/challenge.component.html index 71ee07b5ef..bf5f592089 100644 --- a/libs/openchallenges/challenge/src/lib/challenge.component.html +++ b/libs/openchallenges/challenge/src/lib/challenge.component.html @@ -26,28 +26,16 @@

- + 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 @@

Challenge Details

{{ use_default(challenge.platform.name) }} - 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. -

- -
- - -
-
- -

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. +

+ +
+ + +
+
+ +

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).

- -
- - -
-
- -

Not available

-
-
-
+
+

Organizers

+

The organizing team for the challenge (names and affiliations).

+ +
+ + +
+
+ +

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

-
- - -
+
+

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

-
- - -
- +
+

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

- -
- - -
-
- -

Not available

-
-
-
+
+

Members

+ +
+ + +
+
+ +

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 @@

Overview

Organization Details

- diff --git a/libs/openchallenges/styles/src/lib/_general.scss b/libs/openchallenges/styles/src/lib/_general.scss index 433e2d05ef..78a73158de 100644 --- a/libs/openchallenges/styles/src/lib/_general.scss +++ b/libs/openchallenges/styles/src/lib/_general.scss @@ -183,6 +183,9 @@ em { text-align: right; } .profile-nav-group { + position: sticky; + position: -webkit-sticky; + top: constants.$navbar-height + 32px; margin: 18px; padding: 48px 18px; display: flex; From f00df00856e99cde29d1e4451e7be5c75fae86fb Mon Sep 17 00:00:00 2001 From: verena <9377970+vpchung@users.noreply.github.com> Date: Wed, 9 Aug 2023 07:44:31 +0000 Subject: [PATCH 15/17] add scroll offset --- .../challenge-contributors.component.scss | 5 +++++ .../challenge-organizers.component.scss | 5 +++++ .../challenge-overview/challenge-overview.component.scss | 6 ++++++ .../challenge-stargazers.component.scss | 5 +++++ .../org-profile-challenges.component.scss | 5 +++++ .../org-profile-members.component.scss | 5 +++++ .../org-profile-overview.component.scss | 8 ++++++++ 7 files changed, 39 insertions(+) diff --git a/libs/openchallenges/challenge/src/lib/challenge-contributors/challenge-contributors.component.scss b/libs/openchallenges/challenge/src/lib/challenge-contributors/challenge-contributors.component.scss index 3fba10ba5d..a6a9f5cfb0 100644 --- a/libs/openchallenges/challenge/src/lib/challenge-contributors/challenge-contributors.component.scss +++ b/libs/openchallenges/challenge/src/lib/challenge-contributors/challenge-contributors.component.scss @@ -1,3 +1,8 @@ +@use 'libs/openchallenges/styles/src/lib/_constants' as constants; + +#contributors { + scroll-margin-top: constants.$navbar-height + 20px; +} .section-title { margin-top: 32px; } diff --git a/libs/openchallenges/challenge/src/lib/challenge-organizers/challenge-organizers.component.scss b/libs/openchallenges/challenge/src/lib/challenge-organizers/challenge-organizers.component.scss index f49c2796bd..6483447139 100644 --- a/libs/openchallenges/challenge/src/lib/challenge-organizers/challenge-organizers.component.scss +++ b/libs/openchallenges/challenge/src/lib/challenge-organizers/challenge-organizers.component.scss @@ -1,3 +1,8 @@ +@use 'libs/openchallenges/styles/src/lib/_constants' as constants; + +#organizers { + scroll-margin-top: constants.$navbar-height + 20px; +} .section-title { margin-top: 32px; } diff --git a/libs/openchallenges/challenge/src/lib/challenge-overview/challenge-overview.component.scss b/libs/openchallenges/challenge/src/lib/challenge-overview/challenge-overview.component.scss index 00a2d72d2a..f312d274a3 100644 --- a/libs/openchallenges/challenge/src/lib/challenge-overview/challenge-overview.component.scss +++ b/libs/openchallenges/challenge/src/lib/challenge-overview/challenge-overview.component.scss @@ -1,3 +1,9 @@ +@use 'libs/openchallenges/styles/src/lib/_constants' as constants; + +#overview, +#details { + scroll-margin-top: constants.$navbar-height + 20px; +} .top-section-title { margin-top: 14px; } diff --git a/libs/openchallenges/challenge/src/lib/challenge-stargazers/challenge-stargazers.component.scss b/libs/openchallenges/challenge/src/lib/challenge-stargazers/challenge-stargazers.component.scss index d27747efa2..41612e9adc 100644 --- a/libs/openchallenges/challenge/src/lib/challenge-stargazers/challenge-stargazers.component.scss +++ b/libs/openchallenges/challenge/src/lib/challenge-stargazers/challenge-stargazers.component.scss @@ -1,3 +1,8 @@ +@use 'libs/openchallenges/styles/src/lib/_constants' as constants; + +#stargazers { + scroll-margin-top: constants.$navbar-height + 20px; +} .section-title { margin-top: 32px; } \ No newline at end of file diff --git a/libs/openchallenges/org-profile/src/lib/org-profile-challenges/org-profile-challenges.component.scss b/libs/openchallenges/org-profile/src/lib/org-profile-challenges/org-profile-challenges.component.scss index d27747efa2..14f157d6bc 100644 --- a/libs/openchallenges/org-profile/src/lib/org-profile-challenges/org-profile-challenges.component.scss +++ b/libs/openchallenges/org-profile/src/lib/org-profile-challenges/org-profile-challenges.component.scss @@ -1,3 +1,8 @@ +@use 'libs/openchallenges/styles/src/lib/_constants' as constants; + +#challenges { + scroll-margin-top: constants.$navbar-height + 20px; +} .section-title { margin-top: 32px; } \ No newline at end of file diff --git a/libs/openchallenges/org-profile/src/lib/org-profile-members/org-profile-members.component.scss b/libs/openchallenges/org-profile/src/lib/org-profile-members/org-profile-members.component.scss index f49c2796bd..f433d5c223 100644 --- a/libs/openchallenges/org-profile/src/lib/org-profile-members/org-profile-members.component.scss +++ b/libs/openchallenges/org-profile/src/lib/org-profile-members/org-profile-members.component.scss @@ -1,3 +1,8 @@ +@use 'libs/openchallenges/styles/src/lib/_constants' as constants; + +#members { + scroll-margin-top: constants.$navbar-height + 20px; +} .section-title { margin-top: 32px; } diff --git a/libs/openchallenges/org-profile/src/lib/org-profile-overview/org-profile-overview.component.scss b/libs/openchallenges/org-profile/src/lib/org-profile-overview/org-profile-overview.component.scss index 00a2d72d2a..d4dab94d7a 100644 --- a/libs/openchallenges/org-profile/src/lib/org-profile-overview/org-profile-overview.component.scss +++ b/libs/openchallenges/org-profile/src/lib/org-profile-overview/org-profile-overview.component.scss @@ -1,3 +1,11 @@ +@use 'libs/openchallenges/styles/src/lib/_constants' as constants; + +#overview { + scroll-margin-top: constants.$navbar-height; +} +#details { + scroll-margin-top: constants.$navbar-height + 20px; +} .top-section-title { margin-top: 14px; } From 4164c9bc1b56e8740be2f7fe85d47b6eaef85135 Mon Sep 17 00:00:00 2001 From: verena <9377970+vpchung@users.noreply.github.com> Date: Wed, 9 Aug 2023 07:48:46 +0000 Subject: [PATCH 16/17] rootUrl fix for challenge profile --- libs/openchallenges/challenge/src/lib/challenge.component.html | 2 +- libs/openchallenges/challenge/src/lib/challenge.component.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/openchallenges/challenge/src/lib/challenge.component.html b/libs/openchallenges/challenge/src/lib/challenge.component.html index 36ab57e5e6..0c8b36607c 100644 --- a/libs/openchallenges/challenge/src/lib/challenge.component.html +++ b/libs/openchallenges/challenge/src/lib/challenge.component.html @@ -29,7 +29,7 @@

{{link.name}} diff --git a/libs/openchallenges/challenge/src/lib/challenge.component.ts b/libs/openchallenges/challenge/src/lib/challenge.component.ts index e43cdf344b..3118dd57d3 100644 --- a/libs/openchallenges/challenge/src/lib/challenge.component.ts +++ b/libs/openchallenges/challenge/src/lib/challenge.component.ts @@ -53,6 +53,9 @@ export class ChallengeComponent implements OnInit { ), switchMap((challenge) => { this.router.navigate(['/challenge', challenge.id, challenge.slug]); + // Resetting here, to account for when the page refreshes or when the + // link is shared with the challenge name in the url already + this.rootUrl = this.router.url.split('#')[0]; return of(challenge); }), catchError((err) => { From faa571a9b924429961039a8b2201f937c16c4f8c Mon Sep 17 00:00:00 2001 From: verena <9377970+vpchung@users.noreply.github.com> Date: Tue, 19 Sep 2023 22:24:40 +0000 Subject: [PATCH 17/17] update div name in _general --- libs/openchallenges/styles/src/lib/_general.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/openchallenges/styles/src/lib/_general.scss b/libs/openchallenges/styles/src/lib/_general.scss index c5c7e19944..34fe4fc319 100644 --- a/libs/openchallenges/styles/src/lib/_general.scss +++ b/libs/openchallenges/styles/src/lib/_general.scss @@ -252,7 +252,7 @@ span.text-grey a { table { border-spacing: 11px; } -#bio div a mat-icon { +#overview div a mat-icon { font-size: 15px; vertical-align: middle; }

Acronym {{ use_default(org.acronym) }}