diff --git a/src/app/app.component.html b/src/app/app.component.html index 47e10b7..30bd8ae 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1,8 +1,16 @@ - - - - - Log out + +
+ +
+
+ +
+
+ +
+
+ +
diff --git a/src/app/app.component.scss b/src/app/app.component.scss index 03cf2e4..3112ab2 100644 --- a/src/app/app.component.scss +++ b/src/app/app.component.scss @@ -11,7 +11,12 @@ border-bottom-style: solid; height: 65px; } - +.mat-button { + color: rgba(241, 231, 256, 0.4); +} +.but { + padding: 0 10px; +} footer { margin-left: 10px; margin-right: 10px; diff --git a/src/app/components/photo-page/photo-page.component.ts b/src/app/components/photo-page/photo-page.component.ts index 7e08ff1..cb3f32f 100644 --- a/src/app/components/photo-page/photo-page.component.ts +++ b/src/app/components/photo-page/photo-page.component.ts @@ -220,7 +220,6 @@ export class PhotoPageComponent implements OnInit { const physcop = this.helpers.getLinkedStillImage(onephoto, prop); imageBaseURL = physcop[0].iiifBaseUrl; imageFileName = physcop[0].filename; - // // get turkish name and firstname of anchor person // @@ -249,7 +248,7 @@ export class PhotoPageComponent implements OnInit { let firstName : string = ''; let index = 0; let miny = 99999; - let maxy = -99999 + let maxy = -99999; for (let person of peopleOnPicValues) { relValue = this.helpers.getStringValue(person, relationshipProp); roiValue = this.helpers.getStringValue(person, roiProp); @@ -273,7 +272,6 @@ export class PhotoPageComponent implements OnInit { p.x = xcnt[p.y]; xcnt[p.y]++; } - console.log(peopleOnPic); /* for (const peopleOnPicLinkValue of peopleOnPicLinkValues) { const gaga = peopleOnPicLinkValue[0].linkedResource; @@ -322,7 +320,7 @@ export class PhotoPageComponent implements OnInit { fileName = this.helpers.getLinkedTextValueAsString(onephoto, physProp, fileNameProp)[0]; */ this.showProgbar = false; - return new PhotoPageData( + const toReturn = new PhotoPageData( photoIri, label, imageBaseURL, @@ -332,6 +330,8 @@ export class PhotoPageComponent implements OnInit { fileName[0], anchorPersons, peopleOnPic); + console.log(toReturn); + return toReturn; })[0]; } ); diff --git a/src/app/components/search-page/search-page.component.html b/src/app/components/search-page/search-page.component.html index 1bc5e0b..8c5484e 100644 --- a/src/app/components/search-page/search-page.component.html +++ b/src/app/components/search-page/search-page.component.html @@ -121,9 +121,11 @@ - +
+

Please choose a resource type first

+
- +
diff --git a/src/app/components/search-page/search-page.component.scss b/src/app/components/search-page/search-page.component.scss index 2993ea9..1baa7c7 100644 --- a/src/app/components/search-page/search-page.component.scss +++ b/src/app/components/search-page/search-page.component.scss @@ -4,6 +4,7 @@ flex-direction: column; align-items: center; height: 100%; + overflow: auto; mat-card { padding: 0; @@ -78,6 +79,9 @@ } } +.warning { + color: red; +} mat-form-field { margin: 0 0.5rem; diff --git a/src/app/components/search-page/search-page.component.ts b/src/app/components/search-page/search-page.component.ts index 2fa29bc..106d5e2 100644 --- a/src/app/components/search-page/search-page.component.ts +++ b/src/app/components/search-page/search-page.component.ts @@ -70,7 +70,7 @@ export class SearchPageComponent implements OnInit, OnDestroy { lists: { [index: string]: Array } = {}; minDate: Date; maxDate: Date; - + resWarning = false; searchResults: Array; columnsToDisplay: Array = ['0', '1', '2']; @@ -93,7 +93,7 @@ export class SearchPageComponent implements OnInit, OnDestroy { this.router.navigateByUrl('/login'); } this.getOnto(); - this.loadFromStorage(); + // this.loadFromStorage(); } loadFromStorage() { @@ -425,8 +425,15 @@ export class SearchPageComponent implements OnInit, OnDestroy { console.log(querystring); this.fire(querystring); } - + searchClicked(enteredString: string) { + if (!this.selectedResourceType) { + this.resWarning = true; + } else { + this.createGravfieldQuery(enteredString); + } + } fire(querystring) { + this.resWarning = false; this.showProgbar = true; this.knoraService.gravsearchQueryByStringCount(querystring).subscribe( (no: number) => { diff --git a/src/app/components/simple-search/simple-search.component.scss b/src/app/components/simple-search/simple-search.component.scss index b8bbdfe..6437377 100644 --- a/src/app/components/simple-search/simple-search.component.scss +++ b/src/app/components/simple-search/simple-search.component.scss @@ -4,6 +4,7 @@ flex-direction: column; align-items: center; height: 100%; + overflow: auto; mat-card { padding: 0; diff --git a/src/app/login-page/login-page.component.html b/src/app/login-page/login-page.component.html index f2c6a11..3a21718 100644 --- a/src/app/login-page/login-page.component.html +++ b/src/app/login-page/login-page.component.html @@ -1 +1,21 @@ - +
+

Welcome to the Portraits of Unbelonging repository!

+ + + + Log In + + + + + + + + + + + + + +
+ diff --git a/src/app/login-page/login-page.component.scss b/src/app/login-page/login-page.component.scss index e69de29..0ec8b77 100644 --- a/src/app/login-page/login-page.component.scss +++ b/src/app/login-page/login-page.component.scss @@ -0,0 +1,41 @@ +.wrapper { + background-color: rgba(241, 231, 256, 0.4); + display: flex; + flex-flow: row wrap; + align-items: center; + justify-content: space-between; + height: 100%; + overflow: auto;} +.mat-card { + width: 30%; + height: 30%; + padding: 0; + margin: 3rem 0 2rem; + + + mat-card-header { + padding: 16px 0 0 16px; + color: white; + background-color: rgb(97, 63, 176); + } + + mat-card-content { + display: flex; + flex-direction: column; + justify-content: space-evenly; + padding: 16px; + mat-form-field { + flex-grow: 1; + margin: 0 0.5rem; + } + button {width: 20%;} + } + } + +.title { + width: 100%; + text-align: center; +} +img { + padding: 0 1% 0 1%; +} diff --git a/src/app/login-page/login-page.component.ts b/src/app/login-page/login-page.component.ts index 2088e95..259b2af 100644 --- a/src/app/login-page/login-page.component.ts +++ b/src/app/login-page/login-page.component.ts @@ -10,13 +10,26 @@ import {Router} from '@angular/router'; styleUrls: ['./login-page.component.scss'] }) export class LoginPageComponent implements OnInit { - + images: string[] = ['BPwNmMl8WMR-EMNXi7mIxj1.jp2', 'KoFbGwVW4eg-GS2ZxciAt3u.jp2']; + baseUrl: string = 'https://iiif.pou.test.dasch.swiss:443/0827'; constructor(public dialog: MatDialog, public knoraService: KnoraService, private router: Router) { } ngOnInit() { } + calcImageWidth(): number { + return Math.floor(window.innerWidth / 4.5); + } + fire(email: string, password: string){ + this.knoraService.login(email, password).subscribe(data => { + if (!data.success) { + return; // TODO + } else { + this.router.navigateByUrl('/home'); + } + }); + } private openLoginDialog(): void { const loginConfig = new MatDialogConfig(); loginConfig.autoFocus = true;