Permalink
Browse files

bootstrap starter template

  • Loading branch information...
1 parent 1a27e5b commit 4f2f89fc30398f90bf980f801a0fc66f75d7d8e3 @pirandig pirandig committed Mar 23, 2012
Showing with 110 additions and 43 deletions.
  1. 0 LICENSE → licenses/django-base-template
  2. +110 −43 project_name/base/templates/base.html
View
0 LICENSE → licenses/django-base-template
File renamed without changes.
View
153 project_name/base/templates/base.html
@@ -1,3 +1,4 @@
+{% load compress %}
<!doctype html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
@@ -6,66 +7,132 @@
<!-- Consider adding a manifest.appcache: h5bp.com/d/Offline -->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
- <meta charset="utf-8">
+ <meta charset="utf-8">
- <!-- Use the .htaccess and remove these lines to avoid edge case issues.
- More info: h5bp.com/i/378 -->
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <!-- Use the .htaccess and remove these lines to avoid edge case issues.
+ More info: h5bp.com/i/378 -->
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ {% block meta %}{% endblock %}
- <title>{% block page_title %}{{ _("Your Site") }}{% endblock %}</title>
- <meta name="description" content="{% block meta_description %}{% endblock %}">
- <meta name="author" content="{% block meta_author %}{% endblock %}">
+ <title>{% block title %}{% block page_title %}{{ project_name }}{% endblock %}{% endblock %}</title>
+ <meta name="description" content="{% block meta_description %}{% endblock %}">
+ <meta name="author" content="{% block meta_author %}{% endblock %}">
- <!-- Mobile viewport optimized: h5bp.com/viewport -->
- <meta name="viewport" content="width=device-width">
+ <!-- Mobile viewport optimized: h5bp.com/viewport -->
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <!-- Place favicon.ico and apple-touch-icon.png in the root directory: mathiasbynens.be/notes/touch-icons -->
- <link rel="stylesheet" href="{{ STATIC_URL }}css/style.css">
- {% block css %}{% endblock %}
+ <!-- Le fav and touch icons -->
+ <link rel="shortcut icon" href="{{ STATIC_URL }}favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href={{ STATIC_URL }}apple-touch-icon-114-precomposed.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href={{ STATIC_URL }}apple-touch-icon-72-precomposed.png">
+ <link rel="apple-touch-icon-precomposed" href="{{ STATIC_URL }}apple-touch-icon-57-precomposed.png">
- <!-- More ideas for your <head> here: h5bp.com/d/head-Tips -->
- <!-- All JavaScript at the bottom, except this Modernizr build.
- Modernizr enables HTML5 elements & feature detects for optimal performance.
- Create your own custom Modernizr build: www.modernizr.com/download/ -->
- <script src="{{ STATIC_URL }}js/libs/modernizr-2.5.3-respond-1.1.0.min.js"></script>
+ <link rel="stylesheet" href="{{ STATIC_URL }}css/style.css">
+ {% block css %}{% endblock %}
+
+ <!-- More ideas for your <head> here: h5bp.com/d/head-Tips -->
+
+ <!-- All JavaScript at the bottom, except this Modernizr build.
+Modernizr enables HTML5 elements & feature detects for optimal performance.
+Create your own custom Modernizr build: www.modernizr.com/download/ -->
+ <script src="{{ STATIC_URL }}js/libs/modernizr-2.5.3-respond-1.1.0.min.js"></script>
+
+
+ <!-- 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 */
+ }
+ </style>
+ <link href="{{ STATIC_URL }bootstrap-responsive.css" rel="stylesheet">
+
+ <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
+ <!--[if lt IE 9]>
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+
</head>
-<body class="{% block body_class %}{% endblock %}">
+<body id="{% block body_id %}{% endblock %}" class="{% block body_class %}{% endblock %}">
{% block body %}
- <!-- Prompt IE 6 users to install Chrome Frame. Remove this if you support IE 6.
- chromium.org/developers/how-tos/chrome-frame-getting-started -->
- <!--[if lt IE 7]><p class=chromeframe>Your browser is <em>ancient!</em> <a href="http://browsehappy.com/">Upgrade to a different browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to experience this site.</p><![endif]-->
- <header>
+<!-- Prompt IE 6 users to install Chrome Frame. Remove this if you support IE 6.
+chromium.org/developers/how-tos/chrome-frame-getting-started -->
+<!--[if lt IE 7]><p class=chromeframe>Your browser is <em>ancient!</em> <a href="http://browsehappy.com/">Upgrade to a different browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to experience this site.</p><![endif]-->
- </header>
- <div role="main">
- {% block content %}{% endblock %}
- </div>
- <footer>
+<nav class="navbar navbar-fixed-top">
+ <div class="navbar-inner">
+ <div class="container">
+ <a 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>
+ </a>
+ <a class="brand" href="#">{{ project_name }}</a>
+ <div class="nav-collapse">
+ <ul class="nav">
+ <li class="active"><a href="#">Home</a></li>
+ <li><a href="#about">About</a></li>
+ <li><a href="#contact">Contact</a></li>
+ </ul>
+ </div><!--/.nav-collapse -->
+ </div>
+ </div>
+</nav>
- </footer>
+<header>
+ <div class="content_title">
+ {% block content_title %}{% endblock %}
+ </div>
+</header>
- <!-- JavaScript at the bottom for fast page loading -->
- <!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if offline -->
- <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
- <script>window.jQuery || document.write('<script src="{{ STATIC_URL }}js/libs/jquery-1.7.1.min.js"><\/script>')</script>
+<div class="container">
- <!-- scripts concatenated and minified via build script -->
- <script src="{{ STATIC_URL }}js/plugins.js"></script>
- <script src="{{ STATIC_URL }}js/script.js"></script>
- <!-- end scripts -->
+ <h1>Django Base Template Bootstrap starter template</h1>
+ <p>Use this document as a way to quick start any new project.</p>
+ {% block content %}{% endblock %}
+</div> <!-- /container -->
+
+
+<footer>
+ <p><a href="http://piran.com.au">Piran Digital</a> 2012</p>
+</footer>
- <!-- Asynchronous Google Analytics snippet. Change UA-XXXXX-X to be your site's ID.
- mathiasbynens.be/notes/async-analytics-snippet -->
- <script>
+{% compress js %}
+<!-- JavaScript at the bottom for fast page loading -->
+<!-- scripts concatenated and minified via build script -->
+<script src="{{ STATIC_URL }}js/libs/jquery-1.7.1.min.js"></script>
+<script src="{{ STATIC_URL }}js/libs/bootstrap/transition.js"></script>
+<script src="{{ STATIC_URL }}js/libs/bootstrap/alert.js"></script>
+<script src="{{ STATIC_URL }}js/libs/bootstrap/modal.js"></script>
+<script src="{{ STATIC_URL }}js/libs/bootstrap/dropdown.js"></script>
+<script src="{{ STATIC_URL }}js/libs/bootstrap/scrollspy.js"></script>
+<script src="{{ STATIC_URL }}js/libs/bootstrap/tab.js"></script>
+<script src="{{ STATIC_URL }}js/libs/bootstrap/tooltip.js"></script>
+<script src="{{ STATIC_URL }}js/libs/bootstrap/popover.js"></script>
+<script src="{{ STATIC_URL }}js/libs/bootstrap/button.js"></script>
+<script src="{{ STATIC_URL }}js/libs/bootstrap/collapse.js"></script>
+<script src="{{ STATIC_URL }}js/libs/bootstrap/carousel.js"></script>
+<script src="{{ STATIC_URL }}js/libs/bootstrap/typeahead.js"></script>
+<!-- end scripts -->
+{% endcompress %}
+
+<!-- Asynchronous Google Analytics snippet. Change UA-XXXXX-X to be your site's ID.
+mathiasbynens.be/notes/async-analytics-snippet -->
+<script>
var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
- g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
- s.parentNode.insertBefore(g,s)}(document,'script'));
- </script>
+ g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
+ s.parentNode.insertBefore(g,s)}(document,'script'));
+</script>
{% endblock %}
+
+<!-- Le javascript
+================================================== -->
+<!-- Placed at the end of the document so the pages load faster -->
+
</body>
-</html>
+</html>

0 comments on commit 4f2f89f

Please sign in to comment.