Commits

Kevin Veroneau committed f479f90

Adding project templates so that people can get started quickly with the app.

Comments (0)

Files changed (6)

templates/admin/base_site.html

+{% extends "admin/base.html" %}
+
+{% block title %}{{ title }} | CinemaNick Admin site{% endblock %}
+
+{% block branding %}<h1>CinemaNick Administration</h1>{% endblock %}

templates/base.html

+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8">
+    <title>Cinema Nick | {% block title %}{% endblock %}</title>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <meta name="description" content="{% block description %}A DVD Collection management website.{% endblock %}">
+    <meta name="author" content="{% block author %}Kevin Veroneau{% endblock %}">
+
+    <!-- Le styles -->
+    <link href="{{STATIC_URL}}css/bootstrap.css" rel="stylesheet">
+    <style>
+      body {
+        padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
+      }
+      .navbar-inner {
+        background-color: #2c2c2c; /* fallback color, place your own */
+
+      /* Gradients for modern browsers, replace as you see fit */
+      background-image: -moz-linear-gradient(top, #DB00A4, #220022);
+      background-image: -ms-linear-gradient(top, #DB00A4, #220022);
+      background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#DB00A4), to(#220022));
+      background-image: -webkit-linear-gradient(top, #DB00A4, #220022);
+      background-image: -o-linear-gradient(top, #DB00A4, #220022);
+      background-image: linear-gradient(top, #DB00A4, #220022);
+      background-repeat: repeat-x;
+
+      /* IE8-9 gradient filter */
+      filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);
+    </style>
+    <link href="{{STATIC_URL}}css/bootstrap-responsive.css" rel="stylesheet">
+
+    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
+    <!--[if lt IE 9]>
+      <script src="{{STATIC_URL}}js/html5shiv.js"></script>
+    <![endif]-->
+
+    <!-- Fav and touch icons -->
+    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="../assets/ico/apple-touch-icon-144-precomposed.png">
+    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114-precomposed.png">
+      <link rel="apple-touch-icon-precomposed" sizes="72x72" href="../assets/ico/apple-touch-icon-72-precomposed.png">
+                    <link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57-precomposed.png">
+                                   <link rel="shortcut icon" href="../assets/ico/favicon.png">
+  <script src="{{STATIC_URL}}js/jquery-1.8.2.min.js"></script>
+  <script type="text/javascript">
+  $(function(){
+    {% block jquery %}{% endblock %}
+  });
+  </script>
+  </head>
+
+  <body>
+
+    <div class="navbar navbar-fixed-top">
+      <div class="navbar-inner">
+        <div class="container">
+          <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+          </button>
+          <a class="brand" href="#">Cinema Nick</a>
+          <div class="nav-collapse collapse">
+            <ul class="nav">
+              <li id="nav_home"><a href="/">Home</a></li>
+              <li id="nav_browse"><a href="{% url 'browse_collection' %}">Browse</a></li>
+              <li id="nav_genre"><a href="{% url 'genre_list' %}">Genres</a></li>
+              <li id="nav_format"><a href="{% url 'format_list' %}">Formats</a></li>
+              <li id="nav_random"><a href="{% url 'random_list' %}">Random List</a></li>
+              {% if user.is_authenticated %}<li><a href="{% url 'my_watchlist' %}">My Watchlist</a></li>{% endif %}
+              <li><a href="{% url 'search' %}">Search</a></li>
+            </ul>
+          </div><!--/.nav-collapse -->
+        </div>
+      </div>
+    </div>
+
+    <div class="container-fluid">
+      {% if messages %}
+      <div class="row">
+        <div class="span12">
+          {% for message in messages %}
+          <div class="alert alert-{{message.tags}}">
+            <strong>{{message.tags|title}}:</strong> {{message}}
+          </div>
+          {% endfor %}
+        </div>
+      </div>
+      {% endif %}
+{% block base_content %}{% endblock %}
+    <footer>
+      <p>&copy; 2013 Cinema Nick. All rights reserved. &middot; Website development by <a href="https://www.veroneau.net/">Kevin Veroneau</a> &middot; 
+      <a href="https://www.veroneau.net/SourceCode/cinemanick/trunk/collection/views.py/cat">Source Code</a> licensed under the GPLv2.</p>
+    </footer>
+    </div> <!-- /container -->
+
+    <!-- Le javascript
+    ================================================== -->
+    <script src="{{STATIC_URL}}js/bootstrap.min.js"></script>
+    <!-- Placed at the end of the document so the pages load faster
+    <script src="../assets/js/jquery.js"></script>
+    <script src="../assets/js/bootstrap-transition.js"></script>
+    <script src="../assets/js/bootstrap-alert.js"></script>
+    <script src="../assets/js/bootstrap-modal.js"></script>
+    <script src="../assets/js/bootstrap-dropdown.js"></script>
+    <script src="../assets/js/bootstrap-scrollspy.js"></script>
+    <script src="../assets/js/bootstrap-tab.js"></script>
+    <script src="../assets/js/bootstrap-tooltip.js"></script>
+    <script src="../assets/js/bootstrap-popover.js"></script>
+    <script src="../assets/js/bootstrap-button.js"></script>
+    <script src="../assets/js/bootstrap-collapse.js"></script>
+    <script src="../assets/js/bootstrap-carousel.js"></script>
+    <script src="../assets/js/bootstrap-typeahead.js"></script>
+ -->
+  </body>
+</html>

templates/bootstrap_form.html

+{% for field in form %}
+<div class="control-group{% if field.errors %} error{% endif %}">
+  <label class="control-label" for="{{field.id_for_label}}">{{field.label}}</label>
+  <div class="controls">
+    {{field}}
+    {% if field.errors %}<span class="help-inline">{% for err in field.errors %}{{err}}{% endfor %}</span>
+    {% else %}{% if field.help_text %}<span class="help-inline">{{field.help_text}}</span>{% endif %}{% endif %}
+  </div>
+</div>
+{% endfor %}

templates/homepage.html

+{% extends "base.html" %}
+{% load moviedb %}
+
+{% block jquery %}  $('#nav_home').addClass('active');{% endblock %}
+
+{% block title %}Home{% endblock %}
+
+{% block base_content %}
+      <div class="hero-unit">
+        <h1>Nick's DVD collection</h1>
+        <p>This website is dedicated to my best friend Nick whom has the largest movie collection I know of.  Happy Birthday Nick!</p>
+        <p><a href="{% url 'browse_collection' %}" class="btn btn-primary btn-large">Browse collection &raquo;</a></p>
+      </div>
+      {% include "search_form.html" %}
+      <h3>Latest Movies</h3>
+      {% latest_movies %}
+{% endblock %}

templates/registration/login.html

+{% extends "base.html" %}
+
+{% block title %}Login{% endblock %}
+
+{% block base_content %}
+          <form action="{% url 'auth_login' %}" method="post">{% csrf_token %}
+            {% if next %}<input type="hidden" name="next" value="{{next}}"/>{% endif %}
+            <fieldset>
+              <legend>Sign in</legend>
+              {% include "bootstrap_form.html" %}
+              <button type="submit" class="btn btn-primary">Sign In</button>  
+              <a class="btn" href="{% url 'create_account' %}">Sign Up</a>
+            </fieldset>
+          </form>
+{% endblock %}

templates/registration/signup.html

+{% extends "base.html" %}
+
+{% block title %}Create Account{% endblock %}
+
+{% block base_content %}
+          <form class="form-horizontal" action="{% url 'create_account' %}" method="post">{% csrf_token %}
+            <fieldset>
+              <legend>Sign up</legend>
+              {% include "bootstrap_form.html" %}
+              <button type="submit" class="btn btn-primary">Sign In</button>
+            </fieldset>
+          </form>
+{% endblock %}