|
| 1 | + |
| 2 | +<!DOCTYPE html> |
| 3 | +<html lang="en"> |
| 4 | +<head> |
| 5 | + <meta charset="utf-8"> |
| 6 | + <title>Videos !!</title> |
| 7 | + <!-- Bootstrap 3 --> |
| 8 | + <link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css"> |
| 9 | + <link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap-theme.min.css"> |
| 10 | + <script src="http://code.jquery.com/jquery-1.10.1.min.js"></script> |
| 11 | + <script src="https://netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script> |
| 12 | + <style type="text/css" media="screen"> |
| 13 | + body { |
| 14 | + padding-top: 80px; |
| 15 | + } |
| 16 | + #trailer .modal-dialog { |
| 17 | + margin-top: 200px; |
| 18 | + width: 640px; |
| 19 | + height: 480px; |
| 20 | + } |
| 21 | + .hanging-close { |
| 22 | + position: absolute; |
| 23 | + top: -12px; |
| 24 | + right: -12px; |
| 25 | + z-index: 9001; |
| 26 | + } |
| 27 | + #trailer-video { |
| 28 | + width: 100%; |
| 29 | + height: 100%; |
| 30 | + } |
| 31 | + .movie-tile { |
| 32 | + margin-bottom: 20px; |
| 33 | + padding-top: 20px; |
| 34 | + } |
| 35 | + .movie-tile:hover { |
| 36 | + background-color: #EEE; |
| 37 | + cursor: pointer; |
| 38 | + } |
| 39 | + .scale-media { |
| 40 | + padding-bottom: 56.25%; |
| 41 | + position: relative; |
| 42 | + } |
| 43 | + .scale-media iframe { |
| 44 | + border: none; |
| 45 | + height: 100%; |
| 46 | + position: absolute; |
| 47 | + width: 100%; |
| 48 | + left: 0; |
| 49 | + top: 0; |
| 50 | + background-color: white; |
| 51 | + } |
| 52 | + </style> |
| 53 | + <script type="text/javascript" charset="utf-8"> |
| 54 | + // Pause the video when the modal is closed |
| 55 | + $(document).on('click', '.hanging-close, .modal-backdrop, .modal', function (event) { |
| 56 | + // Remove the src so the player itself gets removed, as this is the only |
| 57 | + // reliable way to ensure the video stops playing in IE |
| 58 | + $("#trailer-video-container").empty(); |
| 59 | + }); |
| 60 | + // Start playing the video whenever the trailer modal is opened |
| 61 | + $(document).on('click', '.movie-tile', function (event) { |
| 62 | + var trailerYouTubeId = $(this).attr('data-trailer-youtube-id') |
| 63 | + var sourceUrl = 'http://www.youtube.com/embed/' + trailerYouTubeId + '?autoplay=1&html5=1'; |
| 64 | + $("#trailer-video-container").empty().append($("<iframe></iframe>", { |
| 65 | + 'id': 'trailer-video', |
| 66 | + 'type': 'text-html', |
| 67 | + 'src': sourceUrl, |
| 68 | + 'frameborder': 0 |
| 69 | + })); |
| 70 | + }); |
| 71 | + // Animate in the movies when the page loads |
| 72 | + $(document).ready(function () { |
| 73 | + $('.movie-tile').hide().first().show("fast", function showNext() { |
| 74 | + $(this).next("div").show("fast", showNext); |
| 75 | + }); |
| 76 | + }); |
| 77 | + </script> |
| 78 | +</head> |
| 79 | + |
| 80 | + <body> |
| 81 | + <!-- Trailer Video Modal --> |
| 82 | + <div class="modal" id="trailer"> |
| 83 | + <div class="modal-dialog"> |
| 84 | + <div class="modal-content"> |
| 85 | + <a href="#" class="hanging-close" data-dismiss="modal" aria-hidden="true"> |
| 86 | + <img src="https://lh5.ggpht.com/v4-628SilF0HtHuHdu5EzxD7WRqOrrTIDi_MhEG6_qkNtUK5Wg7KPkofp_VJoF7RS2LhxwEFCO1ICHZlc-o_=s0#w=24&h=24"/> |
| 87 | + </a> |
| 88 | + <div class="scale-media" id="trailer-video-container"> |
| 89 | + </div> |
| 90 | + </div> |
| 91 | + </div> |
| 92 | + </div> |
| 93 | + <!-- Main Page Content --> |
| 94 | + <div class="container"> |
| 95 | + <div class="navbar navbar-inverse navbar-fixed-top" role="navigation"> |
| 96 | + <div class="container"> |
| 97 | + <div class="navbar-header"> |
| 98 | + <a class="navbar-brand" href="#">Videos worth watching :)</a> |
| 99 | + </div> |
| 100 | + </div> |
| 101 | + </div> |
| 102 | + </div> |
| 103 | + <div class="container"> |
| 104 | + |
| 105 | +<div class="col-md-6 col-lg-4 movie-tile text-center" data-trailer-youtube-id="StrbppmsZJw" data-toggle="modal" data-target="#trailer"> |
| 106 | + <img src="https://images-na.ssl-images-amazon.com/images/M/MV5BMTM3MTc3OTc0NF5BMl5BanBnXkFtZTcwOTQ0OTM1MQ@@._V1._CR34,0,295,440_UX182_CR0,0,182,268_AL__QL50.jpg" width="220" height="342"> |
| 107 | + <h2>7 Chakras</h2> |
| 108 | +</div> |
| 109 | + |
| 110 | +<div class="col-md-6 col-lg-4 movie-tile text-center" data-trailer-youtube-id="StrbppmsZJw" data-toggle="modal" data-target="#trailer"> |
| 111 | + <img src="https://images-na.ssl-images-amazon.com/images/M/MV5BMTM3MTc3OTc0NF5BMl5BanBnXkFtZTcwOTQ0OTM1MQ@@._V1._CR34,0,295,440_UX182_CR0,0,182,268_AL__QL50.jpg" width="220" height="342"> |
| 112 | + <h2>7 Chakras</h2> |
| 113 | +</div> |
| 114 | + |
| 115 | +<div class="col-md-6 col-lg-4 movie-tile text-center" data-trailer-youtube-id="StrbppmsZJw" data-toggle="modal" data-target="#trailer"> |
| 116 | + <img src="https://images-na.ssl-images-amazon.com/images/M/MV5BMTM3MTc3OTc0NF5BMl5BanBnXkFtZTcwOTQ0OTM1MQ@@._V1._CR34,0,295,440_UX182_CR0,0,182,268_AL__QL50.jpg" width="220" height="342"> |
| 117 | + <h2>7 Chakras</h2> |
| 118 | +</div> |
| 119 | + |
| 120 | +<div class="col-md-6 col-lg-4 movie-tile text-center" data-trailer-youtube-id="StrbppmsZJw" data-toggle="modal" data-target="#trailer"> |
| 121 | + <img src="https://images-na.ssl-images-amazon.com/images/M/MV5BMTM3MTc3OTc0NF5BMl5BanBnXkFtZTcwOTQ0OTM1MQ@@._V1._CR34,0,295,440_UX182_CR0,0,182,268_AL__QL50.jpg" width="220" height="342"> |
| 122 | + <h2>7 Chakras</h2> |
| 123 | +</div> |
| 124 | + |
| 125 | +<div class="col-md-6 col-lg-4 movie-tile text-center" data-trailer-youtube-id="StrbppmsZJw" data-toggle="modal" data-target="#trailer"> |
| 126 | + <img src="https://images-na.ssl-images-amazon.com/images/M/MV5BMTM3MTc3OTc0NF5BMl5BanBnXkFtZTcwOTQ0OTM1MQ@@._V1._CR34,0,295,440_UX182_CR0,0,182,268_AL__QL50.jpg" width="220" height="342"> |
| 127 | + <h2>7 Chakras</h2> |
| 128 | +</div> |
| 129 | + |
| 130 | +<div class="col-md-6 col-lg-4 movie-tile text-center" data-trailer-youtube-id="StrbppmsZJw" data-toggle="modal" data-target="#trailer"> |
| 131 | + <img src="https://images-na.ssl-images-amazon.com/images/M/MV5BMTM3MTc3OTc0NF5BMl5BanBnXkFtZTcwOTQ0OTM1MQ@@._V1._CR34,0,295,440_UX182_CR0,0,182,268_AL__QL50.jpg" width="220" height="342"> |
| 132 | + <h2>7 Chakras</h2> |
| 133 | +</div> |
| 134 | + |
| 135 | + </div> |
| 136 | + </body> |
| 137 | +</html> |
0 commit comments