From c9a19a7d19275e1aeb292251400c172f39633a82 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Wed, 12 Apr 2023 13:07:20 +0200 Subject: [PATCH 01/10] 100839: Created themeable BrowseByComponent --- .../browse-by-date-page.component.ts | 10 +-- .../browse-by-metadata-page.component.html | 4 +- .../browse-by/themed-browse-by.component.ts | 83 +++++++++++++++++++ src/app/shared/shared.module.ts | 6 +- 4 files changed, 92 insertions(+), 11 deletions(-) create mode 100644 src/app/shared/browse-by/themed-browse-by.component.ts diff --git a/src/app/browse-by/browse-by-date-page/browse-by-date-page.component.ts b/src/app/browse-by/browse-by-date-page/browse-by-date-page.component.ts index 1bdbb91a8be..4a76da46a66 100644 --- a/src/app/browse-by/browse-by-date-page/browse-by-date-page.component.ts +++ b/src/app/browse-by/browse-by-date-page/browse-by-date-page.component.ts @@ -91,10 +91,10 @@ export class BrowseByDatePageComponent extends BrowseByMetadataPageComponent { lowerLimit = dateObj.getUTCFullYear(); } } - const options = []; - const currentYear = new Date().getUTCFullYear(); - const oneYearBreak = Math.floor((currentYear - environment.browseBy.oneYearLimit) / 5) * 5; - const fiveYearBreak = Math.floor((currentYear - environment.browseBy.fiveYearLimit) / 10) * 10; + const options: number[] = []; + const currentYear: number = new Date().getUTCFullYear(); + const oneYearBreak: number = Math.floor((currentYear - environment.browseBy.oneYearLimit) / 5) * 5; + const fiveYearBreak: number = Math.floor((currentYear - environment.browseBy.fiveYearLimit) / 10) * 10; if (lowerLimit <= fiveYearBreak) { lowerLimit -= 10; } else if (lowerLimit <= oneYearBreak) { @@ -102,7 +102,7 @@ export class BrowseByDatePageComponent extends BrowseByMetadataPageComponent { } else { lowerLimit -= 1; } - let i = currentYear; + let i: number = currentYear; while (i > lowerLimit) { options.push(i); if (i <= fiveYearBreak) { diff --git a/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.html b/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.html index 2321da02041..b4cccbe4a0d 100644 --- a/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.html +++ b/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.html @@ -23,7 +23,7 @@
diff --git a/src/app/shared/browse-by/themed-browse-by.component.ts b/src/app/shared/browse-by/themed-browse-by.component.ts new file mode 100644 index 00000000000..fbc0555ddcc --- /dev/null +++ b/src/app/shared/browse-by/themed-browse-by.component.ts @@ -0,0 +1,83 @@ +/** + * The contents of this file are subject to the license and copyright + * detailed in the LICENSE and NOTICE files at the root of the source + * tree and available online at + * + * http://www.dspace.org/license/ + */ +import { Component, Input, Output, EventEmitter } from '@angular/core'; +import { ThemedComponent } from '../theme-support/themed.component'; +import { BrowseByComponent } from './browse-by.component'; +import { Observable } from 'rxjs'; +import { RemoteData } from '../../core/data/remote-data'; +import { PaginatedList } from '../../core/data/paginated-list.model'; +import { ListableObject } from '../object-collection/shared/listable-object.model'; +import { PaginationComponentOptions } from '../pagination/pagination-component-options.model'; +import { SortOptions, SortDirection } from '../../core/cache/models/sort-options.model'; +import { StartsWithType } from '../starts-with/starts-with-decorator'; + +/** + * Themed wrapper for {@link BrowseByComponent} + */ +@Component({ + selector: 'ds-themed-browse-by', + styleUrls: [], + templateUrl: '../theme-support/themed.component.html', +}) +export class ThemedBrowseByComponent extends ThemedComponent { + + @Input() title: string; + + @Input() parentname: string; + + @Input() objects$: Observable>>; + + @Input() paginationConfig: PaginationComponentOptions; + + @Input() sortConfig: SortOptions; + + @Input() type: StartsWithType; + + @Input() startsWithOptions: number[]; + + @Input() enableArrows: boolean; + + @Input() hideGear: boolean; + + @Output() prev: EventEmitter = new EventEmitter(); + + @Output() next: EventEmitter = new EventEmitter(); + + @Output() pageSizeChange: EventEmitter = new EventEmitter(); + + @Output() sortDirectionChange: EventEmitter = new EventEmitter(); + + protected inAndOutputNames: (keyof BrowseByComponent & keyof this)[] = [ + 'title', + 'parentname', + 'objects$', + 'paginationConfig', + 'sortConfig', + 'type', + 'startsWithOptions', + 'enableArrows', + 'hideGear', + 'prev', + 'next', + 'pageSizeChange', + 'sortDirectionChange', + ]; + + protected getComponentName(): string { + return 'BrowseByComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../themes/${themeName}/app/shared/browse-by/browse-by.component.ts`); + } + + protected importUnthemedComponent(): Promise { + return import('./browse-by.component'); + } + +} diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index 715ee66a99b..fa9fc854721 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -177,6 +177,7 @@ import { ScopeSelectorModalComponent } from './search-form/scope-selector-modal/ import { BitstreamRequestACopyPageComponent } from './bitstream-request-a-copy-page/bitstream-request-a-copy-page.component'; import { DsSelectComponent } from './ds-select/ds-select.component'; import { LogInOidcComponent } from './log-in/methods/oidc/log-in-oidc.component'; +import { ThemedBrowseByComponent } from './browse-by/themed-browse-by.component'; const MODULES = [ // Do NOT include UniversalModule, HttpModule, or JsonpModule here @@ -270,6 +271,7 @@ const COMPONENTS = [ TruncatableComponent, TruncatablePartComponent, BrowseByComponent, + ThemedBrowseByComponent, InputSuggestionsComponent, FilterInputSuggestionsComponent, ValidationSuggestionsComponent, @@ -283,8 +285,6 @@ const COMPONENTS = [ EditItemSelectorComponent, CommunitySearchResultListElementComponent, CollectionSearchResultListElementComponent, - BrowseByComponent, - CollectionSearchResultGridElementComponent, CommunitySearchResultGridElementComponent, PageSizeSelectorComponent, @@ -293,11 +293,9 @@ const COMPONENTS = [ CommunityListElementComponent, CollectionGridElementComponent, CommunityGridElementComponent, - BrowseByComponent, AbstractTrackableComponent, ComcolMetadataComponent, TypeBadgeComponent, - BrowseByComponent, AbstractTrackableComponent, ItemSelectComponent, From 2764127c53a4b00d2b931e0c3c99d4e523ba37a0 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Wed, 12 Apr 2023 13:14:44 +0200 Subject: [PATCH 02/10] 100839: Added themed BrowseByComponent to custom theme --- .../shared/browse-by/browse-by.component.html | 0 .../shared/browse-by/browse-by.component.scss | 0 .../app/shared/browse-by/browse-by.component.ts | 17 +++++++++++++++++ src/themes/custom/theme.module.ts | 4 +++- 4 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 src/themes/custom/app/shared/browse-by/browse-by.component.html create mode 100644 src/themes/custom/app/shared/browse-by/browse-by.component.scss create mode 100644 src/themes/custom/app/shared/browse-by/browse-by.component.ts diff --git a/src/themes/custom/app/shared/browse-by/browse-by.component.html b/src/themes/custom/app/shared/browse-by/browse-by.component.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/themes/custom/app/shared/browse-by/browse-by.component.scss b/src/themes/custom/app/shared/browse-by/browse-by.component.scss new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/themes/custom/app/shared/browse-by/browse-by.component.ts b/src/themes/custom/app/shared/browse-by/browse-by.component.ts new file mode 100644 index 00000000000..81435b9b372 --- /dev/null +++ b/src/themes/custom/app/shared/browse-by/browse-by.component.ts @@ -0,0 +1,17 @@ +import { Component } from '@angular/core'; +import { fadeIn, fadeInOut } from '../../../../../app/shared/animations/fade'; +import { BrowseByComponent as BaseComponent } from '../../../../../app/shared/browse-by/browse-by.component'; + +@Component({ + selector: 'ds-browse-by', + // styleUrls: ['./browse-by.component.scss'], + styleUrls: ['../../../../../app/shared/browse-by/browse-by.component.scss'], + // templateUrl: './browse-by.component.html', + templateUrl: '../../../../../app/shared/browse-by/browse-by.component.html', + animations: [ + fadeIn, + fadeInOut, + ], +}) +export class BrowseByComponent extends BaseComponent { +} diff --git a/src/themes/custom/theme.module.ts b/src/themes/custom/theme.module.ts index e2e97b90873..0c93e38705d 100644 --- a/src/themes/custom/theme.module.ts +++ b/src/themes/custom/theme.module.ts @@ -84,6 +84,7 @@ import { SearchModule } from '../../app/shared/search/search.module'; import { ResourcePoliciesModule } from '../../app/shared/resource-policies/resource-policies.module'; import { ComcolModule } from '../../app/shared/comcol/comcol.module'; import { FeedbackComponent } from './app/info/feedback/feedback.component'; +import { BrowseByComponent } from './app/shared/browse-by/browse-by.component'; const DECLARATIONS = [ FileSectionComponent, @@ -126,7 +127,8 @@ const DECLARATIONS = [ NavbarComponent, HeaderNavbarWrapperComponent, BreadcrumbsComponent, - FeedbackComponent + FeedbackComponent, + BrowseByComponent, ]; @NgModule({ From 6487b5eef30ba186df630badfcac4b75e0188d9b Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Wed, 12 Apr 2023 13:41:43 +0200 Subject: [PATCH 03/10] 100839: Added themed BrowseEntryListElementComponent to custom theme --- .../browse-entry-list-element.component.html | 0 .../browse-entry-list-element.component.scss | 0 .../browse-entry-list-element.component.ts | 19 +++++++++++++++++++ src/themes/custom/entry-components.ts | 6 +++++- 4 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 src/themes/custom/app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.html create mode 100644 src/themes/custom/app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.scss create mode 100644 src/themes/custom/app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.ts diff --git a/src/themes/custom/app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.html b/src/themes/custom/app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/themes/custom/app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.scss b/src/themes/custom/app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.scss new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/themes/custom/app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.ts b/src/themes/custom/app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.ts new file mode 100644 index 00000000000..0b1fd94e6a7 --- /dev/null +++ b/src/themes/custom/app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.ts @@ -0,0 +1,19 @@ +import { Component } from '@angular/core'; +import { BrowseEntry } from '../../../../../../app/core/shared/browse-entry.model'; +import { ViewMode } from '../../../../../../app/core/shared/view-mode.model'; +import { listableObjectComponent } from '../../../../../../app/shared/object-collection/shared/listable-object/listable-object.decorator'; +import { Context } from '../../../../../../app/core/shared/context.model'; +import { + BrowseEntryListElementComponent as BaseComponent +} from '../../../../../../app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component'; + +@Component({ + selector: 'ds-browse-entry-list-element', + // styleUrls: ['./browse-entry-list-element.component.scss'], + styleUrls: ['../../../../../../app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.scss'], + // templateUrl: './browse-entry-list-element.component.html', + templateUrl: '../../../../../../app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.html', +}) +@listableObjectComponent(BrowseEntry, ViewMode.ListElement, Context.Any, 'custom') +export class BrowseEntryListElementComponent extends BaseComponent { +} diff --git a/src/themes/custom/entry-components.ts b/src/themes/custom/entry-components.ts index b518e4cc457..168f1ad9029 100644 --- a/src/themes/custom/entry-components.ts +++ b/src/themes/custom/entry-components.ts @@ -1,5 +1,9 @@ import { PublicationComponent } from './app/item-page/simple/item-types/publication/publication.component'; +import { + BrowseEntryListElementComponent +} from './app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component'; export const ENTRY_COMPONENTS = [ - PublicationComponent + PublicationComponent, + BrowseEntryListElementComponent, ]; From 479ec1667132eec4823aecede52474fed54b84d7 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Fri, 28 Apr 2023 16:21:12 +0200 Subject: [PATCH 04/10] Added PersonComponent to custom theme --- .../item-pages/person/person.component.html | 0 .../item-pages/person/person.component.scss | 0 .../item-pages/person/person.component.ts | 20 +++++++++++++++++++ src/themes/custom/eager-theme.module.ts | 2 ++ 4 files changed, 22 insertions(+) create mode 100644 src/themes/custom/app/entity-groups/research-entities/item-pages/person/person.component.html create mode 100644 src/themes/custom/app/entity-groups/research-entities/item-pages/person/person.component.scss create mode 100644 src/themes/custom/app/entity-groups/research-entities/item-pages/person/person.component.ts diff --git a/src/themes/custom/app/entity-groups/research-entities/item-pages/person/person.component.html b/src/themes/custom/app/entity-groups/research-entities/item-pages/person/person.component.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/themes/custom/app/entity-groups/research-entities/item-pages/person/person.component.scss b/src/themes/custom/app/entity-groups/research-entities/item-pages/person/person.component.scss new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/themes/custom/app/entity-groups/research-entities/item-pages/person/person.component.ts b/src/themes/custom/app/entity-groups/research-entities/item-pages/person/person.component.ts new file mode 100644 index 00000000000..3d3f69409f3 --- /dev/null +++ b/src/themes/custom/app/entity-groups/research-entities/item-pages/person/person.component.ts @@ -0,0 +1,20 @@ +import { Component } from '@angular/core'; +import { ViewMode } from '../../../../../../../app/core/shared/view-mode.model'; +import { + listableObjectComponent +} from '../../../../../../../app/shared/object-collection/shared/listable-object/listable-object.decorator'; +import { + PersonComponent as BaseComponent +} from '../../../../../../../app/entity-groups/research-entities/item-pages/person/person.component'; +import { Context } from '../../../../../../../app/core/shared/context.model'; + +@listableObjectComponent('Person', ViewMode.StandalonePage, Context.Any, 'custom') +@Component({ + selector: 'ds-person', + // styleUrls: ['./person.component.scss'], + styleUrls: ['../../../../../../../app/entity-groups/research-entities/item-pages/person/person.component.scss'], + // templateUrl: './person.component.html', + templateUrl: '../../../../../../../app/entity-groups/research-entities/item-pages/person/person.component.html', +}) +export class PersonComponent extends BaseComponent { +} diff --git a/src/themes/custom/eager-theme.module.ts b/src/themes/custom/eager-theme.module.ts index 4e3c6f8b464..2e0a1d51812 100644 --- a/src/themes/custom/eager-theme.module.ts +++ b/src/themes/custom/eager-theme.module.ts @@ -43,6 +43,7 @@ import { import { CommunityListElementComponent } from './app/shared/object-list/community-list-element/community-list-element.component'; import { CollectionListElementComponent} from './app/shared/object-list/collection-list-element/collection-list-element.component'; +import { PersonComponent } from './app/entity-groups/research-entities/item-pages/person/person.component'; /** @@ -58,6 +59,7 @@ const ENTRY_COMPONENTS = [ CommunityListElementComponent, CollectionListElementComponent, + PersonComponent, ]; const DECLARATIONS = [ From dfb67fc83f491027fdc324f51c15ff074fcec034 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Thu, 4 May 2023 10:20:44 +0200 Subject: [PATCH 05/10] Themed LogInComponent --- src/app/login-page/login-page.component.html | 4 +-- .../auth-nav-menu.component.html | 4 +-- .../shared/log-in/themed-log-in.component.ts | 33 +++++++++++++++++++ src/app/shared/shared.module.ts | 2 ++ .../app/login-page/login-page.component.html | 4 +-- .../app/shared/log-in/log-in.component.html | 0 .../app/shared/log-in/log-in.component.scss | 0 .../app/shared/log-in/log-in.component.ts | 12 +++++++ src/themes/custom/theme.module.ts | 2 ++ 9 files changed, 55 insertions(+), 6 deletions(-) create mode 100644 src/app/shared/log-in/themed-log-in.component.ts create mode 100644 src/themes/custom/app/shared/log-in/log-in.component.html create mode 100644 src/themes/custom/app/shared/log-in/log-in.component.scss create mode 100644 src/themes/custom/app/shared/log-in/log-in.component.ts diff --git a/src/app/login-page/login-page.component.html b/src/app/login-page/login-page.component.html index 2a95e0ce1c5..c38444bec8c 100644 --- a/src/app/login-page/login-page.component.html +++ b/src/app/login-page/login-page.component.html @@ -3,8 +3,8 @@

{{"login.form.header" | translate}}

- +
diff --git a/src/app/shared/auth-nav-menu/auth-nav-menu.component.html b/src/app/shared/auth-nav-menu/auth-nav-menu.component.html index 80fdeda394b..a63578b0bd7 100644 --- a/src/app/shared/auth-nav-menu/auth-nav-menu.component.html +++ b/src/app/shared/auth-nav-menu/auth-nav-menu.component.html @@ -7,8 +7,8 @@
- +
diff --git a/src/app/shared/log-in/themed-log-in.component.ts b/src/app/shared/log-in/themed-log-in.component.ts new file mode 100644 index 00000000000..cc182746462 --- /dev/null +++ b/src/app/shared/log-in/themed-log-in.component.ts @@ -0,0 +1,33 @@ +import { Component, Input } from '@angular/core'; +import { ThemedComponent } from '../theme-support/themed.component'; +import { LogInComponent } from './log-in.component'; + +/** + * Themed wrapper for {@link LogInComponent} + */ +@Component({ + selector: 'ds-themed-log-in', + styleUrls: [], + templateUrl: './../theme-support/themed.component.html' +}) +export class ThemedLogInComponent extends ThemedComponent { + + @Input() isStandalonePage: boolean; + + protected inAndOutputNames: (keyof LogInComponent & keyof this)[] = [ + 'isStandalonePage', + ]; + + protected getComponentName(): string { + return 'LogInComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../themes/${themeName}/app/shared/log-in/log-in.component`); + } + + protected importUnthemedComponent(): Promise { + return import('./log-in.component'); + } + +} diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index 715ee66a99b..5d0eac74229 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -135,6 +135,7 @@ import { LogInContainerComponent } from './log-in/container/log-in-container.com import { LogInShibbolethComponent } from './log-in/methods/shibboleth/log-in-shibboleth.component'; import { LogInPasswordComponent } from './log-in/methods/password/log-in-password.component'; import { LogInComponent } from './log-in/log-in.component'; +import { ThemedLogInComponent } from './log-in/themed-log-in.component'; import { BundleListElementComponent } from './object-list/bundle-list-element/bundle-list-element.component'; import { MissingTranslationHelper } from './translate/missing-translation.helper'; import { ItemVersionsNoticeComponent } from './item/item-versions/notice/item-versions-notice.component'; @@ -235,6 +236,7 @@ const COMPONENTS = [ LangSwitchComponent, LoadingComponent, LogInComponent, + ThemedLogInComponent, LogOutComponent, NumberPickerComponent, ObjectListComponent, diff --git a/src/themes/custom/app/login-page/login-page.component.html b/src/themes/custom/app/login-page/login-page.component.html index 84059877f4b..1a83892c241 100644 --- a/src/themes/custom/app/login-page/login-page.component.html +++ b/src/themes/custom/app/login-page/login-page.component.html @@ -3,8 +3,8 @@

{{"login.form.header" | translate}}

- +
diff --git a/src/themes/custom/app/shared/log-in/log-in.component.html b/src/themes/custom/app/shared/log-in/log-in.component.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/themes/custom/app/shared/log-in/log-in.component.scss b/src/themes/custom/app/shared/log-in/log-in.component.scss new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/themes/custom/app/shared/log-in/log-in.component.ts b/src/themes/custom/app/shared/log-in/log-in.component.ts new file mode 100644 index 00000000000..5d1df59699a --- /dev/null +++ b/src/themes/custom/app/shared/log-in/log-in.component.ts @@ -0,0 +1,12 @@ +import { Component } from '@angular/core'; +import { LogInComponent as BaseComponent } from '../../../../../app/shared/log-in/log-in.component'; + +@Component({ + selector: 'ds-log-in', + // templateUrl: './log-in.component.html', + templateUrl: '../../../../../app/shared/log-in/log-in.component.html', + // styleUrls: ['./log-in.component.scss'], + styleUrls: ['../../../../../app/shared/log-in/log-in.component.scss'], +}) +export class LogInComponent extends BaseComponent { +} diff --git a/src/themes/custom/theme.module.ts b/src/themes/custom/theme.module.ts index e2e97b90873..6a2ab02608d 100644 --- a/src/themes/custom/theme.module.ts +++ b/src/themes/custom/theme.module.ts @@ -59,6 +59,7 @@ import { CollectionPageModule } from '../../app/collection-page/collection-page. import { ConfigurationSearchPageComponent } from './app/search-page/configuration-search-page.component'; import { ItemPageComponent } from './app/item-page/simple/item-page.component'; import { FullItemPageComponent } from './app/item-page/full/full-item-page.component'; +import { LogInComponent } from './app/shared/log-in/log-in.component'; import { LoginPageComponent } from './app/login-page/login-page.component'; import { LogoutPageComponent } from './app/logout-page/logout-page.component'; import { CreateProfileComponent } from './app/register-page/create-profile/create-profile.component'; @@ -108,6 +109,7 @@ const DECLARATIONS = [ CollectionPageComponent, ItemPageComponent, FullItemPageComponent, + LogInComponent, LoginPageComponent, LogoutPageComponent, CreateProfileComponent, From ae2ce87be0c34880439e1a7bf4104666b546962a Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Thu, 25 May 2023 21:49:45 +0200 Subject: [PATCH 06/10] Fix focus on navbar using different color --- src/app/navbar/navbar.component.scss | 7 ++++--- src/themes/dspace/app/navbar/navbar.component.scss | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/app/navbar/navbar.component.scss b/src/app/navbar/navbar.component.scss index 3a9a302b06a..1eea56393dc 100644 --- a/src/app/navbar/navbar.component.scss +++ b/src/app/navbar/navbar.component.scss @@ -37,8 +37,9 @@ nav.navbar { .navbar-nav { ::ng-deep a.nav-link { color: var(--ds-navbar-link-color); - } - ::ng-deep a.nav-link:hover { - color: var(--ds-navbar-link-color-hover); + + &:hover, &:focus { + color: var(--ds-navbar-link-color-hover); + } } } diff --git a/src/themes/dspace/app/navbar/navbar.component.scss b/src/themes/dspace/app/navbar/navbar.component.scss index 1ad95cb8aa2..61856820d20 100644 --- a/src/themes/dspace/app/navbar/navbar.component.scss +++ b/src/themes/dspace/app/navbar/navbar.component.scss @@ -50,8 +50,9 @@ a.navbar-brand img { .navbar-nav { ::ng-deep a.nav-link { color: var(--ds-navbar-link-color); - } - ::ng-deep a.nav-link:hover { - color: var(--ds-navbar-link-color-hover); + + &:hover, &:focus { + color: var(--ds-navbar-link-color-hover); + } } } From bcf703f1732497f1d3c30a8f8e9cf0c3bc4c7d00 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Wed, 7 Jun 2023 00:24:38 +0200 Subject: [PATCH 07/10] Fix ccLicense checkbox margin --- .../cc-license/submission-section-cc-licenses.component.html | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/submission/sections/cc-license/submission-section-cc-licenses.component.html b/src/app/submission/sections/cc-license/submission-section-cc-licenses.component.html index 6b9d542abc7..1bcd8055dcf 100644 --- a/src/app/submission/sections/cc-license/submission-section-cc-licenses.component.html +++ b/src/app/submission/sections/cc-license/submission-section-cc-licenses.component.html @@ -134,6 +134,7 @@
{{ 'submission.sections.ccLicense.confirmation' | translate }} From ec50448249e474b8f56d8fa3753a3d006e7ac11f Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Sat, 17 Jun 2023 00:49:42 +0200 Subject: [PATCH 08/10] Fix long search facets name not displaying correctly --- .../search-filters/search-filter/search-filter.component.html | 2 +- .../search-filters/search-filter/search-filter.component.scss | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/shared/search/search-filters/search-filter/search-filter.component.html b/src/app/shared/search/search-filters/search-filter/search-filter.component.html index a6fb0021b7f..a338a04f5d2 100644 --- a/src/app/shared/search/search-filters/search-filter/search-filter.component.html +++ b/src/app/shared/search/search-filters/search-filter/search-filter.component.html @@ -6,7 +6,7 @@ [attr.aria-label]="(((collapsed$ | async) ? 'search.filters.filter.expand' : 'search.filters.filter.collapse') | translate) + ' ' + (('search.filters.filter.' + filter.name + '.head') | translate | lowercase)" [attr.data-test]="'filter-toggle' | dsBrowserOnly" > -
+
{{'search.filters.filter.' + filter.name + '.head'| translate}}
button { From 0892859b480fd07d43899fc7838664fe701d9ab4 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Fri, 25 Aug 2023 15:07:39 +0200 Subject: [PATCH 09/10] Removed RecentItemListComponent's unnecessary float causing alignment issues when adding components underneath it --- .../recent-item-list/recent-item-list.component.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/home-page/recent-item-list/recent-item-list.component.html b/src/app/home-page/recent-item-list/recent-item-list.component.html index cd14891b3ff..82262be1b34 100644 --- a/src/app/home-page/recent-item-list/recent-item-list.component.html +++ b/src/app/home-page/recent-item-list/recent-item-list.component.html @@ -1,12 +1,12 @@
-
+

{{'home.recent-submissions.head' | translate}}

- +
From a27d6d1891e4b99170f6d15edd9fc2c5ddf505fd Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Mon, 2 Oct 2023 18:26:37 +0200 Subject: [PATCH 10/10] Themed RegisterEmailFormComponent --- .../forgot-email.component.html | 4 +-- .../register-email-form.module.ts | 10 ++++-- .../themed-registry-email-form.component.ts | 33 +++++++++++++++++++ .../register-email.component.html | 4 +-- .../register-email-form.component.html | 0 .../register-email-form.component.ts | 12 +++++++ src/themes/custom/theme.module.ts | 4 ++- 7 files changed, 60 insertions(+), 7 deletions(-) create mode 100644 src/app/register-email-form/themed-registry-email-form.component.ts create mode 100644 src/themes/custom/app/register-email-form/register-email-form.component.html create mode 100644 src/themes/custom/app/register-email-form/register-email-form.component.ts diff --git a/src/app/forgot-password/forgot-password-email/forgot-email.component.html b/src/app/forgot-password/forgot-password-email/forgot-email.component.html index 263f142c2e3..576e59e9429 100644 --- a/src/app/forgot-password/forgot-password-email/forgot-email.component.html +++ b/src/app/forgot-password/forgot-password-email/forgot-email.component.html @@ -1,3 +1,3 @@ - - \ No newline at end of file + diff --git a/src/app/register-email-form/register-email-form.module.ts b/src/app/register-email-form/register-email-form.module.ts index f19e869beb0..4fed5d0a247 100644 --- a/src/app/register-email-form/register-email-form.module.ts +++ b/src/app/register-email-form/register-email-form.module.ts @@ -2,6 +2,12 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { SharedModule } from '../shared/shared.module'; import { RegisterEmailFormComponent } from './register-email-form.component'; +import { ThemedRegisterEmailFormComponent } from './themed-registry-email-form.component'; + +const DECLARATIONS = [ + RegisterEmailFormComponent, + ThemedRegisterEmailFormComponent, +]; @NgModule({ imports: [ @@ -9,11 +15,11 @@ import { RegisterEmailFormComponent } from './register-email-form.component'; SharedModule, ], declarations: [ - RegisterEmailFormComponent, + ...DECLARATIONS, ], providers: [], exports: [ - RegisterEmailFormComponent, + ...DECLARATIONS, ] }) diff --git a/src/app/register-email-form/themed-registry-email-form.component.ts b/src/app/register-email-form/themed-registry-email-form.component.ts new file mode 100644 index 00000000000..9d1a0498c9f --- /dev/null +++ b/src/app/register-email-form/themed-registry-email-form.component.ts @@ -0,0 +1,33 @@ +import { Component, Input } from '@angular/core'; +import { ThemedComponent } from '../shared/theme-support/themed.component'; +import { RegisterEmailFormComponent } from './register-email-form.component'; + +/** + * Themed wrapper for {@link RegisterEmailFormComponent} + */ +@Component({ + selector: 'ds-themed-register-email-form', + styleUrls: [], + templateUrl: '../shared/theme-support/themed.component.html', +}) +export class ThemedRegisterEmailFormComponent extends ThemedComponent { + + @Input() MESSAGE_PREFIX: string; + + protected inAndOutputNames: (keyof RegisterEmailFormComponent & keyof this)[] = [ + 'MESSAGE_PREFIX', + ]; + + protected getComponentName(): string { + return 'RegisterEmailFormComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../themes/${themeName}/app/register-email-form/register-email-form.component`); + } + + protected importUnthemedComponent(): Promise { + return import('./register-email-form.component'); + } + +} diff --git a/src/app/register-page/register-email/register-email.component.html b/src/app/register-page/register-email/register-email.component.html index a60dc4c31e0..9339dc271d3 100644 --- a/src/app/register-page/register-email/register-email.component.html +++ b/src/app/register-page/register-email/register-email.component.html @@ -1,3 +1,3 @@ - - + diff --git a/src/themes/custom/app/register-email-form/register-email-form.component.html b/src/themes/custom/app/register-email-form/register-email-form.component.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/themes/custom/app/register-email-form/register-email-form.component.ts b/src/themes/custom/app/register-email-form/register-email-form.component.ts new file mode 100644 index 00000000000..8489a1d89c6 --- /dev/null +++ b/src/themes/custom/app/register-email-form/register-email-form.component.ts @@ -0,0 +1,12 @@ +import { Component } from '@angular/core'; +import { + RegisterEmailFormComponent as BaseComponent +} from '../../../../app/register-email-form/register-email-form.component'; + +@Component({ + selector: 'ds-register-email-form', + // templateUrl: './register-email-form.component.html', + templateUrl: '../../../../app/register-email-form/register-email-form.component.html', +}) +export class RegisterEmailFormComponent extends BaseComponent { +} diff --git a/src/themes/custom/theme.module.ts b/src/themes/custom/theme.module.ts index dac941546b4..3265653527a 100644 --- a/src/themes/custom/theme.module.ts +++ b/src/themes/custom/theme.module.ts @@ -79,6 +79,7 @@ import { HeaderComponent } from './app/header/header.component'; import { FooterComponent } from './app/footer/footer.component'; import { BreadcrumbsComponent } from './app/breadcrumbs/breadcrumbs.component'; import { HeaderNavbarWrapperComponent } from './app/header-nav-wrapper/header-navbar-wrapper.component'; +import { RegisterEmailFormComponent } from './app/register-email-form/register-email-form.component'; const DECLARATIONS = [ HomePageComponent, @@ -119,7 +120,8 @@ const DECLARATIONS = [ HeaderComponent, NavbarComponent, HeaderNavbarWrapperComponent, - BreadcrumbsComponent + BreadcrumbsComponent, + RegisterEmailFormComponent, ]; @NgModule({