Skip to content

Commit

Permalink
component and configurations for BEOL-Leibniz (#140)
Browse files Browse the repository at this point in the history
* feature (BEOL-Leibniz) creating components for BEOL-Leibniz connection

* feature (beol-Leibniz) make the scripts returned by DOMParser executable

* feature (beol-Leibniz)
-get the json for every letter from LeibnizAPI
-parse and display the "volltext"

* fix (beol-Leibniz) render inline math wrapped in dollars

* style(correspondence): Redesign the link of Newton project

* feature (beol-leibniz) add letter number and URI to PDF

* style (beol-leibniz) redesign the link to Leibniz Briefportal

* style (beol-Leibniz) preliminary implementation for the display of uri values

* style (beol-Leibniz) align the newton and leibniz tiles in one row

* style (beol-leibniz) alignment of tiles and top margin adjusted

* style (beol-leibniz) added myself to the technical contacts

* feature (beol-leibniz) add description of the connection to the 3rd party repositories

* feature (beol-Leibniz) label of the uri values should be displayed as the inner text of link

* beol (BEOL-Leibniz) quick-dirty fix for travis to ignore the need for new Knora-ui version

* update knora-ui version

* fix (beol-Leibniz) parse missing SVG files for

* fix (beol-leibniz) remove the clone of deleted branch

* fix (beol-Leibniz) fixes issue #144

* style (beol-Leibniz) remove console logs

* update (beol-Leibniz) knora-ui version update

* fix (beol-leibniz) adapt the kui-search to new changes
  • Loading branch information
SepidehAlassi authored Jun 18, 2019
1 parent ba99748 commit c187ace
Show file tree
Hide file tree
Showing 22 changed files with 771 additions and 48 deletions.
22 changes: 14 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,24 @@ services:
language: node_js

node_js:
- "11"
- "11"

cache:
yarn: true
directories:
- node_modules
yarn: true
directories:
- node_modules

addons:
chrome: stable
chrome: stable

install: yarn install --prod=false
install:
- yarn global add @angular/cli
- yarn global add yalc
- cd ~ && git clone https://github.com/dhlab-basel/Knora-ui.git && cd Knora-ui && yarn install --prod=false && yarn build-lib-prod && yarn yalc-publish
- cd $TRAVIS_BUILD_DIR

script:
- yarn test-ci
- docker build .
- yalc remove --all && yarn yalc-add-modules
- yarn install --prod=false
- yarn test-ci
- docker build .
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
"@angular/platform-browser": "^7.2.8",
"@angular/platform-browser-dynamic": "^7.2.8",
"@angular/router": "^7.2.8",
"@knora/action": "7.6.0",
"@knora/core": " 7.6.0",
"@knora/search": "7.6.0",
"@knora/viewer": "7.6.0",
"@knora/action": "8.0.0",
"@knora/core": "8.0.0",
"@knora/search": "8.0.0",
"@knora/viewer": "8.0.0",
"core-js": "^2.5.4",
"hammerjs": "^2.0.8",
"jdnconvertiblecalendar": "^0.0.3",
Expand Down
7 changes: 6 additions & 1 deletion src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@
<div class="fill-remaining-space"></div>

<!-- center: search bar -->
<kui-search [route]="'/search'"></kui-search>
<kui-search-panel
[filterbyproject]="'http://rdfh.ch/projects/0801'"
[advanced]="true"
[route]="'/search'"
[expert]="false">
</kui-search-panel>

<div class="fill-remaining-space"></div>

Expand Down
4 changes: 4 additions & 0 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { PersonComponent } from './resource/person/person.component';
import { PublisherComponent } from './resource/publisher/publisher.component';
import { LetterComponent } from './resource/letter/letter.component';
import { NewtonLetterComponent } from './resource/newton-letter/newton-letter.component';
import { LeibnizLetterComponent } from './resource/leibniz-letter/leibniz-letter.component';
import { ReadListValueComponent } from './properties/read-list-value/read-list-value.component';
import { ReadTextValueAsHtmlComponent } from './properties/read-text-value-as-html/read-text-value-as-html.component';
import { LeooRouteComponent } from './leoo-route/leoo-route.component';
Expand All @@ -43,6 +44,7 @@ import { ReadTextValueComponent } from './properties/read-text-value/read-text-v
import { SanitizeHtmlPipe } from './pipes/sanitize-html.pipe';
import { SanitizeUrlPipe } from './pipes/sanitize-url.pipe';
import { NewtonProjectDirective } from './directives/newton-project.directive';
import { LeibnizPortalDirective } from './directives/leibniz-portal.directive';

import { HanCatalogueDirective } from './directives/han-catalogue.directive';
import { BebbRouteComponent } from './bebb-route/bebb-route.component';
Expand Down Expand Up @@ -73,6 +75,7 @@ export function initializeApp(appInitService: AppInitService) {
PublisherComponent,
LetterComponent,
NewtonLetterComponent,
LeibnizLetterComponent,
ReadListValueComponent,
ReadTextValueAsHtmlComponent,
CorrespondenceComponent,
Expand All @@ -87,6 +90,7 @@ export function initializeApp(appInitService: AppInitService) {
HanCatalogueDirective,
TranscriptionComponent,
NewtonProjectDirective,
LeibnizPortalDirective,
SanitizeHtmlPipe,
SanitizeUrlPipe,
BebbRouteComponent,
Expand Down
5 changes: 5 additions & 0 deletions src/app/app.routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { FigureComponent } from './resource/figure/figure.component';
import { BiblioItemsComponent } from './resource/biblio-items/biblio-items.component';
import { PageComponent } from './resource/page/page.component';
import { NewtonLetterComponent } from './resource/newton-letter/newton-letter.component';
import { LeibnizLetterComponent } from './resource/leibniz-letter/leibniz-letter.component';
import { BebbRouteComponent } from './bebb-route/bebb-route.component';
import { TranscriptionComponent } from './resource/transcription/transcription.component';
import { ManuscriptEntryComponent } from './resource/manuscript-entry/manuscript-entry.component';
Expand Down Expand Up @@ -70,6 +71,10 @@ const appRoutes: Routes = [
path: 'newtonLetter/:id',
component: NewtonLetterComponent
},
{
path: 'leibnizLetter/:id',
component: LeibnizLetterComponent
},
{
path: 'endnote/:id',
component: EndnoteComponent
Expand Down
22 changes: 16 additions & 6 deletions src/app/contact/contact.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,23 @@ <h1 class="mat-headline">Contact for Editorial Questions</h1>
<mat-divider></mat-divider>

<section class="text">
<h2 class="mat-headline">Technical Contact</h2>
<h2 class="mat-headline">Technical Contacts</h2>

Digital Humanities Lab, University of Basel
<br/> Tobias Schweizer
<br/>
<a href="mailto:[email protected]">[email protected]</a>
<br/>
<ul>
<li>Tobias Schweizer
<br/>
<a href="mailto:[email protected]">[email protected]</a>
<br/><br/>
</li>
<li>Sepideh Alassi
<br/>
<a href="mailto:[email protected]">[email protected]</a>
<br/><br/>
</li>

</ul>


</section>

Expand All @@ -51,4 +61,4 @@ <h3 class="mat-title">Contact Form</h3>
-->

</div>
</div>
</div>
55 changes: 36 additions & 19 deletions src/app/correspondence/correspondence.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
<div *ngSwitchCase="'leooIV'">
<div *ngFor="let book of leooIV">
<div *ngFor="let corrGroup of book.correspondences">
<p><strong>Correspondence {{corrGroup.description}}</strong></p>
<p>
<strong>Correspondence {{corrGroup.description}}</strong>
</p>
<div class="container">
<div class="flex-container" fxFlex fxLayout="row wrap" fxLayout.sm="column" fxlayout.xs="column" fxFlexFill>
<mat-card class="intro-card" fxFlex *ngFor="let corr of corrGroup.correspondences"
(click)="searchForCorrespondence(corr.correspondent1.gnd, corr.correspondent2.gnd, corr.noTranslation)">
<mat-card class="intro-card" fxFlex *ngFor="let corr of corrGroup.correspondences" (click)="searchForCorrespondence(corr.correspondent1.gnd, corr.correspondent2.gnd, corr.noTranslation)">
{{corr.description}}
</mat-card>
</div>
Expand All @@ -19,14 +20,14 @@
<!-- display the correspondences of the LEOO project -->
<div *ngSwitchCase="'lece'">
<div *ngFor="let corrGroup of lece">
<p>Correspondence between <strong>{{corrGroup.mainCorrespondent.name}}</strong> and
<p>Correspondence between
<strong>{{corrGroup.mainCorrespondent.name}}</strong> and
<!-- select list to choose the recipient name (among one or several choices) -->
<mat-form-field>
<mat-select placeholder="Select Correspondent">
<div *ngFor="let section of corrGroup.sections">
<div *ngFor="let corr of section.correspondences">
<mat-option [value]="corr.correspondent2.name"
(click)="searchForCorrespondence(corr.correspondent1.gnd, corr.correspondent2.gnd)">
<mat-option [value]="corr.correspondent2.name" (click)="searchForCorrespondence(corr.correspondent1.gnd, corr.correspondent2.gnd)">
{{corr.correspondent2.name}}
</mat-option>
</div>
Expand All @@ -40,14 +41,14 @@
<div *ngSwitchCase="'bebb'">
<div *ngFor="let corrGroup of wiki">

<p>Correspondence between <strong>{{corrGroup.mainCorrespondent.name}}</strong> and
<p>Correspondence between
<strong>{{corrGroup.mainCorrespondent.name}}</strong> and
<!-- select list to choose the recipient name (among one or several choices) -->
<mat-form-field>
<mat-select placeholder="Select Correspondent">
<div *ngFor="let section of corrGroup.sections">
<div *ngFor="let corr of section.correspondences">
<mat-option [value]="corr.correspondent2.name"
(click)="searchForCorrespondence(corr.correspondent1.gnd, corr.correspondent2.gnd)">
<mat-option [value]="corr.correspondent2.name" (click)="searchForCorrespondence(corr.correspondent1.gnd, corr.correspondent2.gnd)">
{{corr.correspondent2.name}}
</mat-option>
</div>
Expand All @@ -58,23 +59,39 @@

</div>
</div>
<!-- display the correspondences of the LEOO project -->
<!-- display the correspondences of the NEWTON project -->
<div *ngSwitchCase="'newton'">
<div *ngFor="let thirdPartyProject of newton">
<div class="container">
<div class="flex-container" fxFlex fxLayout="row wrap" fxLayout.sm="column" fxlayout.xs="column" fxFlexFill>
<mat-card class="intro-card" fxFlex
(click)="searchForNewtonCorrespondence()">
{{thirdPartyProject.description}}
</mat-card>
<div *ngFor="let thirdPartyProject of newton">
<div class="newton-container">
<mat-card class="newton-intro-card" (click)="searchForNewtonCorrespondence()">
<div class="newton-photo"></div>
<div class="newton-project-link">
<p class="newton-project-title">{{thirdPartyProject.description}}</p>
</div>
</div>
</mat-card>
</div>
</div>

</div>
<div *ngSwitchCase="'leibniz'">
<div *ngFor="let thirdPartyProject of leibniz">
<div class="leibniz-container">
<mat-card class="leibniz-intro-card" (click)="searchForLeibnizCorrespondence()">
<div class="leibniz-photo"></div>
<div class="leibniz-project-link">
<p class="leibniz-project-title">{{thirdPartyProject.description}}</p>
</div>
</mat-card>
</div>
</div>

</div>

<!-- in case the project name does not exist -->
<div *ngSwitchDefault>
<p><strong>The project you are looking for does not exist!</strong></p>
<p>
<strong>The project you are looking for does not exist!</strong>
</p>
</div>

</div>
80 changes: 80 additions & 0 deletions src/app/correspondence/correspondence.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,83 @@
margin: 15px;
}
*/

.newton-container {
margin: 12px 0 12px 0;
}

.newton-intro-card {
margin-right: 10px;
margin-left: 10px;
margin-top: 20px;
padding: 0 !important;
display: flex;
height: 160px;
width: 300px;
box-shadow: none !important;
border: 1px solid #dfdfdf;
border-radius: 3px;
cursor: pointer;
}

.newton-photo {
background-image: url('/assets/images/newton.jpg');
background-size: 100% 100%;
float: left;
height: 100%;
min-width: 130px;
}

.newton-project-link {
background-color: #F1F1F1;
height: 100%;
width: 100%;
text-align: center;
}

.newton-project-title {
font-weight: 500;
font-size: 1.1em;
margin-top: 70px;
}


.leibniz-container {
margin: 12px 0 12px 0;
}

.leibniz-intro-card {
margin-right: 10px;
margin-left: 10px;
margin-top: 20px;
padding: 0 !important;
display: flex;
height: 160px;
width: 300px;
box-shadow: none !important;
border: 1px solid #dfdfdf;
border-radius: 3px;
cursor: pointer;
}

.leibniz-photo {
background-image: url('/assets/images/leibniz.jpeg');
background-size: 100% 100%;
float: left;
height: 100%;
min-width: 130px;
}

.leibniz-project-link {
background-color: #F1F1F1;
height: 100%;
width: 100%;
text-align: center;
}

.leibniz-project-title {
font-weight: 500;
font-size: 1.1em;
margin-top: 70px;

}
19 changes: 17 additions & 2 deletions src/app/correspondence/correspondence.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export class CorrespondenceComponent implements OnInit {
lece: CorrespondenceGroupWithSection[];
wiki: CorrespondenceGroupWithSection[];
newton: ThirdPartyProject[];
leibniz: ThirdPartyProject[];

constructor(
private _router: Router,
Expand Down Expand Up @@ -335,9 +336,13 @@ export class CorrespondenceComponent implements OnInit {
])])
];
this.newton = [
new ThirdPartyProject('The Newton Project')
new ThirdPartyProject('The Newton Project')

];
];
this.leibniz = [
new ThirdPartyProject('Briefportal Leibniz')

];
/**
* Collection of correspondences the user can select from.
*/
Expand Down Expand Up @@ -516,6 +521,16 @@ export class CorrespondenceComponent implements OnInit {

this.submitQuery(gravsearch);
}
/**
* * Generate Gravsearch query to search for Leibniz Correspondence.
*/
searchForLeibnizCorrespondence() {

const gravsearch: string = this._beol.searchForLeibnizCorrespondence(0);

this.submitQuery(gravsearch);
}
/**
* Show a correspondence between two persons.
*
Expand Down
Loading

0 comments on commit c187ace

Please sign in to comment.