diff --git a/project/controllers/login.py b/project/controllers/login.py index 5cceeb4c886da16b2e43b0585096d749b49ba008..62833ed26806fe9b50818e7f3680311899a64b22 100644 --- a/project/controllers/login.py +++ b/project/controllers/login.py @@ -1,8 +1,50 @@ # -*- coding: utf-8 -*- from project import app -from flask import render_template, request +from flask import render_template, request, session, redirect, url_for from flask.ext.wtf import Form, TextField, validators +from project.model.User import User -@app.route('/login') +@app.route('/login', methods=['GET', 'POST']) def login(): + if request.method == 'GET': + return render_template('login/master.html') + if request.method == 'POST': + email = request.form['email'] + password = request.form['password'] + + user = User.validateUser(email, password) + + if user is not None: + session['user'] = user.toJson() + return redirect(url_for('libraries')) + else: + error = "That email or password is not valid. Please check your credentials and try again." + return render_template('login/master.html', error=error) + return render_template('login/master.html') + +@app.route('/signup', methods=['GET', 'POST']) +def signup(): + if request.method == 'GET': + return render_template('login/signup.html') + if request.method == 'POST': + email = request.form['email'] + password = request.form['password'] + passwordConfirm = request.form['passwordConfirm'] + + if password == passwordConfirm: + #check unique user + if len(User.objects(email=email)) == 0: + from project.model.Library import Library + #if unique, create user + user = User.createUser(email, password) + user.addRole('user').save() + session['user'] = user.toJson() + Library(user=user, unit='Movie', name='Master').save() + Library(user=user, unit='Movie', name='Borrowed').save() + return redirect(url_for('libraries')) + else: + error = "The passwords you entered did not match. Please try again." + return render_template('login/signup.html', error=error, email=email) + pass + return render_template('login/signup.html') \ No newline at end of file diff --git a/project/controllers/test.py b/project/controllers/test.py index 2273b7cfe318187b7066718c37badec38d2183c9..5c3b8bb8a804742e1aa8733ca66cf4ffd62e780d 100644 --- a/project/controllers/test.py +++ b/project/controllers/test.py @@ -22,9 +22,8 @@ def test(): @app.route('/test-user') def test_user(): - from project.models.User import User - test_user = User(created_at=datetime.datetime.now(), email='test@user.org', password='password', role='admin').save() - print "date: %s" % test_user.created_at + from project.model.User import User + test_user = User.createUser(email='ndbills@gmail.com', password='password') #check if test_user exists #if yes, return a success render_template #else add the user and return some other template diff --git a/project/templates/home/home.html b/project/templates/home/home.html index ae77ccd23682abf3b974185db722eb5fa49c9666..1d7946aa8ff9a2eb7791354419aded664490d1f4 100644 --- a/project/templates/home/home.html +++ b/project/templates/home/home.html @@ -1,25 +1,27 @@ {% extends "index.html" %} {% block content %} - <div class="jumbotron"> - <h1>It's working!!!</h1> - <p>Here, all of your wildest dreams can come true.</p> - <p><a class="btn btn-primary btn-lg" role="button">The Demo</a></p> - </div> + <div class="col-sm-12"> + <div class="jumbotron"> + <h1>It's working!!!</h1> + <p>Here, all of your wildest dreams can come true.</p> + <p><a class="btn btn-primary btn-lg" role="button">The Demo</a></p> + </div> - <div class="row"> - <div class="col-xs-12 col-sm-6"> - <div class="thumbnail"> - <img data-src="holder.js/100%x200/sky" alt="..."> - <div class="caption"> - <h3>Awesome Sauce!</h3> + <div class="row"> + <div class="col-xs-12 col-sm-6"> + <div class="thumbnail"> + <img data-src="holder.js/100%x200/sky" alt="..."> + <div class="caption"> + <h3>Awesome Sauce!</h3> + </div> </div> </div> - </div> - <div class="col-xs-12 col-sm-6"> - <div class="thumbnail"> - <img data-src="holder.js/100%x200/vine" alt="..."> - <div class="caption"> - <h3>It is so cool!</h3> + <div class="col-xs-12 col-sm-6"> + <div class="thumbnail"> + <img data-src="holder.js/100%x200/vine" alt="..."> + <div class="caption"> + <h3>It is so cool!</h3> + </div> </div> </div> </div> diff --git a/project/templates/index.html b/project/templates/index.html index 2e6da52443393bf9686b44eef13deccdd5e74aba..0fe0b91333aa341e389f86daf9d4d84ae201e108 100644 --- a/project/templates/index.html +++ b/project/templates/index.html @@ -37,7 +37,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> <li><a href="{{ url_for('login') }}">Login</a></li> - <li><a href="#">Sign-up</a></li> + <li><a href="{{ url_for('signup') }}">Sign-up</a></li> </ul> </div><!-- /.navbar-collapse --> </div><!-- /.container-fluid --> diff --git a/project/templates/library/library.html b/project/templates/library/library.html index a3238b458907e8398c0cfc9236652b77b4ae29d1..df6e30a0da97022c11e8c0121cbe685992b7c577 100644 --- a/project/templates/library/library.html +++ b/project/templates/library/library.html @@ -1,57 +1,59 @@ {% extends "index.html" %} {% block content %} - <h3>Action Movies</h3> - <table class="table table-striped table-hover"> - <thead> - <tr> - <td>Movie</td> - <td>Summary</td> - <td>Rating</td> - <td>Options</td> - </tr> - </thead> - <tbody> - <tr> - <td> - <!--<img data-src="holder.js/165x200/sky" alt="movie title">--> - <img src="http://1.bp.blogspot.com/__cfySUj2yhk/TKE8n5fJo4I/AAAAAAAAAnY/Vwf39Hilx2Y/s1600/Bourne_Identity.jpg" style="max-width: 200px;" alt="The Bourne Identity"> - <p>The Bourne Identity</p> - </td> - <td> - <p>A man is picked up by a fishing boat, bullet-riddled and without memory, then races to elude assassins and recover from amnesia.</p> - </td> - <td> - <p>7.9/10</p> - </td> - <td> - <button class="btn btn-info btn-sm"> - <span class="glyphicon glyphicon-hand-right"></span> Lend - </button> - <button class="btn btn-default btn-sm"> - <span class="glyphicon glyphicon-pencil"></span> Edit - </button> - </td> - </tr> - <tr> - <td> - <img src="http://www.eeriedigest.com/wordpress/wp-content/uploads/2011/08/bourne-supremacy.jpg" style="max-width: 200px;" alt="The Bourne Supremacy"> - <p>The Bourne Supremacy</p> - </td> - <td> - <p>When Jason Bourne is framed for a CIA operation gone awry, he is forced to resume his former life as a trained assassin to survive.</p> - </td> - <td> - <p>7.8/10</p> - </td> - <td> - <button class="btn btn-info btn-sm"> - <span class="glyphicon glyphicon-hand-right"></span> Lend - </button> - <button class="btn btn-default btn-sm"> - <span class="glyphicon glyphicon-pencil"></span> Edit - </button> - </td> - </tr> - </tbody> - </table> + <div class="col-sm-12"> + <h3>Action Movies</h3> + <table class="table table-striped table-hover"> + <thead> + <tr> + <td>Movie</td> + <td>Summary</td> + <td>Rating</td> + <td>Options</td> + </tr> + </thead> + <tbody> + <tr> + <td> + <!--<img data-src="holder.js/165x200/sky" alt="movie title">--> + <img src="http://1.bp.blogspot.com/__cfySUj2yhk/TKE8n5fJo4I/AAAAAAAAAnY/Vwf39Hilx2Y/s1600/Bourne_Identity.jpg" style="max-width: 200px;" alt="The Bourne Identity"> + <p>The Bourne Identity</p> + </td> + <td> + <p>A man is picked up by a fishing boat, bullet-riddled and without memory, then races to elude assassins and recover from amnesia.</p> + </td> + <td> + <p>7.9/10</p> + </td> + <td> + <button class="btn btn-info btn-sm"> + <span class="glyphicon glyphicon-hand-right"></span> Lend + </button> + <button class="btn btn-default btn-sm"> + <span class="glyphicon glyphicon-pencil"></span> Edit + </button> + </td> + </tr> + <tr> + <td> + <img src="http://www.eeriedigest.com/wordpress/wp-content/uploads/2011/08/bourne-supremacy.jpg" style="max-width: 200px;" alt="The Bourne Supremacy"> + <p>The Bourne Supremacy</p> + </td> + <td> + <p>When Jason Bourne is framed for a CIA operation gone awry, he is forced to resume his former life as a trained assassin to survive.</p> + </td> + <td> + <p>7.8/10</p> + </td> + <td> + <button class="btn btn-info btn-sm"> + <span class="glyphicon glyphicon-hand-right"></span> Lend + </button> + <button class="btn btn-default btn-sm"> + <span class="glyphicon glyphicon-pencil"></span> Edit + </button> + </td> + </tr> + </tbody> + </table> + </div> {% endblock %} \ No newline at end of file diff --git a/project/templates/library/libraryItem.html b/project/templates/library/libraryItem.html index 2dbe30cfe78562b065976210fe45aefa0b615416..ec380a0455e45130eda243dddbb8f365bd06686d 100644 --- a/project/templates/library/libraryItem.html +++ b/project/templates/library/libraryItem.html @@ -1,36 +1,38 @@ {% extends "index.html" %} {% block content %} - <div class="row"> - <div class="col-xs-12 col-sm-3 col-md-2"> - <img data-src="holder.js/100%x200/sky" alt="movie title"> - <button type="button" class="btn btn-default btn-sm"> - <span class="glyphicon glyphicon-pencil"></span> Edit - </button> - <button type="button" class="btn btn-warning btn-sm"> - <span class="glyphicon glyphicon-remove"></span> Remove - </button> - </div> + <div class="col-sm-12"> + <div class="row"> + <div class="col-xs-12 col-sm-3 col-md-2"> + <img data-src="holder.js/100%x200/sky" alt="movie title"> + <button type="button" class="btn btn-default btn-sm"> + <span class="glyphicon glyphicon-pencil"></span> Edit + </button> + <button type="button" class="btn btn-warning btn-sm"> + <span class="glyphicon glyphicon-remove"></span> Remove + </button> + </div> - <div class="col-xs-12 col-sm-3 col-md-2"> - <ul class="list-unstyled"> - <li>Movie Title</li> - <li>Director(s)</li> - <li>Actors (truncated)</li> - <li>Producers</li> - <li>Composer</li> - </ul> - </div> + <div class="col-xs-12 col-sm-3 col-md-2"> + <ul class="list-unstyled"> + <li>Movie Title</li> + <li>Director(s)</li> + <li>Actors (truncated)</li> + <li>Producers</li> + <li>Composer</li> + </ul> + </div> - <div class="col-xs-12 col-sm-6 col-md-8"> - <h2>Summary</h2> - <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse eget metus vitae mi interdum tristique. Integer malesuada quam tincidunt, gravida nisi vehicula, auctor mi. Morbi fermentum, neque quis adipiscing placerat, odio nunc consequat ligula, vel sagittis nisl orci id risus. Aliquam hendrerit, elit a molestie suscipit, eros tortor scelerisque odio, sit amet cursus ligula lorem et turpis. Pellentesque ante metus, suscipit id blandit eget, vehicula quis tortor. Aliquam a pharetra enim. Morbi in purus sit amet nulla egestas consectetur. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla diam nulla, iaculis lobortis varius at, auctor malesuada enim. Donec a nisl eget ligula rhoncus fermentum.</p> + <div class="col-xs-12 col-sm-6 col-md-8"> + <h2>Summary</h2> + <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse eget metus vitae mi interdum tristique. Integer malesuada quam tincidunt, gravida nisi vehicula, auctor mi. Morbi fermentum, neque quis adipiscing placerat, odio nunc consequat ligula, vel sagittis nisl orci id risus. Aliquam hendrerit, elit a molestie suscipit, eros tortor scelerisque odio, sit amet cursus ligula lorem et turpis. Pellentesque ante metus, suscipit id blandit eget, vehicula quis tortor. Aliquam a pharetra enim. Morbi in purus sit amet nulla egestas consectetur. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla diam nulla, iaculis lobortis varius at, auctor malesuada enim. Donec a nisl eget ligula rhoncus fermentum.</p> + </div> </div> - </div> - <div class="row"> - <div class="col-xs-12 col-sm-6 col-md-12"> - <h3>Movie Reviews</h3> - <p>Coming Soon!</p> + <div class="row"> + <div class="col-xs-12 col-sm-6 col-md-12"> + <h3>Movie Reviews</h3> + <p>Coming Soon!</p> + </div> </div> </div> {% endblock %} \ No newline at end of file diff --git a/project/templates/library/master.html b/project/templates/library/master.html index 4342db8943e8adcbdfe3d4fdc48aa7f447efdb91..13e0c4b1e6e43647774a917dd269006a3914ba77 100644 --- a/project/templates/library/master.html +++ b/project/templates/library/master.html @@ -1,64 +1,66 @@ {% extends "index.html" %} {% block content %} - <h3>My Libraries</h3> - <table class="table table-striped table-hover"> - <thead> - <tr> - <td>Library</td> - <td>Summary</td> - <td>Movie Count</td> - <td>Options</td> - </tr> - </thead> - <tbody> - <tr> - <td> - <a href="#">Action Movies</a> - </td> - <td> - <p>This is a list of some of my favorite action movies</p> - </td> - <td> - <p>2</p> - </td> - <td> - <button class="btn btn-default btn-sm"> - <span class="glyphicon glyphicon-pencil"></span> Edit - </button> - </td> - </tr> - <tr> - <td> - <a href="#">Comedy</a> - </td> - <td> - <p>This is a list of some of my favorite comedy shows and funny movies</p> - </td> - <td> - <p>3</p> - </td> - <td> - <button class="btn btn-default btn-sm"> - <span class="glyphicon glyphicon-pencil"></span> Edit - </button> - </td> - </tr> - <tr> - <td> - <a href="#">Family</a> - </td> - <td> - <p>Classic movies that the whole family can watch</p> - </td> - <td> - <p>3</p> - </td> - <td> - <button class="btn btn-default btn-sm"> - <span class="glyphicon glyphicon-pencil"></span> Edit - </button> - </td> - </tr> - </tbody> - </table> + <div class="col-sm-12"> + <h3>My Libraries</h3> + <table class="table table-striped table-hover"> + <thead> + <tr> + <td>Library</td> + <td>Summary</td> + <td>Movie Count</td> + <td>Options</td> + </tr> + </thead> + <tbody> + <tr> + <td> + <a href="#">Action Movies</a> + </td> + <td> + <p>This is a list of some of my favorite action movies</p> + </td> + <td> + <p>2</p> + </td> + <td> + <button class="btn btn-default btn-sm"> + <span class="glyphicon glyphicon-pencil"></span> Edit + </button> + </td> + </tr> + <tr> + <td> + <a href="#">Comedy</a> + </td> + <td> + <p>This is a list of some of my favorite comedy shows and funny movies</p> + </td> + <td> + <p>3</p> + </td> + <td> + <button class="btn btn-default btn-sm"> + <span class="glyphicon glyphicon-pencil"></span> Edit + </button> + </td> + </tr> + <tr> + <td> + <a href="#">Family</a> + </td> + <td> + <p>Classic movies that the whole family can watch</p> + </td> + <td> + <p>3</p> + </td> + <td> + <button class="btn btn-default btn-sm"> + <span class="glyphicon glyphicon-pencil"></span> Edit + </button> + </td> + </tr> + </tbody> + </table> + </div> {% endblock %} \ No newline at end of file diff --git a/project/templates/login/master.html b/project/templates/login/master.html index 421791665759a80f6bd6c51bb87a9bcbd62252da..0e2db7ccc65f381e5dbbcd94fbc881f0fba80ef5 100644 --- a/project/templates/login/master.html +++ b/project/templates/login/master.html @@ -1,55 +1,36 @@ {% extends "index.html" %} {% block content %} - <!-- Login --> - <div class="col-xs-6 col-md-6"> - <div class="col-sm-offset-3 col-sm-12"> - <h3>Login</h3> - </div> - <form class="form-horizontal" role="form"> - <div class="form-group"> - <label for="userEmail" class="col-sm-3 control-label">Email</label> - <div class="col-xs-9 col-md-6"> - <input type="email" class="form-control" id="userEmail" placeholder="Email address"> + <!-- Login --> + <div class="col-sm-12"> + <div class="col-xs-6 col-md-6"> + {% if error %} + <div class="alert alert-danger"> + {{ error }} </div> - </div> - <div class="form-group"> - <label for="userPassword" class="col-sm-3 control-label">Password</label> - <div class="col-xs-9 col-md-6"> - <input type="password" class="form-control" id="userPassword" placeholder="Password"> + {% endif %} + + <div class="col-sm-offset-3 col-sm-12"> + <h3>Login</h3> + </div> + <form class="form-horizontal" role="form" method="post" action="{{ url_for('login') }}"> + <div class="form-group"> + <label for="userEmail" class="col-sm-3 control-label">Email</label> + <div class="col-xs-9 col-md-6"> + <input type="email" class="form-control" id="userEmail" name="email" placeholder="Email address"> + </div> </div> - </div> - <div class="form-group"> - <div class="col-sm-offset-3 col-sm-10"> - <button type="submit" class="btn btn-default">Login</button> + <div class="form-group"> + <label for="userPassword" class="col-sm-3 control-label">Password</label> + <div class="col-xs-9 col-md-6"> + <input type="password" class="form-control" id="userPassword" name="password" placeholder="Password"> + </div> </div> - </div> - </form> - </div> - - <!-- Sign-up --> - <div class="col-xs-6 col-md-6"> - <div class="col-sm-offset-3 col-sm-12"> - <h3>Sign-up</h3> - </div> - <form class="form-horizontal" role="form"> - <div class="form-group"> - <label for="userEmail" class="col-sm-3 control-label">Email</label> - <div class="col-xs-9 col-md-6"> - <input type="email" class="form-control" id="userEmail" placeholder="Email address"> - </div> - </div> - <div class="form-group"> - <label for="userPassword" class="col-sm-3 control-label">Password</label> - <div class="col-xs-9 col-md-6"> - <input type="password" class="form-control" id="userPassword" placeholder="Password"> - </div> - </div> - <div class="form-group"> - <div class="col-sm-offset-3 col-sm-10"> - <button type="submit" class="btn btn-default">Sign up</button> + <div class="form-group"> + <div class="col-sm-offset-3 col-sm-10"> + <button type="submit" class="btn btn-default">Login</button> + </div> </div> - </div> - </form> + </form> + </div> </div> - {% endblock %} \ No newline at end of file diff --git a/project/templates/login/signup.html b/project/templates/login/signup.html new file mode 100644 index 0000000000000000000000000000000000000000..9ac427f280fa14e9d891a684ccdc93c84fe1d8e3 --- /dev/null +++ b/project/templates/login/signup.html @@ -0,0 +1,42 @@ +{% extends "index.html" %} +{% block content %} + <!-- Sign-up --> + <div class="col-sm-12"> + <div class="col-xs-6 col-md-6"> + {% if error %} + <div class="alert alert-danger"> + {{ error }} + </div> + {% endif %} + + <div class="col-sm-offset-3 col-sm-12"> + <h3>Sign-up</h3> + </div> + <form class="form-horizontal" role="form" method="post" action="{{ url_for('signup') }}"> + <div class="form-group"> + <label for="userEmail" class="col-sm-3 control-label">Email</label> + <div class="col-xs-9 col-md-6"> + <input type="email" class="form-control" id="userEmail" name="email" placeholder="Email address"> + </div> + </div> + <div class="form-group"> + <label for="userPassword" class="col-sm-3 control-label">Password</label> + <div class="col-xs-9 col-md-6"> + <input type="password" class="form-control" id="userPassword" name="password" placeholder="Password"> + </div> + </div> + <div class="form-group"> + <label for="userPasswordConfirm" class="col-sm-3 control-label">Confirm Password</label> + <div class="col-xs-9 col-md-6"> + <input type="password" class="form-control" id="userPasswordConfirm" name="passwordConfirm" placeholder="Password"> + </div> + </div> + <div class="form-group"> + <div class="col-sm-offset-3 col-sm-9"> + <button type="submit" class="btn btn-default">Sign up</button> + </div> + </div> + </form> + </div> + </div> +{% endblock %} \ No newline at end of file diff --git a/project/templates/movies/master.html b/project/templates/movies/master.html index 319c3c0d944d547c7bb4da13a786465121cdc98d..7fe9c282be10ceca062151171541d598fb3aaa39 100644 --- a/project/templates/movies/master.html +++ b/project/templates/movies/master.html @@ -1,57 +1,60 @@ {% extends "index.html" %} {% block content %} - <h3>My Movies</h3> - <table class="table table-striped table-hover"> - <thead> - <tr> - <td>Movie</td> - <td>Summary</td> - <td>Rating</td> - <td>Options</td> - </tr> - </thead> - <tbody> - <tr> - <td> - <!--<img data-src="holder.js/165x200/sky" alt="movie title">--> - <img src="http://1.bp.blogspot.com/__cfySUj2yhk/TKE8n5fJo4I/AAAAAAAAAnY/Vwf39Hilx2Y/s1600/Bourne_Identity.jpg" style="max-width: 200px;" alt="The Bourne Identity"> - <p>The Bourne Identity</p> - </td> - <td> - <p>A man is picked up by a fishing boat, bullet-riddled and without memory, then races to elude assassins and recover from amnesia.</p> - </td> - <td> - <p>7.9/10</p> - </td> - <td> - <button class="btn btn-info btn-sm"> - <span class="glyphicon glyphicon-hand-right"></span> Lend - </button> - <button class="btn btn-default btn-sm"> - <span class="glyphicon glyphicon-pencil"></span> Edit - </button> - </td> - </tr> - <tr> - <td> - <img src="http://www.eeriedigest.com/wordpress/wp-content/uploads/2011/08/bourne-supremacy.jpg" style="max-width: 200px;" alt="The Bourne Supremacy"> - <p>The Bourne Supremacy</p> - </td> - <td> - <p>When Jason Bourne is framed for a CIA operation gone awry, he is forced to resume his former life as a trained assassin to survive.</p> - </td> - <td> - <p>7.8/10</p> - </td> - <td> - <button class="btn btn-info btn-sm"> - <span class="glyphicon glyphicon-hand-right"></span> Lend - </button> - <button class="btn btn-default btn-sm"> - <span class="glyphicon glyphicon-pencil"></span> Edit - </button> - </td> - </tr> - </tbody> - </table> + <div class="col-sm-12"> + <h3>My Movies</h3> + <table class="table table-striped table-hover"> + <thead> + <tr> + <td>Movie</td> + <td>Summary</td> + <td>Rating</td> + <td>Options</td> + </tr> + </thead> + <tbody> + <tr> + <td> + <!--<img data-src="holder.js/165x200/sky" alt="movie title">--> + <img src="http://1.bp.blogspot.com/__cfySUj2yhk/TKE8n5fJo4I/AAAAAAAAAnY/Vwf39Hilx2Y/s1600/Bourne_Identity.jpg" style="max-width: 200px;" alt="The Bourne Identity"> + <p>The Bourne Identity</p> + </td> + <td> + <p>A man is picked up by a fishing boat, bullet-riddled and without memory, then races to elude assassins and recover from amnesia.</p> + </td> + <td> + <p>7.9/10</p> + </td> + <td> + <button class="btn btn-info btn-sm"> + <span class="glyphicon glyphicon-hand-right"></span> Lend + </button> + <button class="btn btn-default btn-sm"> + <span class="glyphicon glyphicon-pencil"></span> Edit + </button> + </td> + </tr> + <tr> + <td> + <img src="http://www.eeriedigest.com/wordpress/wp-content/uploads/2011/08/bourne-supremacy.jpg" style="max-width: 200px;" alt="The Bourne Supremacy"> + <p>The Bourne Supremacy</p> + </td> + <td> + <p>When Jason Bourne is framed for a CIA operation gone awry, he is forced to resume his former life as a trained assassin to survive.</p> + </td> + <td> + <p>7.8/10</p> + </td> + <td> + <button class="btn btn-info btn-sm"> + <span class="glyphicon glyphicon-hand-right"></span> Lend + </button> + <button class="btn btn-default btn-sm"> + <span class="glyphicon glyphicon-pencil"></span> Edit + </button> + </td> + </tr> + </tbody> + </table> + </div> + {% endblock %} \ No newline at end of file diff --git a/project/templates/movies/movie.html b/project/templates/movies/movie.html index 2dbe30cfe78562b065976210fe45aefa0b615416..ec380a0455e45130eda243dddbb8f365bd06686d 100644 --- a/project/templates/movies/movie.html +++ b/project/templates/movies/movie.html @@ -1,36 +1,38 @@ {% extends "index.html" %} {% block content %} - <div class="row"> - <div class="col-xs-12 col-sm-3 col-md-2"> - <img data-src="holder.js/100%x200/sky" alt="movie title"> - <button type="button" class="btn btn-default btn-sm"> - <span class="glyphicon glyphicon-pencil"></span> Edit - </button> - <button type="button" class="btn btn-warning btn-sm"> - <span class="glyphicon glyphicon-remove"></span> Remove - </button> - </div> + <div class="col-sm-12"> + <div class="row"> + <div class="col-xs-12 col-sm-3 col-md-2"> + <img data-src="holder.js/100%x200/sky" alt="movie title"> + <button type="button" class="btn btn-default btn-sm"> + <span class="glyphicon glyphicon-pencil"></span> Edit + </button> + <button type="button" class="btn btn-warning btn-sm"> + <span class="glyphicon glyphicon-remove"></span> Remove + </button> + </div> - <div class="col-xs-12 col-sm-3 col-md-2"> - <ul class="list-unstyled"> - <li>Movie Title</li> - <li>Director(s)</li> - <li>Actors (truncated)</li> - <li>Producers</li> - <li>Composer</li> - </ul> - </div> + <div class="col-xs-12 col-sm-3 col-md-2"> + <ul class="list-unstyled"> + <li>Movie Title</li> + <li>Director(s)</li> + <li>Actors (truncated)</li> + <li>Producers</li> + <li>Composer</li> + </ul> + </div> - <div class="col-xs-12 col-sm-6 col-md-8"> - <h2>Summary</h2> - <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse eget metus vitae mi interdum tristique. Integer malesuada quam tincidunt, gravida nisi vehicula, auctor mi. Morbi fermentum, neque quis adipiscing placerat, odio nunc consequat ligula, vel sagittis nisl orci id risus. Aliquam hendrerit, elit a molestie suscipit, eros tortor scelerisque odio, sit amet cursus ligula lorem et turpis. Pellentesque ante metus, suscipit id blandit eget, vehicula quis tortor. Aliquam a pharetra enim. Morbi in purus sit amet nulla egestas consectetur. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla diam nulla, iaculis lobortis varius at, auctor malesuada enim. Donec a nisl eget ligula rhoncus fermentum.</p> + <div class="col-xs-12 col-sm-6 col-md-8"> + <h2>Summary</h2> + <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse eget metus vitae mi interdum tristique. Integer malesuada quam tincidunt, gravida nisi vehicula, auctor mi. Morbi fermentum, neque quis adipiscing placerat, odio nunc consequat ligula, vel sagittis nisl orci id risus. Aliquam hendrerit, elit a molestie suscipit, eros tortor scelerisque odio, sit amet cursus ligula lorem et turpis. Pellentesque ante metus, suscipit id blandit eget, vehicula quis tortor. Aliquam a pharetra enim. Morbi in purus sit amet nulla egestas consectetur. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla diam nulla, iaculis lobortis varius at, auctor malesuada enim. Donec a nisl eget ligula rhoncus fermentum.</p> + </div> </div> - </div> - <div class="row"> - <div class="col-xs-12 col-sm-6 col-md-12"> - <h3>Movie Reviews</h3> - <p>Coming Soon!</p> + <div class="row"> + <div class="col-xs-12 col-sm-6 col-md-12"> + <h3>Movie Reviews</h3> + <p>Coming Soon!</p> + </div> </div> </div> {% endblock %} \ No newline at end of file