Skip to content

Commit

Permalink
based on tag dspace-7.6 adding yorkspace them
Browse files Browse the repository at this point in the history
  • Loading branch information
amtuannguyen committed Oct 25, 2023
1 parent 404ccd9 commit 0a72297
Show file tree
Hide file tree
Showing 50 changed files with 961 additions and 66 deletions.
5 changes: 5 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@
"input": "src/themes/dspace/styles/theme.scss",
"inject": false,
"bundleName": "dspace-theme"
},
{
"input": "src/themes/yorkspace/styles/theme.scss",
"inject": false,
"bundleName": "yorkspace-theme"
}
],
"scripts": [],
Expand Down
83 changes: 82 additions & 1 deletion config/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,86 @@
ui:
ssl: false
host: 0.0.0.0
port: 4000
# NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript
nameSpace: /
# The rateLimiter settings limit each IP to a 'max' of 500 requests per 'windowMs' (1 minute).
rateLimiter:
windowMs: 60000 # 1 minute
max: 500 # limit each IP to 500 requests per windowMs
# Trust X-FORWARDED-* headers from proxies (default = true)
useProxies: true

rest:
ssl: true
host: api7.dspace.org
host: ys.library.yorku.ca
port: 443
nameSpace: /server

themes:
- name: {{ theme_name }}
headTags:
- tagName: link
attributes:
rel: icon
href: https://www.yorku.ca/wp-content/themes/york2020/favicon.ico
sizes: any
- tagName: link
attributes:
rel: apple-touch-icon
href: https://www.yorku.ca/wp-content/themes/york2020/apple-touch-icon.png

languages:
- code: en
label: English
active: true
- code: fr
label: Français
active: true

homePage:
recentSubmissions:
# The number of item showing in recent submission components
pageSize: 5
# Sort record of recent submission
sortField: 'dc.date.accessioned'
topLevelCommunityList:
# No. of communities to list per page on the home page
# This will always round to the nearest number from the list of page sizes. e.g. if you set it to 7 it'll use 10
pageSize: 100

communityList:
# No. of communities to list per expansion (show more)
pageSize: 100

mediaViewer:
image: false
video: false

info:
# Whether the end user agreement is required before users may use the repository.
# If enabled, the user will be required to accept the agreement before they can use the repository.
# If disabled, the page will not exist and no agreement is required to use the repository
enableEndUserAgreement: false
# Whether the privacy statement should exist or not.
enablePrivacyStatement: false

cache:
serverSide:
botCache:
max: 1000
timeToLive: 86400000 # 1 day
allowStale: true
anonymousCache:
max: 1000
timeToLive: 30000 # 30 seconds
allowStale: false

item:
showAccessStatuses: true
bitstream:
pageSize: 20

markdown:
enabled: true
mathjax: true
53 changes: 6 additions & 47 deletions src/app/footer/footer.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,7 @@
<div *ngIf="showTopFooter" class="top-footer">
<!-- Grid container -->
<div class=" container p-4">
<!--Grid row-->
<div class="row">

<!--Grid column-->
<div class="col-lg-4 col-md-6 mb-4 mb-lg-0">
<h5 class="text-uppercase">Footer Content</h5>

<ul class="list-unstyled mb-0">
<li>
<a routerLink="./" class="">Lorem ipsum</a>
</li>
<li>
<a routerLink="./" class="">Ut facilisis</a>
</li>
<li>
<a routerLink="./" class="">Aenean sit</a>
</li>
</ul>
</div>
<!--Grid column-->

<!--Grid column-->
<div class="col-lg-4 col-md-6 mb-4 mb-lg-0">
<h5 class="text-uppercase">Footer Content</h5>

<ul class="list-unstyled mb-0">
<li>
<a routerLink="./" class="">Suspendisse potenti</a>
</li>
</ul>
</div>
<!--Grid column-->

<!--Grid column-->
<div class="col-lg-4 col-md-12 mb-4 mb-md-0">
<h5 class="text-uppercase">Footer Content</h5>

<p>
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Iste atque ea quis
molestias. Fugiat pariatur maxime quis culpa corporis vitae repudiandae aliquam
voluptatem veniam, est atque cumque eum delectus sint!
</p>
</div>
<!--Grid column-->
</div>
<!--Grid row-->
<p>{{ 'yorkspace.footer.copyright' | translate}}</p>
</div>
</div>
<!-- Grid container -->
Expand All @@ -56,17 +11,21 @@ <h5 class="text-uppercase">Footer Content</h5>
<div class="bottom-footer p-1 d-flex justify-content-center align-items-center text-white">
<div class="content-container">
<p class="m-0">
<!--
<a class="text-white"
href="http://www.dspace.org/">{{ 'footer.link.dspace' | translate}}</a>
{{ 'footer.copyright' | translate:{year: dateObj | date:'y'} }}
<a class="text-white"
href="https://www.lyrasis.org/">{{ 'footer.link.lyrasis' | translate}}</a>
-->
</p>
<ul class="footer-info list-unstyled small d-flex justify-content-center mb-0">
<!--
<li>
<a class="text-white" href="javascript:void(0);"
(click)="showCookieSettings()">{{ 'footer.link.cookies' | translate}}</a>
</li>
-->
<li *ngIf="showPrivacyPolicy">
<a class="text-white"
routerLink="info/privacy">{{ 'footer.link.privacy-policy' | translate}}</a>
Expand All @@ -75,7 +34,7 @@ <h5 class="text-uppercase">Footer Content</h5>
<a class="text-white"
routerLink="info/end-user-agreement">{{ 'footer.link.end-user-agreement' | translate}}</a>
</li>
<li *ngIf="showSendFeedback$ | async">
<li>
<a class="text-white"
routerLink="info/feedback">{{ 'footer.link.feedback' | translate}}</a>
</li>
Expand Down
19 changes: 4 additions & 15 deletions src/app/footer/footer.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import { Component, Optional } from '@angular/core';
import { hasValue } from '../shared/empty.util';

Check failure on line 2 in src/app/footer/footer.component.ts

View workflow job for this annotation

GitHub Actions / tests (16.x)

'hasValue' is defined but never used

Check failure on line 2 in src/app/footer/footer.component.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

'hasValue' is defined but never used
import { KlaroService } from '../shared/cookies/klaro.service';
import { environment } from '../../environments/environment';

Check failure on line 4 in src/app/footer/footer.component.ts

View workflow job for this annotation

GitHub Actions / tests (16.x)

'environment' is defined but never used

Check failure on line 4 in src/app/footer/footer.component.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

'environment' is defined but never used
import { Observable } from 'rxjs';
import { AuthorizationDataService } from '../core/data/feature-authorization/authorization-data.service';
import { FeatureID } from '../core/data/feature-authorization/feature-id';

@Component({
selector: 'ds-footer',
Expand All @@ -17,22 +14,14 @@ export class FooterComponent {
/**
* A boolean representing if to show or not the top footer container
*/
showTopFooter = false;
showPrivacyPolicy = environment.info.enablePrivacyStatement;
showEndUserAgreement = environment.info.enableEndUserAgreement;
showSendFeedback$: Observable<boolean>;
showTopFooter = true;
showPrivacyPolicy = false;
showEndUserAgreement = false;

constructor(
@Optional() private cookies: KlaroService,
private authorizationService: AuthorizationDataService,
) {
this.showSendFeedback$ = this.authorizationService.isAuthorized(FeatureID.CanSendFeedback);
constructor(@Optional() private cookies: KlaroService) {
}

showCookieSettings() {
if (hasValue(this.cookies)) {
this.cookies.showSettings();
}
return false;
}
}
1 change: 0 additions & 1 deletion src/app/login-page/login-page.component.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<div class="container w-100 h-100">
<div class="text-center mt-5 row justify-content-center">
<div>
<img class="mb-4 login-logo" src="assets/images/dspace-logo.png" alt="{{'repository.image.logo' | translate}}">
<h1 class="h3 mb-0 font-weight-normal">{{"login.form.header" | translate}}</h1>
<ds-log-in
[isStandalonePage]="true"></ds-log-in>
Expand Down
62 changes: 62 additions & 0 deletions src/app/menu.resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,68 @@ export class MenuResolver implements Resolve<boolean> {
*/
createPublicMenu$(): Observable<boolean> {
const menuList: any[] = [
/* About YorkSpace tree */
{
id: `about_yorkspace`,
active: false,
visible: true,
model: {
type: MenuItemType.TEXT,
text: `menu.section.about`,
} as TextMenuItemModel
},
{
id: `about_yorkspace_link_1`,
parentID: 'about_yorkspace',
active: false,
visible: true,
model: {
type: MenuItemType.EXTERNAL,
text: `menu.section.about_yorkspace`,
href: `https://www.library.yorku.ca/web/collections/yorkspace/`,
disabled: false,
link: `https://www.library.yorku.ca/web/collections/yorkspace/`
} as LinkMenuItemModel
},
{
id: `about_yorkspace_link_2`,
parentID: 'about_yorkspace',
active: false,
visible: true,
model: {
type: MenuItemType.EXTERNAL,
text: `menu.section.yorkspace_procedures`,
href: `https://www.library.yorku.ca/web/collections/yorkspace/yorkspace-procedures/`,
disabled: false,
link: `https://www.library.yorku.ca/web/collections/yorkspace/yorkspace-procedures/`
} as LinkMenuItemModel
},
{
id: `about_yorkspace_link_3`,
parentID: 'about_yorkspace',
active: false,
visible: true,
model: {
type: MenuItemType.EXTERNAL,
text: `menu.section.yorkspace_licence`,
href: `https://www.library.yorku.ca/web/collections/yorkspace/yorkspace-license/`,
disabled: false,
link: `https://www.library.yorku.ca/web/collections/yorkspace/yorkspace-license/`
} as LinkMenuItemModel
},
{
id: `about_yorkspace_link_4`,
parentID: 'about_yorkspace',
active: false,
visible: true,
model: {
type: MenuItemType.EXTERNAL,
text: `menu.section.yorkspace_help_resources`,
href: `https://www.library.yorku.ca/web/collections/yorkspace/yorkspace-help-resources/`,
disabled: false,
link: `https://www.library.yorku.ca/web/collections/yorkspace/yorkspace-help-resources/`
} as LinkMenuItemModel
},
/* Communities & Collections tree */
{
id: `browse_global_communities_and_collections`,
Expand Down
4 changes: 2 additions & 2 deletions src/themes/eager-themes.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NgModule } from '@angular/core';
import { EagerThemeModule as DSpaceEagerThemeModule } from './dspace/eager-theme.module';
import { EagerThemeModule as YorkSpaceEagerThemeModule } from './yorkspace/eager-theme.module';
// import { EagerThemeModule as CustomEagerThemeModule } from './custom/eager-theme.module';

/**
Expand All @@ -11,7 +11,7 @@ import { EagerThemeModule as DSpaceEagerThemeModule } from './dspace/eager-theme
*/
@NgModule({
imports: [
DSpaceEagerThemeModule,
YorkSpaceEagerThemeModule,
// CustomEagerThemeModule,
],
})
Expand Down
2 changes: 2 additions & 0 deletions src/themes/yorkspace/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.DS_Store
assets/.DS_Store
73 changes: 73 additions & 0 deletions src/themes/yorkspace/app/about-yorkspace-menu.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
diff --git a/app/menu.resolver.ts.txt b/app/menu.resolver.ts.txt
index cad6a6e..1108f3d 100644
--- a/app/menu.resolver.ts.txt
+++ b/app/menu.resolver.ts.txt
@@ -93,6 +93,68 @@ export class MenuResolver implements Resolve<boolean> {
*/
createPublicMenu$(): Observable<boolean> {
const menuList: any[] = [
+ /* About YorkSpace tree */
+ {
+ id: `about_yorkspace`,
+ active: false,
+ visible: true,
+ model: {
+ type: MenuItemType.TEXT,
+ text: `menu.section.about`,
+ } as TextMenuItemModel
+ },
+ {
+ id: `about_yorkspace_link_1`,
+ parentID: 'about_yorkspace',
+ active: false,
+ visible: true,
+ model: {
+ type: MenuItemType.EXTERNAL,
+ text: `menu.section.about_yorkspace`,
+ href: `https://www.library.yorku.ca/web/collections/yorkspace/`,
+ disabled: false,
+ link: `https://www.library.yorku.ca/web/collections/yorkspace/`
+ } as LinkMenuItemModel
+ },
+ {
+ id: `about_yorkspace_link_2`,
+ parentID: 'about_yorkspace',
+ active: false,
+ visible: true,
+ model: {
+ type: MenuItemType.EXTERNAL,
+ text: `menu.section.yorkspace_procedures`,
+ href: `https://www.library.yorku.ca/web/collections/yorkspace/yorkspace-procedures/`,
+ disabled: false,
+ link: `https://www.library.yorku.ca/web/collections/yorkspace/yorkspace-procedures/`
+ } as LinkMenuItemModel
+ },
+ {
+ id: `about_yorkspace_link_3`,
+ parentID: 'about_yorkspace',
+ active: false,
+ visible: true,
+ model: {
+ type: MenuItemType.EXTERNAL,
+ text: `menu.section.yorkspace_licence`,
+ href: `https://www.library.yorku.ca/web/collections/yorkspace/yorkspace-license/`,
+ disabled: false,
+ link: `https://www.library.yorku.ca/web/collections/yorkspace/yorkspace-license/`
+ } as LinkMenuItemModel
+ },
+ {
+ id: `about_yorkspace_link_4`,
+ parentID: 'about_yorkspace',
+ active: false,
+ visible: true,
+ model: {
+ type: MenuItemType.EXTERNAL,
+ text: `menu.section.yorkspace_help_resources`,
+ href: `https://www.library.yorku.ca/web/collections/yorkspace/yorkspace-help-resources/`,
+ disabled: false,
+ link: `https://www.library.yorku.ca/web/collections/yorkspace/yorkspace-help-resources/`
+ } as LinkMenuItemModel
+ },
/* Communities & Collections tree */
{
id: `browse_global_communities_and_collections`,
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div [ngClass]="{'open': !(isNavBarCollapsed | async)}">
<ds-themed-header></ds-themed-header>
</div>
Empty file.
Loading

0 comments on commit 0a72297

Please sign in to comment.