|
1 | | -<form> |
2 | | - <h3>Hathitrust Bibliographic API</h3> |
3 | | - <p>This API is open and does not require authentication. Enter an identifier and select an identifier type to search the API.</p> |
4 | | - <section class="settings-section"> |
5 | | - <mat-form-field> |
6 | | - <mat-label>Identifier Type</mat-label> |
7 | | - <mat-select value="isbn" #identifierType> |
8 | | - <mat-option value="oclc">OCLC Number</mat-option> |
9 | | - <mat-option value="lccn">LCCN</mat-option> |
10 | | - <mat-option value="issn">ISSN</mat-option> |
11 | | - <mat-option value="isbn">ISBN</mat-option> |
12 | | - <mat-option value="htid">HathiTrust Volume ID</mat-option> |
13 | | - <mat-option value="recordnumber">HathiTrust record number</mat-option> |
14 | | - </mat-select> |
15 | | - </mat-form-field> |
16 | | - </section> |
17 | | - <section class="settings-section"> |
18 | | - <mat-form-field> |
19 | | - <mat-label>Identifier</mat-label> |
20 | | - <input matInput #identifier value="0394530934"> |
21 | | - </mat-form-field> |
22 | | - </section> |
23 | | -</form> |
24 | | - |
25 | | -<div class="commands-container"> |
26 | | - <button mat-stroked-button type="button" color="primary" (click)="search(identifierType.value, identifier.value)">Search</button> |
27 | | - <mat-spinner diameter="30" class="spinner" *ngIf="running.search"></mat-spinner> |
| 1 | +<app-topmenu></app-topmenu> |
| 2 | +<div class="loading-shade" *ngIf="running"> |
| 3 | + <mat-progress-spinner mode="indeterminate" diameter="50"></mat-progress-spinner> |
| 4 | +</div> |
| 5 | +<div class="section"> |
| 6 | + <form> |
| 7 | + <h2>HathiTrust Bibliographic API</h2> |
| 8 | + <p>This API is open and does not require authentication. Enter an identifier and select an identifier type to search the API.</p> |
| 9 | + <section class="settings-section"> |
| 10 | + <mat-form-field> |
| 11 | + <mat-label>Identifier Type</mat-label> |
| 12 | + <mat-select value="isbn" #identifierType> |
| 13 | + <mat-option value="oclc">OCLC Number</mat-option> |
| 14 | + <mat-option value="lccn">LCCN</mat-option> |
| 15 | + <mat-option value="issn">ISSN</mat-option> |
| 16 | + <mat-option value="isbn">ISBN</mat-option> |
| 17 | + <mat-option value="htid">HathiTrust Volume ID</mat-option> |
| 18 | + <mat-option value="recordnumber">HathiTrust record number</mat-option> |
| 19 | + </mat-select> |
| 20 | + </mat-form-field> |
| 21 | + </section> |
| 22 | + <section class="settings-section"> |
| 23 | + <mat-form-field> |
| 24 | + <mat-label>Identifier</mat-label> |
| 25 | + <input matInput #identifier value="0394530934"> |
| 26 | + </mat-form-field> |
| 27 | + </section> |
| 28 | + </form> |
| 29 | + |
| 30 | + <button mat-flat-button type="button" color="primary" (click)="search(identifierType.value, identifier.value)">Search</button> |
| 31 | + |
| 32 | + |
| 33 | + <mat-card *ngIf="record"> |
| 34 | + <mat-card-header> |
| 35 | + <mat-card-title>HathiTrust Record</mat-card-title> |
| 36 | + </mat-card-header> |
| 37 | + <mat-card-content> |
| 38 | + <img *ngIf="record.items.length>0" src="https://babel.hathitrust.org/cgi/imgsrv/cover?id={{record.items[0].htid}}" class="pull-right"> |
| 39 | + <ul> |
| 40 | + <li><strong>Record ID: </strong> <a href="{{record.recordURL}}" target="_blank">{{ record.id }}</a></li> |
| 41 | + <li><strong>Title: </strong>{{ record.titles[0] }}</li> |
| 42 | + <li><strong>Held By:</strong> |
| 43 | + <ul> |
| 44 | + <li *ngFor="let item of record.items"><a href="{{item.itemURL}}" target="_blank">{{item.orig}}</a></li> |
| 45 | + </ul> |
| 46 | + </li> |
| 47 | + </ul> |
| 48 | + </mat-card-content> |
| 49 | + </mat-card> |
28 | 50 | </div> |
29 | 51 |
|
30 | | -<mat-card *ngIf="record"> |
31 | | - <mat-card-header> |
32 | | - <mat-card-title>HathiTrust Record</mat-card-title> |
33 | | - </mat-card-header> |
34 | | - <mat-card-content> |
35 | | - <img *ngIf="record.items.length>0" src="https://babel.hathitrust.org/cgi/imgsrv/cover?id={{record.items[0].htid}}" class="pull-right"> |
36 | | - <ul> |
37 | | - <li><strong>Record ID: </strong> <a href="{{record.recordURL}}" target="_blank">{{ record.id }}</a></li> |
38 | | - <li><strong>Title: </strong>{{ record.titles[0] }}</li> |
39 | | - <li><strong>Held By:</strong> |
40 | | - <ul> |
41 | | - <li *ngFor="let item of record.items"><a href="{{item.itemURL}}" target="_blank">{{item.orig}}</a></li> |
42 | | - </ul> |
43 | | - </li> |
44 | | - </ul> |
45 | | - </mat-card-content> |
46 | | -</mat-card> |
47 | 52 |
|
48 | | -<section *ngIf="authToken"> |
49 | | - <h3>Hathitrust Data API</h3> |
| 53 | +<div class="section" *ngIf="authToken"> |
| 54 | + <h2>HathiTrust Data API</h2> |
50 | 55 | <p>This API is restricted and requires authentication.</p> |
51 | 56 | <section class="settings-section"> |
52 | 57 | <mat-form-field> |
53 | 58 | <mat-label>Identifier</mat-label> |
54 | 59 | <input matInput #data_api_identifier value="mdp.39015000000128"> |
55 | 60 | </mat-form-field> |
56 | 61 | </section> |
57 | | - <div class="commands-container"> |
58 | | - <button mat-stroked-button type="button" color="primary" (click)="dataApi(data_api_identifier.value)">Retrieve Metadata</button> |
59 | | - <mat-spinner diameter="30" class="spinner" *ngIf="running.data"></mat-spinner> |
60 | | - </div> |
| 62 | + <button mat-flat-button type="button" color="primary" (click)="dataApi(data_api_identifier.value)">Retrieve Metadata</button> |
61 | 63 | <mat-card *ngIf="images.length>0"> |
62 | 64 | <mat-card-header> |
63 | 65 | <mat-card-title>HathiTrust Page Scans</mat-card-title> |
64 | 66 | </mat-card-header> |
65 | 67 | <mat-card-content> |
66 | 68 | <p>Retrieved <strong>{{images.length}}</strong> pages from the API for this title.</p> |
67 | | - <button mat-stroked-button type="button" color="primary" (click)="openModal()">View images</button> |
| 69 | + <button mat-flat-button type="button" color="primary" (click)="openModal()">View images</button> |
68 | 70 | </mat-card-content> |
69 | 71 | </mat-card> |
70 | | -</section> |
| 72 | +</div> |
71 | 73 | <app-lightbox></app-lightbox> |
0 commit comments