-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
153 lines (144 loc) · 7.29 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<!DOCTYPE html>
<html lang="en-US">
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<link rel="stylesheet" href="style.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<title>Film Reel</title>
</head>
<body>
<!-- Jumbotron -->
<div class="jumbotron jumbotron-fluid">
<div class="container">
<h1 class="display-4">Welcome to <strong>Film Reel</strong></h1>
<p class="lead">Search for your favorite movies to find the director, the cast, the release year, and more!</p>
</div>
</div>
<!-- Main Content -->
<div class="container" ng-app="myApp" ng-controller="myCtrl">
<!-- Search button -->
<div class="card search">
<label class="search-label">
Search for a movie or TV show:
<input type="text" ng-model="movieTitle" class="movieTitle" ng-required="true"/>
</label>
<button class="btn btn-info" ng-click="apiCall(movieTitle)" data-toggle="modal" data-target="errorModal">Search</button>
</div>
<!-- Error Message Modal -->
<div class="modal fade" id="errorModal" tabindex="-1" aria-labelledby="errorModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="exampleModalLabel">Uh oh!</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p>Please enter a title to search.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Homepage Image -->
<div class="homepage">
<a href="https://www.timeout.com/newyork/movies/best-movies-of-all-time" target="blank" class="home-text">Or check out this list of the 100 greatest movies of all time!</a>
<img src="./images/tiled-posters.png" class="d-block home-image" alt="tiled promotional posters for hundred best movies of all time">
</div>
<!-- Single movie search Results -->
<div ng-if="details ==='False'">
<!-- empty div if there is nothing to show yet -->
</div>
<div class="wrapper" ng-hide="!details">
<div ng-if="!details.Title">
<p>Sorry, it looks like we don't have that title. Please try searching for something else.</p>
</div>
<!-- Printed results -->
<div class="row">
<div class="col-sm-12 col-md-6">
<div class="card text-center">
<div class=card-body">
<img ng-hide="!details.Poster"
ng-src="{{ details.Poster == 'N/A' ? 'http://placehold.it/300x380&text=N/A' : details.Poster }}"
alt="promotional poster for {{details.Title}"
>
</div>
</div>
</div>
<div class="col-sm-12 col-md-6 card-right" ng-hide="!details.Genre && !details.Rated">
<div class="card">
<h1 class="card-title">{{details.Title}}, <span class="year">{{details.Year}}</span></h1>
<h4 ng-hide="details.Director == 'N/A' || !details.Director">Directed by {{details.Director}}</h4>
<p class="card-text">{{details.Plot}}</p>
<p><strong>Starring </strong>{{details.Actors}}</p>
<p>{{details.Rated}} | {{details.Runtime}}</p>
</div>
<div>
<p><strong>Genre: </strong>{{details.Genre}}</p>
</div>
<div class=" reviews">
<p><strong>Ratings:</strong></p>
<ul>
<li class="list-item" ng-repeat="rating in details.Ratings">{{rating.Source}}:
{{rating.Value}}
</li>
</ul>
</div>
</div>
</div>
</div>
<!-- End of single movie search results -->
<!-- Related titles search -->
<div ng-hide="!related" class="related-list">
<h3>Titles related to "{{movieTitle}}": </h3>
<ul>
<li ng-repeat="movie in related">
<a href="#" id="{{$index + 1}}" ng-click="newSearch(movie.Title)">
{{movie.Title}}
</a> ({{movie.Year}})
</li>
</ul>
</div>
<!-- End of related titles -->
<!-- Advanced Search -->
<div class="card" ng-hide="!details">
<h4 class="card-header">Didn't find what you were looking for? Try our <button ng-click="showAdvanced()" class="advanced-btn">Advanced Search.</button></h4>
</div>
<form class="card advanced-card" ng-model="userForm">
<label for="user.title">Please enter the full title*</label>
<input type="text" class="form-control user-form" ng-model="user.title" ng-required="true" placeholder="What Dreams May Come">
<label for="user.select">Please select a type (movie, series, or episode)*</label>
<select class=" user-form form-control form-control-lg" ng-required="true" ng-model="user.select">
<option>Movie</option>
<option>Series</option>
<option>Episode</option>
</select>
<div class="form-check">
<label>Do you know the year?</label></br>
<input class="form-check-input" type="radio" name="year" ng-model="user.yes" value="yes" checked>
<label class="form-check-label" for="yesYear">
Yes
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="year" ng-model="user.no" value="no">
<label class="form-check-label" for="noYear">
No
</label>
</div>
<div>
<input type="text" class="form-control" ng-hide="!user.yes" ng-model="user.year" placeholder="Year">
</div>
<p>*These fields are required</p>
<button type="submit" class="btn btn-primary" ng-click="advanced(user)">Search</button>
</form>
<!-- End of Advanced -->
</div>
<script src="app.js"></script>
</body>
</html>