adding main templates in haml

This commit is contained in:
frankvdp 2013-09-22 10:59:02 +02:00
parent 88fd3a5d23
commit d99e8f07b7
6 changed files with 91 additions and 91 deletions

View File

@ -0,0 +1,11 @@
- extends "base.html"
- block title
Page Not found
- block page_title
Page Not found
- block content
%p
This is not the page you were looking for.

View File

@ -1,9 +0,0 @@
{% raw %}{% extends "base.html" %}
{% block title %}Page Not found{% endblock %}
{% block page_title %}Page Not found{% endblock page_title %}
{% block content %}
<p>This is not the page you were looking for.</p>
{% endblock content %}{% endraw %}

View File

@ -0,0 +1 @@
<h1>Whoops!</h1>

View File

@ -0,0 +1,79 @@
{% load staticfiles i18n %}
!!!
// TODO: find the right way for implementing ng-app to html using hamlpy
<html 'lang'='en' ng-app>
%head
%meta{charset: "utf-8"}
%title
- block title
{{ project_name }}
%meta{content: "width=device-width, initial-scale=1.0", name: "viewport"}
%meta{content: "", name: "description"}
%meta{content: "", name: "author"}
/ HTML5 shim, for IE6-8 support of HTML5 elements
/[if lt IE 9]
%script{src: "http://html5shim.googlecode.com/svn/trunk/html5.js"}
- block css
/ Latest compiled and minified CSS
%link{href: "//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css", rel: "stylesheet"}/
/ Optional theme
%link{href: "//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-theme.min.css", rel: "stylesheet"}/
/ Your stuff: Third-party css libraries go here
/ This file store project specific CSS
%link{href: "{% static 'css/project.css' %}", rel: "stylesheet"}/
- block angular
%script{src: "//ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"}
%body
.header.navbar
.container
%a.navbar-brand{href: "/"}
{{cookiecutter.repo_name}}
%ul.nav.navbar-nav
%li.active
%a{href: "{% url 'home' %}"} Home
%li
%a{href: "{% url 'about' %}"} About
- if request.user.is_authenticated
%li
%a{href: "{% url 'users:detail' request.user.username %}"}
{% trans "My Profile" %}
%li
%a{href: "{% url 'account_logout' %}"}
{% trans "Logout" %}
{% else %}
%li
%a{href: "{% url 'account_signup' %}"}
{% trans "Sign Up" %}
%li
%a{href: "{% url 'account_login' %}"}
{% trans "Log In" %}
.container
- block content
%p Use this document as a way to quick start any new project.
- block modal
/ Placed at the end of the document so the pages load faster
- block javascript
/ Latest JQuery
%script{src: "//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"}
/ Latest compiled and minified JavaScript
%script{src: "//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"}
/ Your stuff: Third-party javascript libraries go here
/ place project specific Javascript in this file
%script{src: "{% static 'js/project.js' %}"}
</html>

View File

@ -1,81 +0,0 @@
{% raw %}{% load staticfiles i18n %}<!DOCTYPE html>
<html lang="en" ng-app>
<head>
<meta charset="utf-8">
<title>{% block title %}{{ project_name }}{% endblock title %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- 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]-->
{% block css %}
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-theme.min.css">
<!-- Your stuff: Third-party css libraries go here -->
<!-- This file store project specific CSS -->
<link href="{% static 'css/project.css' %}" rel="stylesheet">
{% endblock %}
{% block angular %}
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
{% endblock %}
</head>
<body>
<div class="header navbar">
<div class="container">
<a class="navbar-brand" href="/">{{cookiecutter.repo_name}}</a>
<ul class="nav navbar-nav">
<li class="active"><a href="{% url 'home' %}">Home</a></li>
<li><a href="{% url 'about' %}">About</a></li>
{% if request.user.is_authenticated %}
<li><a href="{% url 'users:detail' request.user.username %}">{% trans "My Profile" %}</a></li>
<li><a href="{% url 'account_logout' %}">{% trans "Logout" %}</a></li>
{% else %}
<li><a href="{% url 'account_signup' %}">{% trans "Sign Up" %}</a></li>
<li><a href="{% url 'account_login' %}">{% trans "Log In" %}</a></li>
{% endif %}
</ul>
</div>
</div>
<div class="container">
{% block content %}
<p>Use this document as a way to quick start any new project.</p>
{% endblock content %}
</div> <!-- /container -->
{% block modal %}{% endblock modal %}
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
{% block javascript %}
<!-- Latest JQuery -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<!-- Latest compiled and minified JavaScript -->
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<!-- Your stuff: Third-party javascript libraries go here -->
<!-- place project specific Javascript in this file -->
<script src="{% static 'js/project.js' %}"></script>
{% endblock javascript %}
</body>
</html>
{% endraw %}