From 7dcea62a92b3c753c530b0702fd82f25bc8d9cc1 Mon Sep 17 00:00:00 2001 From: msutya Date: Wed, 12 Mar 2025 09:13:10 +0100 Subject: [PATCH 1/3] QREPO-262 create pte theme --- angular.json | 5 +++ config/config.yml | 3 +- src/assets/i18n/en.json5 | 59 ++++++++++++++++++++++++- src/assets/i18n/hu.json5 | 62 ++++++++++++++++++++++++++- src/themes/eager-themes.module.ts | 3 +- src/themes/pte/eager-theme.module.ts | 30 +++++++++++++ src/themes/pte/lazy-theme.module.ts | 58 +++++++++++++++++++++++++ src/themes/qulto/assets/i18n/en.json5 | 56 ++++++++++++++++++++++++ src/themes/qulto/assets/i18n/hu.json5 | 60 ++++++++++++++++++++++++++ 9 files changed, 332 insertions(+), 4 deletions(-) create mode 100644 src/themes/pte/eager-theme.module.ts create mode 100644 src/themes/pte/lazy-theme.module.ts diff --git a/angular.json b/angular.json index 572ac465a82..deda480b686 100644 --- a/angular.json +++ b/angular.json @@ -68,6 +68,11 @@ "input": "src/themes/szerep/styles/theme.scss", "inject": false, "bundleName": "szerep-theme" + }, + { + "input": "src/themes/qulto/styles/theme.scss", + "inject": false, + "bundleName": "pte-theme" } ], "scripts": [], diff --git a/config/config.yml b/config/config.yml index bd6214576ca..71c740c349b 100644 --- a/config/config.yml +++ b/config/config.yml @@ -5,7 +5,8 @@ rest: nameSpace: /server themes: - - name: qulto + - name: pte + extends: qulto headTags: - tagName: link attributes: diff --git a/src/assets/i18n/en.json5 b/src/assets/i18n/en.json5 index e59f8396d73..afca8d1f89d 100644 --- a/src/assets/i18n/en.json5 +++ b/src/assets/i18n/en.json5 @@ -6909,4 +6909,61 @@ "qulto.home.welcome.description": "{{ dspaceName }} is a digital storage for electronic documents, designed for archiving and making documents accessible.", "qulto.home.welcome.functions": "Its purpose is to provide researchers, educators, and interested parties with easy access to scientific and professional materials, promoting the free flow of knowledge and the wider dissemination of the work of the academic community.", -} \ No newline at end of file + + + "dc.title.subtitle": "Subtitle", + + "dc.title.other": "Other title", + + "dc.title": "Title", + + "dc.contributor.author": "Author", + + "dc.contributor.advisor": "Advisor", + + "dc.contributor.description": "Description", + + "dc.contributor.extadvisor": "Extadvisor", + + "dc.contributor.faculty": "Faculty", + + "dc.contributor.inst": "Department", + + "dc.contributor.org": "Institution", + + "dc.contributor.workplace": "Foreign consular workplace", + + "dc.date.accessioned": "Last access date", + + "dc.date.available": "Availability date", + + "dc.date.catalog": "Catalog date", + + "dc.date.issued": "Date issued", + + "dc.date.recordid": "Record id", + + "dc.description.type": "Level", + + "dc.identifier.uri": "URI", + + "dc.language.iso": "Language", + + "dc.rights.access": "Access", + + "dc.subject": "Subject", + + "dc.type": "Document type", + + "dc.format.extent": "Extent", + + "dc.identifier.doi": "DOI", + + "dc.contributor.doctschool": "Doctoral school", + + "dc.description.appendix": "Appendix", + + "status.badge.limited": "Limited access", + + "status.badge.public": "Free access" +} diff --git a/src/assets/i18n/hu.json5 b/src/assets/i18n/hu.json5 index 978c9ee72c1..61e77f63765 100644 --- a/src/assets/i18n/hu.json5 +++ b/src/assets/i18n/hu.json5 @@ -6851,4 +6851,64 @@ "qulto.home.welcome.description": "A {{ dspaceName }} elektronikus dokumentumok digitális tárhelye, archiválásra és a dokumentumok hozzáférhetővé tételére szolgál.", "qulto.home.welcome.functions": "Célja, hogy biztosítsa a kutatók, oktatók és érdeklődők számára a tudományos és szakmai anyagok könnyű elérhetőségét, elősegítve a tudás szabad áramlását és a tudományos közösség munkájának szélesebb körű terjesztését.", -} \ No newline at end of file + + "dc.title.subtitle": "Alcím", + + "dc.title.other": "Egyéb cím", + + "dc.title": "Cím", + + "dc.contributor.author": "Szerző", + + "dc.contributor.advisor": "Konzulens/Témavezető", + + "dc.contributor.description": "Leírás", + + "dc.contributor.extadvisor": "Külső konzulens", + + "dc.contributor.faculty": "Kar", + + "dc.contributor.inst": "Tanszék", + + "dc.contributor.org": "Intézmény", + + "dc.contributor.workplace": "Külső konzules munkahelye", + + "dc.date.accessioned": "Utolsó hozzáférés ideje", + + "dc.date.available": "Elérhetőség dátuma", + + "dc.date.catalog": "Állományba vétel", + + "dc.date.issued": "Megjelenés éve", + + "dc.date.recordid": "Főnaplószám", + + "dc.description.type": "Képzési szint", + + "dc.identifier.uri": "URI", + + "dc.language.iso": "Nyelv", + + "dc.rights.access": "Hozzáférés", + + "dc.subject": "Tárgyszó", + + "dc.type": "Dokumentumtípus", + + "dc.title": "Cím", + + "dc.title.other": "Egyéb cím", + + "dc.format.extent": "Terjedelem", + + "dc.identifier.doi": "DOI", + + "dc.contributor.doctschool": "Doktori iskola", + + "dc.description.appendix": "Melléklet", + + "status.badge.limited": "Korlátozottan hozzáférhető", + + "status.badge.public": "Szabadon hozzáférhető" +} diff --git a/src/themes/eager-themes.module.ts b/src/themes/eager-themes.module.ts index 23ef8d8f426..f7b5f19eb17 100644 --- a/src/themes/eager-themes.module.ts +++ b/src/themes/eager-themes.module.ts @@ -2,6 +2,7 @@ import { NgModule } from '@angular/core'; import { EagerThemeModule as QultoEagerThemeModule } from './qulto/eager-theme.module'; import { EagerThemeModule as SzerepEagerThemeModule } from './szerep/eager-theme.module'; +import { EagerThemeModule as PteEagerThemeModule } from './pte/eager-theme.module'; /** @@ -12,7 +13,7 @@ import { EagerThemeModule as SzerepEagerThemeModule } from './szerep/eager-theme * Themes that aren't in use should not be imported here so they don't take up unnecessary space in the main bundle. */ @NgModule({ - imports: [SzerepEagerThemeModule, QultoEagerThemeModule], + imports: [SzerepEagerThemeModule, QultoEagerThemeModule, PteEagerThemeModule], }) export class EagerThemesModule { } diff --git a/src/themes/pte/eager-theme.module.ts b/src/themes/pte/eager-theme.module.ts new file mode 100644 index 00000000000..23d0547be18 --- /dev/null +++ b/src/themes/pte/eager-theme.module.ts @@ -0,0 +1,30 @@ +import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; + +import { RootModule } from '../../app/root.module'; + +/** + * Add components that use a custom decorator to ENTRY_COMPONENTS as well as DECLARATIONS. + * This will ensure that decorator gets picked up when the app loads + */ + +const DECLARATIONS = []; + +@NgModule({ + imports: [ + CommonModule, + RootModule, + ...DECLARATIONS, + ], +}) +/** + * This module is included in the main bundle that gets downloaded at first page load. So it should + * contain only the themed components that have to be available immediately for the first page load, + * and the minimal set of imports required to make them work. Anything you can cut from it will make + * the initial page load faster, but may cause the page to flicker as components that were already + * rendered server side need to be lazy-loaded again client side + * + * Themed EntryComponents should also be added here + */ +export class EagerThemeModule { +} diff --git a/src/themes/pte/lazy-theme.module.ts b/src/themes/pte/lazy-theme.module.ts new file mode 100644 index 00000000000..773f54a08fc --- /dev/null +++ b/src/themes/pte/lazy-theme.module.ts @@ -0,0 +1,58 @@ +import { DragDropModule } from '@angular/cdk/drag-drop'; +import { CommonModule } from '@angular/common'; +import { HttpClientModule } from '@angular/common/http'; +import { NgModule } from '@angular/core'; +import { FormsModule } from '@angular/forms'; +import { RouterModule } from '@angular/router'; +import { NgxGalleryModule } from '@kolkov/ngx-gallery'; +import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; +import { StoreRouterConnectingModule } from '@ngrx/router-store'; +import { StoreModule } from '@ngrx/store'; +import { TranslateModule } from '@ngx-translate/core'; +import { ScrollToModule } from '@nicky-lenaers/ngx-scroll-to'; + +import { RootModule } from '../../app/root.module'; +import { AdminSidebarComponent } from '../qulto/app/admin/admin-sidebar/admin-sidebar.component'; +import { HomePageComponent } from '../qulto/app/home-page/home-page.component'; +import { FullItemPageComponent } from '../qulto/app/item-page/full/full-item-page.component'; +import { LoginPageComponent } from '../qulto/app/login-page/login-page.component'; +import { AuthNavMenuComponent } from '../qulto/app/shared/auth-nav-menu/auth-nav-menu.component'; +import { ObjectListComponent } from '../qulto/app/shared/object-list/object-list.component'; + +const DECLARATIONS = [ + HomePageComponent, + LoginPageComponent, + AdminSidebarComponent, + ObjectListComponent, + AuthNavMenuComponent, + FullItemPageComponent, +]; + +@NgModule({ + imports: [ + RootModule, + CommonModule, + DragDropModule, + FormsModule, + HttpClientModule, + NgbModule, + RouterModule, + ScrollToModule, + StoreModule, + StoreRouterConnectingModule, + TranslateModule, + FormsModule, + NgxGalleryModule, + ...DECLARATIONS, + ], +}) + +/** + * This module serves as an index for all the components in this theme. + * It should import all other modules, so the compiler knows where to find any components referenced + * from a component in this theme + * It is purposefully not exported, it should never be imported anywhere else, its only purpose is + * to give lazily loaded components a context in which they can be compiled successfully + */ +class LazyThemeModule { +} diff --git a/src/themes/qulto/assets/i18n/en.json5 b/src/themes/qulto/assets/i18n/en.json5 index 6e3a4eaec88..c92e9946303 100644 --- a/src/themes/qulto/assets/i18n/en.json5 +++ b/src/themes/qulto/assets/i18n/en.json5 @@ -4,4 +4,60 @@ "qulto.home.welcome.description": "{{ dspaceName }} is a digital storage for electronic documents, designed for archiving and making documents accessible.", "qulto.home.welcome.functions": "Its purpose is to provide researchers, educators, and interested parties with easy access to scientific and professional materials, promoting the free flow of knowledge and the wider dissemination of the work of the academic community.", + + "dc.title.subtitle": "Subtitle", + + "dc.title.other": "Other title", + + "dc.title": "Title", + + "dc.contributor.author": "Author", + + "dc.contributor.advisor": "Advisor", + + "dc.contributor.description": "Description", + + "dc.contributor.extadvisor": "Extadvisor", + + "dc.contributor.faculty": "Faculty", + + "dc.contributor.inst": "Department", + + "dc.contributor.org": "Institution", + + "dc.contributor.workplace": "Foreign consular workplace", + + "dc.date.accessioned": "Last access date", + + "dc.date.available": "Availability date", + + "dc.date.catalog": "Catalog date", + + "dc.date.issued": "Date issued", + + "dc.date.recordid": "Record id", + + "dc.description.type": "Level", + + "dc.identifier.uri": "URI", + + "dc.language.iso": "Language", + + "dc.rights.access": "Access", + + "dc.subject": "Subject", + + "dc.type": "Document type", + + "dc.format.extent": "Extent", + + "dc.identifier.doi": "DOI", + + "dc.contributor.doctschool": "Doctoral school", + + "dc.description.appendix": "Appendix", + + "status.badge.limited": "Limited access", + + "status.badge.public": "Free access" } diff --git a/src/themes/qulto/assets/i18n/hu.json5 b/src/themes/qulto/assets/i18n/hu.json5 index 258267b40a9..d7b73309dbf 100644 --- a/src/themes/qulto/assets/i18n/hu.json5 +++ b/src/themes/qulto/assets/i18n/hu.json5 @@ -4,4 +4,64 @@ "qulto.home.welcome.description": "A {{ dspaceName }} elektronikus dokumentumok digitális tárhelye, archiválásra és a dokumentumok hozzáférhetővé tételére szolgál.", "qulto.home.welcome.functions": "Célja, hogy biztosítsa a kutatók, oktatók és érdeklődők számára a tudományos és szakmai anyagok könnyű elérhetőségét, elősegítve a tudás szabad áramlását és a tudományos közösség munkájának szélesebb körű terjesztését.", + + "dc.title.subtitle": "Alcím", + + "dc.title.other": "Egyéb cím", + + "dc.title": "Cím", + + "dc.contributor.author": "Szerző", + + "dc.contributor.advisor": "Konzulens/Témavezető", + + "dc.contributor.description": "Leírás", + + "dc.contributor.extadvisor": "Külső konzulens", + + "dc.contributor.faculty": "Kar", + + "dc.contributor.inst": "Tanszék", + + "dc.contributor.org": "Intézmény", + + "dc.contributor.workplace": "Külső konzules munkahelye", + + "dc.date.accessioned": "Utolsó hozzáférés ideje", + + "dc.date.available": "Elérhetőség dátuma", + + "dc.date.catalog": "Állományba vétel", + + "dc.date.issued": "Megjelenés éve", + + "dc.date.recordid": "Főnaplószám", + + "dc.description.type": "Képzési szint", + + "dc.identifier.uri": "URI", + + "dc.language.iso": "Nyelv", + + "dc.rights.access": "Hozzáférés", + + "dc.subject": "Tárgyszó", + + "dc.type": "Dokumentumtípus", + + "dc.title": "Cím", + + "dc.title.other": "Egyéb cím", + + "dc.format.extent": "Terjedelem", + + "dc.identifier.doi": "DOI", + + "dc.contributor.doctschool": "Doktori iskola", + + "dc.description.appendix": "Melléklet", + + "status.badge.limited": "Korlátozottan hozzáférhető", + + "status.badge.public": "Szabadon hozzáférhető" } From 746884515893d06508d6232fdb6e0adb79bc829b Mon Sep 17 00:00:00 2001 From: msutya Date: Wed, 12 Mar 2025 11:05:49 +0100 Subject: [PATCH 2/3] QREPO-262 add theme.scss to pte, use pte scss in angular.json --- angular.json | 2 +- src/themes/pte/styles/_global-styles.scss | 0 .../pte/styles/_theme_css_variable_overrides.scss | 0 .../pte/styles/_theme_sass_variable_overrides.scss | 0 src/themes/pte/styles/theme.scss | 12 ++++++++++++ 5 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 src/themes/pte/styles/_global-styles.scss create mode 100644 src/themes/pte/styles/_theme_css_variable_overrides.scss create mode 100644 src/themes/pte/styles/_theme_sass_variable_overrides.scss create mode 100644 src/themes/pte/styles/theme.scss diff --git a/angular.json b/angular.json index deda480b686..f5a4d0f3892 100644 --- a/angular.json +++ b/angular.json @@ -70,7 +70,7 @@ "bundleName": "szerep-theme" }, { - "input": "src/themes/qulto/styles/theme.scss", + "input": "src/themes/pte/styles/theme.scss", "inject": false, "bundleName": "pte-theme" } diff --git a/src/themes/pte/styles/_global-styles.scss b/src/themes/pte/styles/_global-styles.scss new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/themes/pte/styles/_theme_css_variable_overrides.scss b/src/themes/pte/styles/_theme_css_variable_overrides.scss new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/themes/pte/styles/_theme_sass_variable_overrides.scss b/src/themes/pte/styles/_theme_sass_variable_overrides.scss new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/themes/pte/styles/theme.scss b/src/themes/pte/styles/theme.scss new file mode 100644 index 00000000000..05c96f33728 --- /dev/null +++ b/src/themes/pte/styles/theme.scss @@ -0,0 +1,12 @@ +// This file combines the other scss files in to one. You usually shouldn't edit this file directly + +@import './_theme_sass_variable_overrides.scss'; +@import '../../../styles/_variables.scss'; +@import '../../../styles/_mixins.scss'; +@import '../../../styles/helpers/font_awesome_imports.scss'; +@import '../../../styles/_vendor.scss'; +@import '../../../styles/_custom_variables.scss'; +@import './_theme_css_variable_overrides.scss'; +@import '../../../styles/bootstrap_variables_mapping.scss'; +@import '../../../styles/_truncatable-part.component.scss'; +@import './_global-styles.scss'; From c1b8fad42032d955a7c739e293ec70693d492ad1 Mon Sep 17 00:00:00 2001 From: msutya Date: Wed, 12 Mar 2025 11:09:05 +0100 Subject: [PATCH 3/3] QREPO-262 delete unnecessary translations --- src/assets/i18n/en.json5 | 57 -------------------------------------- src/assets/i18n/hu.json5 | 60 ---------------------------------------- 2 files changed, 117 deletions(-) diff --git a/src/assets/i18n/en.json5 b/src/assets/i18n/en.json5 index afca8d1f89d..e02707b4599 100644 --- a/src/assets/i18n/en.json5 +++ b/src/assets/i18n/en.json5 @@ -6909,61 +6909,4 @@ "qulto.home.welcome.description": "{{ dspaceName }} is a digital storage for electronic documents, designed for archiving and making documents accessible.", "qulto.home.welcome.functions": "Its purpose is to provide researchers, educators, and interested parties with easy access to scientific and professional materials, promoting the free flow of knowledge and the wider dissemination of the work of the academic community.", - - - "dc.title.subtitle": "Subtitle", - - "dc.title.other": "Other title", - - "dc.title": "Title", - - "dc.contributor.author": "Author", - - "dc.contributor.advisor": "Advisor", - - "dc.contributor.description": "Description", - - "dc.contributor.extadvisor": "Extadvisor", - - "dc.contributor.faculty": "Faculty", - - "dc.contributor.inst": "Department", - - "dc.contributor.org": "Institution", - - "dc.contributor.workplace": "Foreign consular workplace", - - "dc.date.accessioned": "Last access date", - - "dc.date.available": "Availability date", - - "dc.date.catalog": "Catalog date", - - "dc.date.issued": "Date issued", - - "dc.date.recordid": "Record id", - - "dc.description.type": "Level", - - "dc.identifier.uri": "URI", - - "dc.language.iso": "Language", - - "dc.rights.access": "Access", - - "dc.subject": "Subject", - - "dc.type": "Document type", - - "dc.format.extent": "Extent", - - "dc.identifier.doi": "DOI", - - "dc.contributor.doctschool": "Doctoral school", - - "dc.description.appendix": "Appendix", - - "status.badge.limited": "Limited access", - - "status.badge.public": "Free access" } diff --git a/src/assets/i18n/hu.json5 b/src/assets/i18n/hu.json5 index 61e77f63765..b708c1c5031 100644 --- a/src/assets/i18n/hu.json5 +++ b/src/assets/i18n/hu.json5 @@ -6851,64 +6851,4 @@ "qulto.home.welcome.description": "A {{ dspaceName }} elektronikus dokumentumok digitális tárhelye, archiválásra és a dokumentumok hozzáférhetővé tételére szolgál.", "qulto.home.welcome.functions": "Célja, hogy biztosítsa a kutatók, oktatók és érdeklődők számára a tudományos és szakmai anyagok könnyű elérhetőségét, elősegítve a tudás szabad áramlását és a tudományos közösség munkájának szélesebb körű terjesztését.", - - "dc.title.subtitle": "Alcím", - - "dc.title.other": "Egyéb cím", - - "dc.title": "Cím", - - "dc.contributor.author": "Szerző", - - "dc.contributor.advisor": "Konzulens/Témavezető", - - "dc.contributor.description": "Leírás", - - "dc.contributor.extadvisor": "Külső konzulens", - - "dc.contributor.faculty": "Kar", - - "dc.contributor.inst": "Tanszék", - - "dc.contributor.org": "Intézmény", - - "dc.contributor.workplace": "Külső konzules munkahelye", - - "dc.date.accessioned": "Utolsó hozzáférés ideje", - - "dc.date.available": "Elérhetőség dátuma", - - "dc.date.catalog": "Állományba vétel", - - "dc.date.issued": "Megjelenés éve", - - "dc.date.recordid": "Főnaplószám", - - "dc.description.type": "Képzési szint", - - "dc.identifier.uri": "URI", - - "dc.language.iso": "Nyelv", - - "dc.rights.access": "Hozzáférés", - - "dc.subject": "Tárgyszó", - - "dc.type": "Dokumentumtípus", - - "dc.title": "Cím", - - "dc.title.other": "Egyéb cím", - - "dc.format.extent": "Terjedelem", - - "dc.identifier.doi": "DOI", - - "dc.contributor.doctschool": "Doktori iskola", - - "dc.description.appendix": "Melléklet", - - "status.badge.limited": "Korlátozottan hozzáférhető", - - "status.badge.public": "Szabadon hozzáférhető" }