diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..c10666e22 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea +*.pyc diff --git a/README.md b/README.md index 36ae53b62..9a40f6b73 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,37 @@ # ud036_StarterCode -Source code for a Movie Trailer website. + +## Prerequisite + +Before you run the demo, please check your device has installed the python 2.x. + +You can run the code as follow to check if you has installed or not: + +```bash +python -V +``` + +![python](https://raw.githubusercontent.com/eryue0220/ud036_StarterCode/master/image/terminal.jpeg) + +If you can see the output like the above picture, then go to the next step. + +## Usage + +Now you should check your current work directory path is in the +`ud036_StarterCode` or not. If not you can use the `cd` command enter this +directory. And then, run the code: + +```bash +python entertainment.py +``` + +After that, your browser will be called and open a page as follow: + +![page](https://raw.githubusercontent.com/eryue0220/ud036_StarterCode/master/image/page.jpeg) + +All is Done! + +## Licence + +> You can check out the full license [here](https://github.com/IgorAntun/node-chat/blob/master/LICENSE) + +This project is licensed under the terms of the MIT license. \ No newline at end of file diff --git a/css/screen.css b/css/screen.css new file mode 100644 index 000000000..3eef780fb --- /dev/null +++ b/css/screen.css @@ -0,0 +1,46 @@ +body { + padding-top: 80px; +} + +#trailer .modal-dialog { + margin-top: 200px; + width: 640px; + height: 480px; +} + +.hanging-close { + position: absolute; + top: -12px; + right: -12px; + z-index: 9001; +} + +#trailer-video { + width: 100%; + height: 100%; +} + +.movie-tile { + margin-bottom: 20px; + padding-top: 20px; +} + +.movie-tile:hover { + background-color: #EEE; + cursor: pointer; +} + +.scale-media { + padding-bottom: 56.25%; + position: relative; +} + +.scale-media iframe { + border: none; + height: 100%; + position: absolute; + width: 100%; + left: 0; + top: 0; + background-color: white; +} \ No newline at end of file diff --git a/entertainment_content.py b/entertainment_content.py new file mode 100644 index 000000000..09302d7c2 --- /dev/null +++ b/entertainment_content.py @@ -0,0 +1,57 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import media +import fresh_tomatoes + +toy_story = media.Movie( + 'Toy Story', + 'A story of a boy and his toys that come to life', + 'https://upload.wikimedia.org/wikipedia/en/1/13/Toy_Story.jpg', + 'https://www.youtube.com/watch?v=vwyZH85NQC4' +) + +avatar = media.Movie( + 'Avatar', + 'A marine on an alien planet', + 'http://upload.wikimedia.org/wikipedia/id/b/b0/Avatar-Teaser-Poster.jpg', + 'https://www.youtube.com/watch?v=-9ceBgWV8io' +) + +school_of_rock = media.Movie( + 'School of Rock', + 'Storyline', + 'https://upload.wikimedia.org/wikipedia/en/1/11/School_of_Rock_Poster.jpg', + 'https://www.youtube.com/watch?v=3PsUJFEBC74' +) + +ratatouille = media.Movie( + 'Ratatouille', + 'Storyline', + 'https://upload.wikimedia.org/wikipedia/en/5/50/RatatouillePoster.jpg', + 'https://www.youtube.com/watch?v=c3sBBRxDAqk' +) + +midnight_in_paris = media.Movie( + 'Midnight in Paris', + 'Storyline', + 'https://upload.wikimedia.org/wikipedia/en/9/9f/Midnight_in_Paris_Poster' + + '.jpg', + 'https://www.youtube.com/watch?v=atLg2wQQxvU' +) + +hunger_games = media.Movie( + 'Hunger Games', + 'Storyline', + 'https://upload.wikimedia.org/wikipedia/en/4/42/HungerGamesPoster.jpg', + 'https://www.youtube.com/watch?v=PbA63a7H0bo' +) + + +movies = [ + toy_story, avatar, school_of_rock, + ratatouille, midnight_in_paris, hunger_games +] + +if __name__ == '__main__': + fresh_tomatoes.open_movies_page(movies) diff --git a/fresh_tomatoes.html b/fresh_tomatoes.html new file mode 100644 index 000000000..893031b2f --- /dev/null +++ b/fresh_tomatoes.html @@ -0,0 +1,61 @@ + + +
+ +