673df76b12d6

Format the templates to keep me sane.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Wed, 16 Dec 2009 19:49:42 -0500
parents 637a1763479b
children 6ece8433ba1e
branches/tags (none)
files layout/_flatpage.html layout/_post.html layout/skeleton/_base.html layout/skeleton/_body.html layout/skeleton/_breadcrumbs.html layout/skeleton/_footer.html layout/skeleton/_index.html layout/skeleton/_innerindex.html layout/skeleton/_innerlisting.html layout/skeleton/_listing.html

Changes

--- a/layout/_flatpage.html	Wed Dec 16 19:21:22 2009 -0500
+++ b/layout/_flatpage.html	Wed Dec 16 19:49:42 2009 -0500
@@ -1,14 +1,11 @@
 {% extends "skeleton/_body.html" %}
-{% block content_body %}
-<div id="post-content">
-{% filter typogrify %}
-{% markdown %}
 
-{% block article %}
-    
-{% endblock %}
-    
-{% endmarkdown %}
-{% endfilter %}
-</div>
+{% block content_body %}
+    <div id="post-content">
+        {% filter typogrify %}
+            {% markdown %}
+                {% block article %}{% endblock %}
+            {% endmarkdown %}
+        {% endfilter %}
+    </div>
 {% endblock %}
\ No newline at end of file
--- a/layout/_post.html	Wed Dec 16 19:21:22 2009 -0500
+++ b/layout/_post.html	Wed Dec 16 19:49:42 2009 -0500
@@ -1,14 +1,13 @@
 {% extends "skeleton/_body.html" %}
+
 {% block content_body %}
-<div id="post-content">
-{% filter typogrify %}
-{% markdown %}
-{% article %}
-{% block article %}
-    
-{% endblock %}
-{% endarticle %}    
-{% endmarkdown %}
-{% endfilter %}
-</div>
+    <div id="post-content">
+        {% filter typogrify %}
+            {% markdown %}
+                {% article %}
+                    {% block article %}{% endblock %}
+                {% endarticle %}    
+            {% endmarkdown %}
+        {% endfilter %}
+    </div>
 {% endblock %}
\ No newline at end of file
--- a/layout/skeleton/_base.html	Wed Dec 16 19:21:22 2009 -0500
+++ b/layout/skeleton/_base.html	Wed Dec 16 19:49:42 2009 -0500
@@ -1,27 +1,36 @@
 {% extends "skeleton/_root.html" %}
+
 {% block all %}
 <?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-	"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-    <meta http-equiv="content-type" content="text/html; charset=utf-8">
-    <title>{% block title %}{{site.name}} / {{ page.title }}{% endblock %}</title>
-    {% block feeds %}
-    <link href="{{site.url}}/blog/atom.xml" rel="alternate" title="{{site.name}}" type="application/atom+xml"/>
-    {% endblock %}
-    {% block css %}
-    <link rel="stylesheet" href="{{site.url}}/media/css/base.css" type="text/css" media="screen" charset="utf-8">
-    {% block extra_css %}{% endblock %}{% endblock %}{% block js %}
-    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
-    {% block extra_js %}{% endblock %}{% endblock %}
-</head>
-<body>
-{% include "skeleton/_header.html" %}
-<div id="content">
-    {% block content %}{% endblock %}
-</div>
-{% include "skeleton/_footer.html" %}
-</body>
+    <head>
+        <meta http-equiv="content-type" content="text/html; charset=utf-8">
+        
+        <title>{% block title %}{{site.name}} / {{ page.title }}{% endblock %}</title>
+        
+        {% block feeds %}
+            <link href="{{site.url}}/blog/atom.xml" rel="alternate" title="{{site.name}}" type="application/atom+xml"/>
+        {% endblock %}
+        
+        {% block css %}
+            <link rel="stylesheet" href="{{site.url}}/media/css/base.css" type="text/css" media="screen" charset="utf-8">
+            {% block extra_css %}{% endblock %}
+        {% endblock %}
+        
+        {% block js %}
+            <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
+            {% block extra_js %}{% endblock %}
+        {% endblock %}
+    </head>
+    
+    <body>
+        {% include "skeleton/_header.html" %}
+        <div id="content">
+            {% block content %}{% endblock %}
+        </div>
+        {% include "skeleton/_footer.html" %}
+    </body>
 </html>
 {% endblock %}
\ No newline at end of file
--- a/layout/skeleton/_body.html	Wed Dec 16 19:21:22 2009 -0500
+++ b/layout/skeleton/_body.html	Wed Dec 16 19:49:42 2009 -0500
@@ -1,25 +1,32 @@
 {% extends "skeleton/_base.html" %}
+
 {% block title %}{{site.name}} / {{ page.title }}{% endblock %}
-{% block content %}
-{% comment %}{% block breadcrumbs %}{% include "skeleton/_breadcrumbs.html"%}{% endblock %}{% endcomment %}
-{% block nav %}
-<div id="nav">
-    <ul>
-        <a href="{{site.listing_url}}">
-        <li{% ifequal page.module site.module %} class="home-selected" {% endifequal %}>
-            Home
-        </li>
-        </a>
-        {% for module in site.children %}
-        <a href="{{module.listing_url}}">
-        <li{% ifequal page.module module %} class="selected" {% endifequal %}>
-            {{module.name|unslugify}}
-        </li>
-        </a>
-        {% endfor %}
-    </ul>
-</div>
-{% endblock %}
-{% block content_header %}{% ifnotequal page.module site.module %}<div class="article title"><h3>{{ page.title }}</h3></div>{% endifnotequal %}{% endblock %}
-{% block content_body %}{% endblock %}
+
+{% block content %}    
+    {% block nav %}
+        <div id="nav">
+            <ul>
+                <a href="{{site.listing_url}}">
+                    <li{% ifequal page.module site.module %} class="home-selected" {% endifequal %}>
+                        Home
+                    </li>
+                </a>
+                {% for module in site.children %}
+                    <a href="{{module.listing_url}}">
+                        <li{% ifequal page.module module %} class="selected" {% endifequal %}>
+                            {{module.name|unslugify}}
+                        </li>
+                    </a>
+                {% endfor %}
+            </ul>
+        </div>
+    {% endblock %}
+    
+    {% block content_header %}
+        {% ifnotequal page.module site.module %}
+            <div class="article title"><h3>{{ page.title }}</h3></div>
+        {% endifnotequal %}
+    {% endblock %}
+    
+    {% block content_body %}{% endblock %}
 {% endblock %}
\ No newline at end of file
--- a/layout/skeleton/_breadcrumbs.html	Wed Dec 16 19:21:22 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-{% extends "skeleton/_root.html" %}
-{% block all %}
-<ul class="breadcrumbs">
-{% for node in page.node.ancestors %}
-    <li>
-        <a href="{{node.listing_url}}">{{node.name|unslugify}}</a>
-        {% if not forloop.last%}{% block breadcrumb_seperator %}
-        <span class="separator">&gt;</span>{% endblock %}{% endif %}
-    </li>
-{% endfor %}
-</ul>
-    
-{% endblock %}
\ No newline at end of file
--- a/layout/skeleton/_footer.html	Wed Dec 16 19:21:22 2009 -0500
+++ b/layout/skeleton/_footer.html	Wed Dec 16 19:49:42 2009 -0500
@@ -1,1 +1,3 @@
-<div id='footer'> Copyright {{site.name}}. Simple template by <a href="http://exurbia.tumblr.com/">Harry Lachenmayer</a></div>
+<div id='footer'>
+    Copyright {{site.name}}.
+</div>
--- a/layout/skeleton/_index.html	Wed Dec 16 19:21:22 2009 -0500
+++ b/layout/skeleton/_index.html	Wed Dec 16 19:49:42 2009 -0500
@@ -1,6 +1,7 @@
 {% extends "skeleton/_body.html" %}
+
 {% block content_body %}
-{% for node in page.node.walk %}
-{% include "skeleton/_innerindex.html" %}
-{% endfor %} 
+    {% for node in page.node.walk %}
+        {% include "skeleton/_innerindex.html" %}
+    {% endfor %} 
 {% endblock %}
\ No newline at end of file
--- a/layout/skeleton/_innerindex.html	Wed Dec 16 19:21:22 2009 -0500
+++ b/layout/skeleton/_innerindex.html	Wed Dec 16 19:49:42 2009 -0500
@@ -1,20 +1,21 @@
 {% extends "skeleton/_root.html" %}
+
 {% block all %}
-{%spaceless%}
-{% for list_page in node.pages %}
-{% ifnotequal list_page node.listing_page %}
-{% if not list_page.exclude %}
-<div class="article">
-    <div class="title">
-    {% with list_page.name_without_extension|remove_date_prefix|unslugify as default_title %}
-        <h3><a href="{{list_page.url}}">{{list_page.title|default_if_none:default_title }}</a></h3>
-        {% if list_page.created %}<span>{{list_page.created}}</span>{% endif %}
-    {%endwith%}
-    </div>
-    {% render_article list_page %}
-</div>
-{%endif%}
-{% endifnotequal %}
-{% endfor %}
-{%endspaceless%}
+    {%spaceless%}
+        {% for list_page in node.pages %}
+            {% ifnotequal list_page node.listing_page %}
+                {% if not list_page.exclude %}
+                    <div class="article">
+                        <div class="title">
+                            {% with list_page.name_without_extension|remove_date_prefix|unslugify as default_title %}
+                                <h3><a href="{{list_page.url}}">{{list_page.title|default_if_none:default_title }}</a></h3>
+                                {% if list_page.created %}<span>{{list_page.created}}</span>{% endif %}
+                            {%endwith%}
+                        </div>
+                        {% render_article list_page %}
+                    </div>
+                {%endif%}
+            {% endifnotequal %}
+        {% endfor %}
+    {%endspaceless%}
 {% endblock %}
\ No newline at end of file
--- a/layout/skeleton/_innerlisting.html	Wed Dec 16 19:21:22 2009 -0500
+++ b/layout/skeleton/_innerlisting.html	Wed Dec 16 19:49:42 2009 -0500
@@ -1,16 +1,19 @@
 {% extends "skeleton/_root.html" %}
+
 {% block all %}
-{%spaceless%}
-<ul id="archives">
-    {% for list_page in node.pages %}
-    {% ifnotequal list_page node.listing_page %}
-    {% if not list_page.exclude %}
-    <li class="archives">
-        <a href="{{list_page.url}}">
-        {% with list_page.name_without_extension|remove_date_prefix|unslugify as default_title %}{{list_page.title|default_if_none:default_title }}{%endwith%}
-        </a>
-    </li>
-    {%endif%}{% endifnotequal %}{% endfor %}
-</ul>
-{%endspaceless%}
+    {%spaceless%}
+        <ul id="archives">
+            {% for list_page in node.pages %}
+                {% ifnotequal list_page node.listing_page %}
+                    {% if not list_page.exclude %}
+                        <li class="archives">
+                            <a href="{{list_page.url}}">
+                                {% with list_page.name_without_extension|remove_date_prefix|unslugify as default_title %}{{list_page.title|default_if_none:default_title }}{%endwith%}
+                            </a>
+                        </li>
+                    {%endif%}
+                {% endifnotequal %}
+            {% endfor %}
+        </ul>
+    {%endspaceless%}
 {% endblock %}
\ No newline at end of file
--- a/layout/skeleton/_listing.html	Wed Dec 16 19:21:22 2009 -0500
+++ b/layout/skeleton/_listing.html	Wed Dec 16 19:49:42 2009 -0500
@@ -1,8 +1,9 @@
 {% extends "skeleton/_body.html"%}
+
 {% block content_body %}
-<div id="listing">
-{% for node in page.node.walk %}
-{% include "skeleton/_innerlisting.html" %}
-{% endfor %}
-</div>
+    <div id="listing">
+        {% for node in page.node.walk %}
+            {% include "skeleton/_innerlisting.html" %}
+        {% endfor %}
+    </div>
 {% endblock %}
\ No newline at end of file