From eff5f1b81a129490c78c68ad6b2c55b085a0f4ef Mon Sep 17 00:00:00 2001 From: lotte Date: Wed, 22 Feb 2023 15:59:29 +0100 Subject: [PATCH] 99521: themed TopLevelCommunitiesComponent --- src/app/home-page/home-page.component.html | 2 +- src/app/home-page/home-page.module.ts | 2 ++ ...emed-top-level-community-list.component.ts | 25 +++++++++++++++++++ .../top-level-community-list.component.html | 0 .../top-level-community-list.component.scss | 0 .../top-level-community-list.component.ts | 13 ++++++++++ src/themes/custom/theme.module.ts | 4 ++- 7 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 src/app/home-page/top-level-community-list/themed-top-level-community-list.component.ts create mode 100644 src/themes/custom/app/home-page/top-level-community-list/top-level-community-list.component.html create mode 100644 src/themes/custom/app/home-page/top-level-community-list/top-level-community-list.component.scss create mode 100644 src/themes/custom/app/home-page/top-level-community-list/top-level-community-list.component.ts diff --git a/src/app/home-page/home-page.component.html b/src/app/home-page/home-page.component.html index 0f7db182f0..a3ae5f5242 100644 --- a/src/app/home-page/home-page.component.html +++ b/src/app/home-page/home-page.component.html @@ -4,5 +4,5 @@ - + diff --git a/src/app/home-page/home-page.module.ts b/src/app/home-page/home-page.module.ts index d304c78696..1ab7d751b0 100644 --- a/src/app/home-page/home-page.module.ts +++ b/src/app/home-page/home-page.module.ts @@ -9,11 +9,13 @@ import { TopLevelCommunityListComponent } from './top-level-community-list/top-l import { StatisticsModule } from '../statistics/statistics.module'; import { ThemedHomeNewsComponent } from './home-news/themed-home-news.component'; import { ThemedHomePageComponent } from './themed-home-page.component'; +import { ThemedTopLevelCommunityListComponent } from './top-level-community-list/themed-top-level-community-list.component'; const DECLARATIONS = [ HomePageComponent, ThemedHomePageComponent, TopLevelCommunityListComponent, + ThemedTopLevelCommunityListComponent, ThemedHomeNewsComponent, HomeNewsComponent, ]; diff --git a/src/app/home-page/top-level-community-list/themed-top-level-community-list.component.ts b/src/app/home-page/top-level-community-list/themed-top-level-community-list.component.ts new file mode 100644 index 0000000000..6eb74cc0a9 --- /dev/null +++ b/src/app/home-page/top-level-community-list/themed-top-level-community-list.component.ts @@ -0,0 +1,25 @@ +import { Component } from '@angular/core'; +import { TopLevelCommunityListComponent } from './top-level-community-list.component'; +import { ThemedComponent } from '../../shared/theme-support/themed.component'; + +@Component({ + selector: 'ds-themed-top-level-community-list', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', +}) +export class ThemedTopLevelCommunityListComponent extends ThemedComponent { + protected inAndOutputNames: (keyof TopLevelCommunityListComponent & keyof this)[]; + + protected getComponentName(): string { + return 'TopLevelCommunityListComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../themes/${themeName}/app/home-page/top-level-community-list/top-level-community-list.component`); + } + + protected importUnthemedComponent(): Promise { + return import(`./top-level-community-list.component`); + } + +} diff --git a/src/themes/custom/app/home-page/top-level-community-list/top-level-community-list.component.html b/src/themes/custom/app/home-page/top-level-community-list/top-level-community-list.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/home-page/top-level-community-list/top-level-community-list.component.scss b/src/themes/custom/app/home-page/top-level-community-list/top-level-community-list.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/home-page/top-level-community-list/top-level-community-list.component.ts b/src/themes/custom/app/home-page/top-level-community-list/top-level-community-list.component.ts new file mode 100644 index 0000000000..b52cb1439c --- /dev/null +++ b/src/themes/custom/app/home-page/top-level-community-list/top-level-community-list.component.ts @@ -0,0 +1,13 @@ +import { Component } from '@angular/core'; +import { TopLevelCommunityListComponent as BaseComponent } from '../../../../../app/home-page/top-level-community-list/top-level-community-list.component'; + +@Component({ + selector: 'ds-top-level-community-list', + // styleUrls: ['./top-level-community-list.component.scss'], + styleUrls: ['../../../../../app/home-page/top-level-community-list/top-level-community-list.component.scss'], + // templateUrl: './top-level-community-list.component.html' + templateUrl: '../../../../../app/home-page/top-level-community-list/top-level-community-list.component.html' +}) + +export class TopLevelCommunityListComponent extends BaseComponent {} + diff --git a/src/themes/custom/theme.module.ts b/src/themes/custom/theme.module.ts index e2e97b9087..db3bf197a6 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 { TopLevelCommunityListComponent } from './app/home-page/top-level-community-list/top-level-community-list.component'; const DECLARATIONS = [ FileSectionComponent, @@ -126,7 +127,8 @@ const DECLARATIONS = [ NavbarComponent, HeaderNavbarWrapperComponent, BreadcrumbsComponent, - FeedbackComponent + FeedbackComponent, + TopLevelCommunityListComponent, ]; @NgModule({