Skip to content

Commit

Permalink
ukrepo theme
Browse files Browse the repository at this point in the history
redoing commits of dspace-7.2 based customer/uk branch to have a clean history

Merge commit 'd512b7b0d8' into customer/uk
  • Loading branch information
kosarko committed Nov 12, 2024
2 parents d32c479 + b9ac411 commit f4651be
Show file tree
Hide file tree
Showing 37 changed files with 1,796 additions and 4 deletions.
5 changes: 5 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@
"input": "src/themes/dspace/styles/theme.scss",
"inject": false,
"bundleName": "dspace-theme"
},
{
"input": "src/themes/ukrepo/styles/theme.scss",
"inject": false,
"bundleName": "ukrepo-theme"
}
],
"scripts": [
Expand Down
4 changes: 4 additions & 0 deletions config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ rest:
port: 8080
nameSpace: /server

themes:
- name: 'ukrepo'
extends: 'dspace'

# Caching settings
cache:
# NOTE: how long should objects be cached for by default
Expand Down
2 changes: 1 addition & 1 deletion src/assets/i18n/cs.json5
Original file line number Diff line number Diff line change
Expand Up @@ -2383,7 +2383,7 @@
// "home.top-level-communities.help": "Select a community to browse its collections.",
"home.top-level-communities.help": "Vyberte komunitu a procházejte její kolekce.",
// "home-page.carousel.ldata.info": "Linguistic Data and NLP Tools",
"home-page.carousel.ldata.info": "Lingvistická data a nástroje",
"home-page.carousel.ldata.info": "Data a nástroje",
// "home-page.carousel.ldata.find": "Find",
"home-page.carousel.ldata.find": "Vyhledávání",
// "home-page.carousel.ldata.citation-support": "Citation Support (with Persistent IDs)",
Expand Down
2 changes: 1 addition & 1 deletion src/assets/i18n/en.json5
Original file line number Diff line number Diff line change
Expand Up @@ -1935,7 +1935,7 @@
"home.top-level-communities.help": "Select a community to browse its collections.",


"home-page.carousel.ldata.info": "Linguistic Data and NLP Tools",
"home-page.carousel.ldata.info": "Data and Tools",

"home-page.carousel.ldata.find": "Find",

Expand Down
6 changes: 4 additions & 2 deletions src/themes/eager-themes.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { NgModule } from '@angular/core';
import { EagerThemeModule as DSpaceEagerThemeModule } from './dspace/eager-theme.module';
import { EagerThemeModule as UKRepoEagerThemeModule } from './ukrepo/eager-theme.module';
// import { EagerThemeModule as DSpaceEagerThemeModule } from './dspace/eager-theme.module';
// import { EagerThemeModule as CustomEagerThemeModule } from './custom/eager-theme.module';

/**
Expand All @@ -11,7 +12,8 @@ import { EagerThemeModule as DSpaceEagerThemeModule } from './dspace/eager-theme
*/
@NgModule({
imports: [
DSpaceEagerThemeModule,
UKRepoEagerThemeModule,
// DSpaceEagerThemeModule,
// CustomEagerThemeModule,
],
})
Expand Down
3 changes: 3 additions & 0 deletions src/themes/ukrepo/app/footer/footer.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<footer class="text-lg-start">
<p style="color:white">Test version of Data Repository at Charles University</p>
</footer>
45 changes: 45 additions & 0 deletions src/themes/ukrepo/app/footer/footer.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
:host {
footer {
background-color: var(--ds-footer-bg);
text-align: center;
z-index: var(--ds-footer-z-index);
border-top: var(--ds-footer-border);
padding: var(--ds-footer-padding);

p {
margin: 0;
}

div > img {
height: var(--ds-footer-logo-height);
}


.top-footer {
background-color: var(--ds-top-footer-bg);
padding: var(--ds-footer-padding);
margin: calc(var(--ds-footer-padding) * -1);
}

.bottom-footer {
ul {
li {
display: inline-flex;

a {
padding: 0 calc(var(--bs-spacer) / 2);
color: inherit
}

&:not(:last-child) {
&:after {
content: '';
border-right: 1px var(--bs-secondary) solid;
}

}
}
}
}
}
}
12 changes: 12 additions & 0 deletions src/themes/ukrepo/app/footer/footer.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Component } from '@angular/core';
import { FooterComponent as BaseComponent } from '../../../../app/footer/footer.component';

@Component({
selector: 'ds-footer',
styleUrls: ['./footer.component.scss'],
// styleUrls: ['../../../../app/footer/footer.component.scss'],
templateUrl: './footer.component.html'
// templateUrl: '../../../../app/footer/footer.component.html'
})
export class FooterComponent extends BaseComponent {
}
4 changes: 4 additions & 0 deletions src/themes/ukrepo/app/header/header.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<header class="header" style="text-align:center; background:silver;">
<ds-clarin-navbar-top></ds-clarin-navbar-top>
<p style="color: black;">Test version of Data Repository at Charles University</p>
</header>
37 changes: 37 additions & 0 deletions src/themes/ukrepo/app/header/header.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
@media screen and (min-width: map-get($grid-breakpoints, md)) {
nav.navbar {
display: none;
}
.header {
background-color: var(--ds-header-bg);
}
}

.header {
position: relative;
}

.clarin-logo {
height: var(--ds-login-logo-height);
width: var(--ds-login-logo-width);
}

.navbar-brand img {
@media screen and (max-width: map-get($grid-breakpoints, md)) {
height: var(--ds-header-logo-height-xs);
}
}

.navbar-toggler .navbar-toggler-icon {
background-image: none !important;
line-height: 1.5;
}

.navbar-toggler {
color: var(--ds-header-icon-color);

&:hover, &:focus {
color: var(--ds-header-icon-color-hover);
}
}

13 changes: 13 additions & 0 deletions src/themes/ukrepo/app/header/header.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Component } from '@angular/core';
import { HeaderComponent as BaseComponent } from '../../../../app/header/header.component';

/**
* Represents the header with the logo and simple navigation
*/
@Component({
selector: 'ds-header',
styleUrls: ['header.component.scss'],
templateUrl: 'header.component.html',
})
export class HeaderComponent extends BaseComponent {
}
127 changes: 127 additions & 0 deletions src/themes/ukrepo/app/home-page/home-page.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
<div class="container clarin-shadow remove-padding clarin-home-page-borders clarin-fix-to-navbar clarin-cut-bottom">
<div class="container bg-white">
<div class="row d-none d-md-flex">
<div class="col-md-8 justify-content-center align-self-center pl-3">
<ngb-carousel>
<ng-template ngbSlide *ngFor="let slide of slides">
<div class="wrapper">
<div *ngIf="slide.short === 'LData'">
<img src="assets/images/home-page-glass.png" class="glass-image">
<h3 class="carousel-ldata-info">{{'home-page.carousel.ldata.info' | translate}}</h3>
<h5 class="carousel-ldata-find">{{'home-page.carousel.ldata.find' | translate}}</h5>
<h5 class="carousel-ldata-citation-support">{{'home-page.carousel.ldata.citation-support' | translate}}</h5>
</div>
<div *ngIf="slide.short === 'Free Deposit'">
<h3 class="h5-font carousel-deposit-header">{{'home-page.carousel.deposit.header' | translate}}</h3>
<h5 class="h5-font carousel-deposit-info">{{'home-page.carousel.deposit.info' | translate}}</h5>
<h5 class="h5-font carousel-deposit-find">{{'home-page.carousel.deposit.find' | translate}}</h5>
<h5 class="h5-font carousel-deposit-cite">{{'home-page.carousel.deposit.cite' | translate}}</h5>
</div>
<div *ngIf="slide.short === 'Citation'">
<div class="carousel-deposit-citation">
<blockquote class="h5-font">
<strong>
<i class="fa fa-quote-left fa-2x pull-left">&nbsp;</i>{{'home-page.carousel.deposit.citation' | translate}}</strong>
<small>{{'home-page.carousel.deposit.small' | translate}}</small>
</blockquote>
</div>
</div>
</div>
</ng-template>
</ngb-carousel>
</div>
<div class="col-md-4 d-none d-lg-block">
<div class="row">
<a class="col-md-12" style="height: 160px; position: relative;" href="https://cuni.cz">
<img alt="CUNI logo" class="logo" style="position: absolute; height: 75%; top: 0px; bottom: 0px; margin: auto;" src="assets/ukrepo/images/UK-logo-specialni-EN.svg">
</a>
</div>
</div>
</div>
</div>
<div class="container">
<div class="row hidden-xs lindat-color-line">&nbsp;</div>
</div>
<div class="container clarin-home-page-color pt-4 pb-5">
<div class="row justify-content-center pt-4">
<div class="col-6 d-flex justify-content-center">
<span class="flex-fill input-group-addon">
<i style="color: #7479B8;" class="fas fa-search fa-lg"></i>
</span>
<ds-themed-search-form id="search-form"
class="flex-fill"
[currentUrl]="searchLink"
[inPlaceSearch]="false"
[searchPlaceholder]="'home-page.search' | translate">
</ds-themed-search-form>
</div>
</div>
<div class="row justify-content-center pt-3">
<a href="javascript:void(0);" (click)="redirectToSearch('')">{{'home-page.advanced-search' | translate}}</a>
</div>
<div class="row justify-content-center pt-5">
<div class="col-md-9 responsive-padding">
<div class="row offset-md-1">
<div class="col-md-4 border-bottom">
<strong>{{'home-page.hyperlink.author.message' | translate}}</strong>
<div *ngFor="let authorLink of (authors$| async); let i = index">
<span><a [href]="authorLink.url">{{ authorLink.name }} ({{ authorLink.occurrences }})</a></span>
</div>
<div>
<a href="javascript:void(0);" (click)="redirectToBrowseByField('author')">
{{ 'home-page.hyperlink.view-more.message' | translate }}
</a>
</div>
</div>
<div class="col-md-4 border-bottom">
<strong>{{'home-page.hyperlink.subject.message' | translate}}</strong>
<div *ngFor="let subjectLink of (subjects$| async); let i = index">
<span><a [href]="subjectLink.url">{{ subjectLink.name }} ({{ subjectLink.occurrences }})</a></span>
</div>
<div>
<a href="javascript:void(0);" (click)="redirectToBrowseByField('subject')">
{{ 'home-page.hyperlink.view-more.message' | translate }}
</a>
</div>
</div>
<div class="col-md-4 border-bottom">
<strong>{{'home-page.hyperlink.language.message' | translate}}</strong>
<div *ngFor="let languageLink of (languages$| async); let i = index">
<span><a [href]="languageLink.url">{{ languageLink.name }} ({{ languageLink.occurrences }})</a></span>
</div>
<div>
<a href="javascript:void(0);" (click)="redirectToBrowseByField('language')">
{{ 'home-page.hyperlink.view-more.message' | translate }}
</a>
</div>
</div>
</div>
</div>
</div>
</div>

<div class="container pt-3">
<div class="card clarin-home-page-items-color">
<div class="card-body">
<div class="justify-content-between d-flex">
<div class="recent-submissions-head flex-fill">{{'home-page.whats-new.message' | translate}}</div>
<ds-rss class="ml-1 override-css"></ds-rss>
</div>
<ds-clarin-item-box-view
*ngFor="let newItem of (newItems$ | async)"
[object]="newItem"></ds-clarin-item-box-view>
</div>
</div>
</div>

<div class="container pt-3 pb-5">
<div class="card clarin-home-page-items-color">
<div class="card-body">
<div class="top-items-head">{{'home-page.new-items.message' | translate}}</div>
<ds-clarin-item-box-view
*ngFor="let topItem of (topItems$ | async)"
[object]="topItem"></ds-clarin-item-box-view>
</div>
</div>
</div>
</div>
Loading

0 comments on commit f4651be

Please sign in to comment.