-
Notifications
You must be signed in to change notification settings - Fork 0
/
fresh_tomatoes.html
137 lines (125 loc) · 6.37 KB
/
fresh_tomatoes.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
<head>
<meta charset="utf-8">
<title>Movie Lookout</title>
<link rel="icon" href="assets/favicon.ico">
<!-- Bootstrap 3 -->
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/animate.css">
<link rel="stylesheet" href="css/font-awesome/css/font-awesome.min.css">
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script>
<script type="text/javascript" charset="utf-8">
// Pause the video when the modal is closed
$(document).on('click', '.hanging-close', function (event) {
// Remove the src so the player itself gets removed, as this is the only
// reliable way to ensure the video stops playing in IE
$("#trailer-video-container").empty();
});
// Start playing the video whenever the trailer modal is opened
$(document).on('click', '.movie-tile', function (event) {
var trailerYouTubeId = $(this).attr('data-trailer-youtube-id')
var sourceUrl = 'http://www.youtube.com/embed/' + trailerYouTubeId + '?modestbranding=1;autohide=1&showinfo=0&controls=0;autoplay=1&html5=1';
$("#trailer-video-container").empty().append($("<iframe></iframe>", {
'id': 'trailer-video',
'type': 'text-html',
'src': sourceUrl,
'frameborder': 0
}));
// Add movie information to the modal
var title = $(this).attr('data-title')
var lead_act_1 = $(this).attr('data-lead1')
var lead_act_2 = $(this).attr('data-lead2')
var lead_act_3 = $(this).attr('data-lead3')
var director = $(this).attr('data-director')
var this_rating = $(this).attr('data-rate')
$("#actor-info").empty().append($("<div> Directed by "+director+".</p><p>Staring "+lead_act_1+", "+lead_act_2+", "+lead_act_3+".</p>"+"</div>"));
$("#this_title").empty().append($("<h2>"+title+"</h2>"));
$("#logo-info").empty().append($('<img />').attr('src', 'assets/lookout.svg').attr('height', '50px'));
// Add rating to the the modal
$("#rating").empty();
var i;
for (i = 0; i < this_rating; i++) {
$("#rating").append($("<i class='fa fa-star'></i>"));
}
t = 5 - this_rating;
for (i = 0; i < t; i++) {
$("#rating").append($("<i class='fa fa-star-o'></i>"));
}
$("i").animate({opacity: 0}, 100).first().animate({opacity: 1}, 600, function showNext() {
$(this).next("i").animate({opacity:1}, 600, showNext);
});
});
</script>
</head>
<!DOCTYPE html>
<html lang="en">
<body>
<!-- Trailer Video Modal -->
<div class="modal" id="trailer">
<div class="modal-dialog animated fadeIn">
<div class="modal-content">
<a href="#" class="hanging-close" data-dismiss="modal" aria-hidden="true">
<img src="assets/cross.svg">
</a>
<div class="row">
<div class="col-md-11" id="this_title"></div>
<div class="col-md-11" id="actor-info"></div>
<div class="col-md-11" id="rating"></div>
</div>
<div class="scale-media" id="trailer-video-container">
</div>
</div>
</div>
</div>
<!-- Main Page Content -->
<div class="container">
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<img class="col-md-2 animated fadeIn" src="assets/logo.svg" id="logo">
</div>
</div>
</div>
</div>
<div class="container">
<div class="col-md-6 col-lg-4 movie-tile text-center animated fadeInUp" data-trailer-youtube-id="5kLoPYkYs9I"
data-lead1="Russell Crowe" data-lead2="Paul Bettany" data-lead3="Billy Boyd" data-director="Peter Weir" data-title="Master and Commander"
data-rate="3" data-toggle="modal" data-target="#trailer">
<img src="assets/mc_poster.jpg" width="220" height="342">
<h2>Master and Commander</h2>
</div>
<div class="col-md-6 col-lg-4 movie-tile text-center animated fadeInUp" data-trailer-youtube-id="Pki6jbSbXIY"
data-lead1="Elijah Wood" data-lead2="Ian McKellen" data-lead3="Viggo Mortensen" data-director="Peter Jackson" data-title="Lord of the Rings"
data-rate="4" data-toggle="modal" data-target="#trailer">
<img src="assets/l_poster.jpg" width="220" height="342">
<h2>Lord of the Rings</h2>
</div>
<div class="col-md-6 col-lg-4 movie-tile text-center animated fadeInUp" data-trailer-youtube-id="8IBNZ6O2kMk"
data-lead1="John Goodman" data-lead2="John Goodman" data-lead3="Steve Buscemi" data-director="Pete Docter" data-title="Monsters Inc"
data-rate="4" data-toggle="modal" data-target="#trailer">
<img src="assets/m_poster.jpg" width="220" height="342">
<h2>Monsters Inc</h2>
</div>
<div class="col-md-6 col-lg-4 movie-tile text-center animated fadeInUp" data-trailer-youtube-id="NDMZHhcBHaQ"
data-lead1="Tate Donovan" data-lead2="Danny DeVito" data-lead3="James Woods" data-director="Ron Clements" data-title="Hercules"
data-rate="3" data-toggle="modal" data-target="#trailer">
<img src="assets/h_poster.jpg" width="220" height="342">
<h2>Hercules</h2>
</div>
<div class="col-md-6 col-lg-4 movie-tile text-center animated fadeInUp" data-trailer-youtube-id="aO1bYukdvLI"
data-lead1="Owen Wilson" data-lead2="Adrien Brody" data-lead3="Jason Schwartzman" data-director="Wes Anderson" data-title="The Darjeeling Limited"
data-rate="3" data-toggle="modal" data-target="#trailer">
<img src="assets/d_poster.png" width="220" height="342">
<h2>The Darjeeling Limited</h2>
</div>
<div class="col-md-6 col-lg-4 movie-tile text-center animated fadeInUp" data-trailer-youtube-id="6rRn8kM4-ds"
data-lead1="Natalie Portman" data-lead2="Hugo Weaving" data-lead3="John Hurt" data-director="James McTeigue" data-title="V for Vendetta"
data-rate="4" data-toggle="modal" data-target="#trailer">
<img src="assets/v_poster.jpg" width="220" height="342">
<h2>V for Vendetta</h2>
</div>
</div>
</body>
</html>