-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
118 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,34 @@ | ||
<nav class="navbar navbar-light bg-faded"> | ||
<a class="navbar-brand" | ||
[routerLink]="['home']">BookShelf | ||
</a> | ||
<ul class="nav navbar-nav"> | ||
<li class="nav-item" | ||
[routerLinkActive]="['active']"> | ||
<a class="nav-link" | ||
[routerLink]="['search']">Search | ||
<div class="navbar navbar-default"> | ||
<div class="container"> | ||
<div class="navbar-header"> | ||
<a href="../" | ||
class="navbar-brand">BookShelf | ||
</a> | ||
</li> | ||
<li class="nav-item" | ||
[routerLinkActive]="['active']"> | ||
<a class="nav-link" | ||
[routerLink]="['library']">Library | ||
</a> | ||
</li> | ||
</ul> | ||
</nav> | ||
<button class="navbar-toggle" | ||
type="button" | ||
data-toggle="collapse" | ||
data-target="#navbar-main"> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
</button> | ||
</div> | ||
<div class="navbar-collapse collapse" | ||
id="navbar-main"> | ||
<ul class="nav navbar-nav"> | ||
<li class="nav-item" | ||
[routerLinkActive]="['active']"> | ||
<a class="nav-link" | ||
[routerLink]="['search']">Search | ||
</a> | ||
</li> | ||
<li class="nav-item" | ||
[routerLinkActive]="['active']"> | ||
<a class="nav-link" | ||
[routerLink]="['library']">Library | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,8 @@ | ||
<app-book-list [books]="libraryService.books"></app-book-list> | ||
<div class="container"> | ||
<div class="page-header"> | ||
<h4>Library | ||
</h4> | ||
</div> | ||
|
||
<app-book-list [books]="libraryService.books"></app-book-list> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,15 @@ | ||
<nav> | ||
<ul class="pagination justify-content-center"> | ||
<li class="page-item" [class.disabled]="page === 0"> | ||
<button class="page-link" | ||
(click)="prev()">Previous | ||
</button> | ||
<nav aria-label="..."> | ||
<ul class="pager"> | ||
<li> | ||
<a | ||
[class.disabled]="page === 0" | ||
(click)="prev()"> ← Previous | ||
</a> | ||
</li> | ||
<!--<li *ngFor="let page of pages; let i = index;"--> | ||
<!--class="page-item">--> | ||
<!--<button *ngIf="i < 10"--> | ||
<!--class="page-link"--> | ||
<!--(click)="page(page)">{{ page }}--> | ||
<!--</button>--> | ||
<!--</li>--> | ||
<li class="page-item"> | ||
<button class="page-link" | ||
(click)="next()">Next | ||
</button> | ||
<li> | ||
<a | ||
(click)="next()">Next → | ||
</a> | ||
</li> | ||
</ul> | ||
</nav> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,41 @@ | ||
<div class="m-3 text-center"> | ||
<form class="form-inline" | ||
(ngSubmit)="doSearch()"> | ||
<div class="form-group"> | ||
<input type="search" | ||
class="form-control" | ||
placeholder="Enter search string" | ||
name="search" | ||
[(ngModel)]="term" | ||
required> | ||
</div> | ||
<button type="submit" | ||
class="btn btn-primary"> | ||
Search | ||
</button> | ||
</form> | ||
<hr /> | ||
<div class="container"> | ||
<div class="m-3 text-center"> | ||
<form class="form-inline" | ||
(ngSubmit)="doSearch()"> | ||
<div class="form-group"> | ||
<input type="search" | ||
class="form-control" | ||
placeholder="Enter search string" | ||
name="search" | ||
[(ngModel)]="term" | ||
required> | ||
</div> | ||
<button type="submit" | ||
class="btn btn-primary"> | ||
Search | ||
</button> | ||
</form> | ||
<hr /> | ||
|
||
<div class="text-center"> | ||
<p class="lead" | ||
*ngIf="googleBooksService.initialised && googleBooksService.loading">Loading...</p> | ||
<div class="text-center"> | ||
<p class="lead" | ||
*ngIf="googleBooksService.initialised && googleBooksService.loading">Loading...</p> | ||
|
||
<p class="lead" | ||
*ngIf="googleBooksService.initialised && !googleBooksService.loading && googleBooksService.books?.length === 0">No results returned</p> | ||
<p class="lead" | ||
*ngIf="googleBooksService.initialised && !googleBooksService.loading && googleBooksService.books?.length === 0">No results returned</p> | ||
|
||
<p class="lead" | ||
*ngIf="!googleBooksService.initialised">Enter a search string above and press search</p> | ||
<p class="lead" | ||
*ngIf="!googleBooksService.initialised">Enter a search string above and press search</p> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<app-book-list [books]="googleBooksService.books"></app-book-list> | ||
<app-book-list [books]="googleBooksService.books"></app-book-list> | ||
|
||
<div class="d-flex justify-content-center"> | ||
<app-pager | ||
[page]="googleBooksService.page" | ||
[totalPages]="googleBooksService.totalPages" | ||
(changePage)="googleBooksService.page = $event"> | ||
</app-pager> | ||
<div class="d-flex justify-content-center"> | ||
<app-pager | ||
[page]="googleBooksService.page" | ||
[totalPages]="googleBooksService.totalPages" | ||
(changePage)="googleBooksService.page = $event"> | ||
</app-pager> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,20 @@ | ||
/* You can add global styles to this file, and also import other style files */ | ||
.mr-1 { | ||
margin-right: 2px; | ||
} | ||
|
||
.ml-1 { | ||
margin-left: 2px; | ||
} | ||
|
||
.m-1 { | ||
margin: 1em; | ||
} | ||
|
||
.m-2 { | ||
margin: 2em; | ||
} | ||
|
||
.m-3 { | ||
margin: 3em; | ||
} |