From d99e8f07b74ecc4d052a2eec91a89c84f5a3b2bc Mon Sep 17 00:00:00 2001 From: frankvdp Date: Sun, 22 Sep 2013 10:59:02 +0200 Subject: [PATCH] adding main templates in haml --- .../templates/404.haml | 11 +++ .../templates/404.html | 9 --- .../templates/500.haml | 1 + .../templates/500.html | 1 - .../templates/base.haml | 79 ++++++++++++++++++ .../templates/base.html | 81 ------------------- 6 files changed, 91 insertions(+), 91 deletions(-) create mode 100644 {{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/404.haml delete mode 100644 {{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/404.html create mode 100644 {{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/500.haml delete mode 100644 {{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/500.html create mode 100644 {{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.haml delete mode 100644 {{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/404.haml b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/404.haml new file mode 100644 index 00000000..894838ec --- /dev/null +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/404.haml @@ -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. diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/404.html b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/404.html deleted file mode 100644 index 3ba605bf..00000000 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/404.html +++ /dev/null @@ -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 %} -

This is not the page you were looking for.

-{% endblock content %}{% endraw %} \ No newline at end of file diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/500.haml b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/500.haml new file mode 100644 index 00000000..baa2e237 --- /dev/null +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/500.haml @@ -0,0 +1 @@ +

Whoops!

\ No newline at end of file diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/500.html b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/500.html deleted file mode 100644 index 2118bb2c..00000000 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/500.html +++ /dev/null @@ -1 +0,0 @@ -

Whoops!

diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.haml b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.haml new file mode 100644 index 00000000..171a0636 --- /dev/null +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.haml @@ -0,0 +1,79 @@ +{% load staticfiles i18n %} +!!! +// TODO: find the right way for implementing ng-app to html using hamlpy + + %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' %}"} + \ No newline at end of file diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html deleted file mode 100644 index 70c05019..00000000 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html +++ /dev/null @@ -1,81 +0,0 @@ -{% raw %}{% load staticfiles i18n %} - - - - {% block title %}{{ project_name }}{% endblock title %} - - - - - - - - {% block css %} - - - - - - - - - - - {% endblock %} - - {% block angular %} - - {% endblock %} - - - - - - - -
- - {% block content %} -

Use this document as a way to quick start any new project.

- {% endblock content %} - -
- - {% block modal %}{% endblock modal %} - - - - {% block javascript %} - - - - - - - - - - - {% endblock javascript %} - - - {% endraw %}