Skip to content
This repository was archived by the owner on Jul 10, 2021. It is now read-only.

Commit 8856a4e

Browse files
final clean up done
1 parent d681db5 commit 8856a4e

File tree

6 files changed

+47
-61
lines changed

6 files changed

+47
-61
lines changed

app/css/style.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
/* app css stylesheet */
2-
1+
/*Super specific selectors were used in this file to be sure and override any bootstrap madness.*/
32
.menu {
43
list-style: none;
54
border-bottom: 0.1em solid black;

app/js/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
var books = [
4646
{
47-
title: 'A Game of Thrones (A Song of Ice and Fire, Book 1)',
47+
title: 'A Game of Thrones: A Song of Ice and Fire',
4848
author: 'George R.R. Martin',
4949
isbn: '0553593714',
5050
review: 'The most inventive and entertaining fantasy saga of our time—warrants one hell of an introduction. I loved this book!',

app/partials/app.html

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,33 @@
11
<h1>Angular Reading List of Awesome</h1>
22

33
<div class="row" ng-controller="ReadingListController as readingList">
4-
5-
<button class="btn btn-default" ng-click="reviewFormCtrl.showForm = !reviewFormCtrl.showForm">{{reviewFormCtrl.showForm ? "Cancel" : "Create Review"}}</button>
4+
<button class="btn btn-default" ng-click="reviewFormCtrl.showForm = !reviewFormCtrl.showForm">
5+
{{reviewFormCtrl.showForm ? "Cancel" : "Create Review"}}
6+
</button>
67
<hr />
8+
79
<!-- Note 1 -->
810
<review-form></review-form>
9-
1011
<hr ng-show="reviewFormCtrl.showForm" />
1112

1213
<ul class="list-unstyled col-sm-8">
1314
<li class="book row" ng-repeat="book in readingList.books">
1415
<aside class="col-sm-3">
1516
<book-cover></book-cover>
16-
1717
<p ng-class="{goodRating: book.rating >= 3}" class="rating">{{book.rating}}/5</p>
1818
</aside>
19-
<div class="col-sm-9">
20-
<h3><a href="http://www.amazon.com/gp/product/{{book.isbn}}"
21-
>{{book.title}}</a></h3>
2219

20+
<div class="col-sm-9">
21+
<h3>
22+
<a href="http://www.amazon.com/gp/product/{{book.isbn}}"
23+
>{{book.title}}</a>
24+
</h3>
2325
<cite class="text-muted">Written by {{book.author}}</cite>
24-
2526
<p>{{book.review}}</p>
2627

2728
<book-genres></book-genres>
2829
</div>
2930
</li>
3031
</ul>
3132

32-
<!-- Not covering this during the screencast. -->
33-
<!-- <aside class="col-sm-4">
34-
<h4>Genres</h4>
35-
<ul class="list-unstyled">
36-
<li ng-repeat="genre in readingList.genres">
37-
<span class="label label-primary">{{genre}}</span></li>
38-
</ul>
39-
</aside> -->
40-
</div> <!-- class="row" -->
33+
</div>

app/partials/book-cover.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
<a href="http://www.amazon.com/gp/product/{{book.isbn}}"><img ng-src="http://images.amazon.com/images/P/{{book.isbn}}.01.ZTZZZZZZ.jpg" alt="Cover of {{book.title}}" class="full"></a>
1+
<a href="http://www.amazon.com/gp/product/{{book.isbn}}">
2+
<img ng-src="http://images.amazon.com/images/P/{{book.isbn}}.01.ZTZZZZZZ.jpg" alt="Cover of {{book.title}}" class="full">
3+
</a>

app/partials/bootstrap.min.css

Lines changed: 0 additions & 7 deletions
This file was deleted.

app/partials/review-form.html

Lines changed: 32 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,65 +2,64 @@
22

33
<section class="row well live-preview" ng-show="reviewFormCtrl.book.isbn">
44
<aside class="col-sm-3">
5-
6-
<!-- Can't use the bookCover directive here since we can't use link. -Z -->
7-
<!-- <book-cover></book-cover> -->
8-
<a href="http://www.amazon.com/gp/product/{{reviewFormCtrl.book.isbn}}"><img ng-src="http://images.amazon.com/images/P/{{reviewFormCtrl.book.isbn}}.01.ZTZZZZZZ.jpg" alt="Cover of {{reviewFormCtrl.book.title}}" class="full"></a>
9-
10-
5+
<!-- no, no! <book-cover></book-cover> -->
6+
<a href="http://www.amazon.com/gp/product/{{reviewFormCtrl.book.isbn}}">
7+
<img ng-src="http://images.amazon.com/images/P/{{reviewFormCtrl.book.isbn}}.01.ZTZZZZZZ.jpg" alt="Cover of {{reviewFormCtrl.book.title}}" class="full">
8+
</a>
119
<p>{{reviewFormCtrl.book.rating || '0'}}/5</p>
1210
</aside>
13-
<div class="col-sm-9">
14-
<h3><a href="http://www.amazon.com/gp/product/{{reviewFormCtrl.book.isbn}}"
15-
>{{reviewFormCtrl.book.title || "Title of Book"}}</a></h3>
1611

12+
<div class="col-sm-9">
13+
<h3>
14+
<a href="http://www.amazon.com/gp/product/{{reviewFormCtrl.book.isbn}}">
15+
{{reviewFormCtrl.book.title || "Title of Book"}}
16+
</a>
17+
</h3>
1718
<cite class="text-muted">Written by {{reviewFormCtrl.book.author || "Author's Name"}}</cite>
1819

19-
<!-- David's not working line -->
20-
<!-- Doesn't work because book.authors is not an array. -Z -->
21-
22-
<!-- <cite class="text-muted">Written by {{book.authors.join(', ') || "Author's Name"}}</cite> -->
23-
2420
<p>{{reviewFormCtrl.book.review || "No review yet."}}</p>
2521

26-
<!-- Can't use the bookGenres directive here since we can't use link. -Z -->
27-
<!-- <book-genres></book-genres> -->
22+
<!-- no, no! <book-genres></book-genres> -->
2823
<ul class="list-unstyled">
2924
<li ng-repeat="(genre, state) in reviewFormCtrl.book.genres">
3025
<span class="label label-primary" ng-show="state">{{genre}}</span>
3126
</li>
3227
</ul>
33-
3428
</div>
3529
</section>
30+
3631
<div class="input-container">
3732
<fieldset class="form-group">
38-
<label for="title" class="col-sm-2 control-label">Title:</label>
39-
<span class="col-sm-9">
40-
<input type="text" class="form-control" id="title" ng-model="reviewFormCtrl.book.title"
41-
placeholder="Book Title">
42-
</span>
33+
<label for="title" class="col-sm-2 control-label">Title:</label>
34+
<span class="col-sm-9">
35+
<input type="text" class="form-control" id="title" ng-model="reviewFormCtrl.book.title"
36+
placeholder="Book Title">
37+
</span>
4338
</fieldset>
39+
4440
<fieldset class="form-group">
45-
<label for="isbn" class="control-label col-sm-2">ISBN:</label>
46-
<span class="col-sm-9">
47-
<input type="text" id="isbn" class="form-control" ng-model="reviewFormCtrl.book.isbn"
48-
maxLength="10" placeholder="ISBN-10">
49-
</span>
41+
<label for="isbn" class="control-label col-sm-2">ISBN:</label>
42+
<span class="col-sm-9">
43+
<input type="text" id="isbn" class="form-control" ng-model="reviewFormCtrl.book.isbn"
44+
maxLength="10" placeholder="ISBN-10">
45+
</span>
5046
</fieldset>
47+
5148
<fieldset class="form-group">
52-
<label class="control-label col-sm-2" for="author">Author</label>
53-
<span class="col-sm-9">
54-
<input type="text" id="author" class="form-control" ng-model="reviewFormCtrl.book.author"
55-
placeholder="Name of the Author"></span>
49+
<label class="control-label col-sm-2" for="author">Author</label>
50+
<span class="col-sm-9">
51+
<input type="text" id="author" class="form-control" ng-model="reviewFormCtrl.book.author"
52+
placeholder="Name of the Author"></span>
5653
</fieldset>
54+
5755
<fieldset class="form-group">
5856
<label class="control-label col-sm-2" for="review">Review</label>
5957
<span class="col-sm-9">
6058
<textarea id="review" class="form-control" cols="30" rows="3" ng-model="reviewFormCtrl.book.review"
61-
placeholder="Book Review"></textarea>
59+
placeholder="Book Review"></textarea>
6260
</span>
6361
</fieldset>
62+
6463
<fieldset class="form-group">
6564
<label for="rating" class="control-label col-sm-2">Rating:</label>
6665
<span class="col-sm-9">
@@ -89,6 +88,6 @@ <h3><a href="http://www.amazon.com/gp/product/{{reviewFormCtrl.book.isbn}}"
8988
<button class="btn btn-primary">Save Review</button>
9089
</span>
9190
</fieldset>
92-
9391
</div>
92+
9493
</form>

0 commit comments

Comments
 (0)