summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/blog_archive.html14
-rw-r--r--templates/blog_index.html18
-rw-r--r--templates/blog_post.html26
-rw-r--r--templates/blog_tags.html22
-rw-r--r--templates/page.html57
5 files changed, 137 insertions, 0 deletions
diff --git a/templates/blog_archive.html b/templates/blog_archive.html
new file mode 100644
index 0000000..df6b810
--- /dev/null
+++ b/templates/blog_archive.html
@@ -0,0 +1,14 @@
1{% extends "page.html" %}
2
3{% set is_blog = True %}
4
5{% block contents %}
6{% for year, post_set in posts %}
7<h2>{{ year }}</h2>
8<ul>
9 {% for post in post_set %}
10 <li><a href="{{ post.filename|replace('.rst', '.html') }}">{{ post.title }}</a></li>
11 {% endfor %}
12</ul>
13{% endfor %}
14{% endblock %}
diff --git a/templates/blog_index.html b/templates/blog_index.html
new file mode 100644
index 0000000..bb918fa
--- /dev/null
+++ b/templates/blog_index.html
@@ -0,0 +1,18 @@
1{% extends "page.html" %}
2
3{% set is_blog = True %}
4
5{% block contents %}
6{% for post in posts %}
7<h1 class="title">{{ post.title }}</h1>
8<p><span class="label">Posted:</span> {{ post.pretty_date }}</span></p>
9{{ post.contents }}
10{% if not loop.last %}
11<hr />
12{% endif %}
13{% endfor %}
14{% endblock %}
15
16{% block update_date %}
17 <p class="updated"><span class="label">Page last updated:</span> {{ posts[0].pretty_date }}</p>
18{% endblock %}
diff --git a/templates/blog_post.html b/templates/blog_post.html
new file mode 100644
index 0000000..96c7bd9
--- /dev/null
+++ b/templates/blog_post.html
@@ -0,0 +1,26 @@
1{% extends "page.html" %}
2
3{% set is_blog = True %}
4
5{% block contents %}
6<h1 class="title">{{ post.title }}</h1>
7{{ post.contents }}
8
9{# Maybe enable comments... some day...
10<hr />
11<h2>Comments</h2>
12<hr />
13<div id="disqus_thread"></div>
14<script type="text/javascript">
15(function() {
16var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
17dsq.src = 'http://randomthoughtsofaprogrammer.disqus.com/embed.js';
18(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
19})();
20</script>
21#}
22{% endblock %}
23
24{% block update_date %}
25 <p class="updated"><span class="label">Page last updated:</span> {{ post.pretty_date }}</p>
26{% endblock %}
diff --git a/templates/blog_tags.html b/templates/blog_tags.html
new file mode 100644
index 0000000..bcf7d42
--- /dev/null
+++ b/templates/blog_tags.html
@@ -0,0 +1,22 @@
1{% extends "page.html" %}
2
3{% set is_blog = True %}
4
5{% block contents %}
6<h2>All Tags</h2>
7<p>
8{%- for tag, post_set in posts %}
9<a href="#{{ tag }}">{{ tag }}</a>
10{% endfor %}
11</p>
12
13
14{% for tag, post_set in posts %}
15<h2 id="{{ tag }}">{{ tag }}</h2>
16<ul>
17 {% for post in post_set %}
18 <li><a href="{{ post.filename|replace('.rst', '.html') }}">{{ post.title }}</a></li>
19 {% endfor %}
20</ul>
21{% endfor %}
22{% endblock %}
diff --git a/templates/page.html b/templates/page.html
new file mode 100644
index 0000000..83fa0dc
--- /dev/null
+++ b/templates/page.html
@@ -0,0 +1,57 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4<head>
5<meta http-equiv="content-type" content="text/html;charset=utf-8" />
6<meta name="google-site-verification" content="Ycqn8jLbKJrWCDs97nD20cjYEhFf875j1teoofSd6Sc" />
7<meta name="generator" content="Ventriloquy 0.1" />
8<meta name="author" content="Michael Crute" />
9<title>The Random Thoughts of a Programmer</title>
10<style type="text/css">@import url('/resources/site-min.css');</style>
11</head>
12<body>
13
14<div id="header">
15 <h1 class="headline"><a href="/">mike<span>.</span>crute<span>.org</span></a></h1>
16</div>
17
18<div id="contents">
19
20{% block contents %}
21{{ contents }}
22{% endblock %}
23
24</div>
25
26<div id="footer">
27{% if is_blog %}
28<div id="footer-blog">
29 <ul class="links">
30 <li><span class="label">Blog Links:</span></li>
31 <li><a href="archive">Archive</a></li>
32 <li><a href="tags">Tags</a></li>
33 <li><a href="feed">Atom Feed</a></li>
34 </ul>
35</div>
36{% endif %}
37
38<div id="footer-page">
39 <ul class="links">
40 <li><span class="label">Site Links:</span></li>
41 <li><a href="/">Home</a></li>
42 <li><a href="/blog">Blog</a></li>
43 <li><a href="/personal_blog">Personal Blog</a></li>
44 <li><a href="/code">Code</a></li>
45 <li><a href="http://twitter.com/mcrute">Twitter</a></li>
46 </ul>
47
48 {% block update_date %}
49 <p class="updated"><span class="label">Page last updated:</span> {{ build_date }}</p>
50 {% endblock %}
51 <p class="copyright">Copyright &copy; 2010 Michael E. Crute &lt;<a href="mailto:mcrute@gmail.com">mcrute@gmail.com</a>&gt;. Contact me for other uses.</p>
52 <p class="poweredby">This site powered by <a href="http://www.vim.org">VIM</a>, <a href="http://docutils.sourceforge.net">ReStructuredText</a> and <a href="http://python.org">Python</a>.</p>
53</div>
54</div>
55
56</body>
57</html>