-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
97 lines (78 loc) · 3.12 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Sean's project two</title>
<link rel="stylesheet" href="style.css" media="screen" title="no title" charset="utf-8">
<link href='https://fonts.googleapis.com/css?family=Coming+Soon|Codystar' rel='stylesheet' type='text/css'> </head>
<body>
<div class="header">
<h1 id="main_title">Movie info</h1>
</div>
<div class="all_content">
<form>
<label> Pick a movie:
<input id="movie-search" type="text" placeholder=" Enter movie title"/>
</label>
<br>
<button id="submit-btn" type="button" name="submit">SEARCH</button> <br><br>
<label for="">What would you like to see?
<input type="checkbox" id="nyTimes_checkbox" class="source-checkbox" name="source-checkbox" value="ny_times">NY Times Review
<input type="checkbox" id="stream_checkbox" class="source-checkbox" name="source-checkbox" value="guidebox">Available streaming platforms
</label>
<br><br>
</form>
<div id="content-placeholder">
</div>
</div>
<script id="movie_template" type="text/x-handlebars-template">
<h1 id="movie_title">{{title}}</h1>
<div class = "parent_container">
<div class = "hb_content column">
<p><img src="{{picture}}"></p>
</div>
<div class = "hb_content">
<!-- Basic info always shown if movie returns match
in the OMDB API database. -->
<p>{{plot}}</p>
<p>Cast: {{actors}}</p>
<p>Rated: {{rated}}, released: {{year}}</p>
<p>Rotten Tomatoes Score: {{tomatoRating}}</p>
<!-- NY Times info. Updating based on whether there is a review and
whether or not user wants the link -->
{{#if timesLinkText}}
{{#if dontPrint}}
<p></p>
{{else}}
<p><b>Reviews:</b></p>
<a href="{{timesURL}}" target="_blank">{{timesLinkText}}</a>
{{/if}}
{{else}}
<p><span>No NY Times review available.</span></p>
{{/if}}
<!-- Streaming info section -->
{{#if dontPrintResources}}
<p></p>
{{/if}}
{{#if printResources}}
{{#if sources}}
<p><b>Find this movie streaming on:</b></p>
{{#each sources}}
<p class="stream_list">{{this}}</p>
{{/each}}
{{else}}
<p><span>This movie is not currently available to be streamed.</span></p>
{{/if}}
{{/if}}
</div>
<!-- End of streaming info section -->
<div class = "hb_content column">
<p><img src="{{picture}}"></p>
</div>
</div> <!-- end of parent container -->
</script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.5/handlebars.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script type="text/javascript" src="main.js"></script>
</body>
</html>