Skip to content

Commit

Permalink
Add categories.
Browse files Browse the repository at this point in the history
  • Loading branch information
sjl committed Jan 16, 2010
1 parent 2906b89 commit 4dfb4e8
Show file tree
Hide file tree
Showing 43 changed files with 175 additions and 18 deletions.
Expand Up @@ -4,6 +4,7 @@
title: "Entourage + Applescript = Frustration"
snip: "This is ridiculous."
created: 2008-02-21 15:25:45
categories: ["programming"]
%}

{% block article %}
Expand Down
1 change: 1 addition & 0 deletions content/blog/2008/04/shooting-girl-jam.html
Expand Up @@ -4,6 +4,7 @@
title: "Shooting Girl Jam"
snip: "I’m finally getting the kind of dancing photos I want."
created: 2008-04-29 18:31:16
categories: ["photography", "dancing"]
%}


Expand Down
Expand Up @@ -4,6 +4,7 @@
title: "Beauty in Computer Science"
snip: "Why I love what I do."
created: 2008-08-29 15:30:38
categories: ["programming"]
%}


Expand Down
1 change: 1 addition & 0 deletions content/blog/2008/08/negative-space-dancing.html
Expand Up @@ -4,6 +4,7 @@
title: "Negative Space in Dancing"
snip: "It’s not just for artsy kids."
created: 2008-08-31 15:33:57
categories: ["dancing"]
%}


Expand Down
1 change: 1 addition & 0 deletions content/blog/2008/08/on-leading.html
Expand Up @@ -4,6 +4,7 @@
title: "On Leading"
snip: "Some of my thoughts on leading after five years of doing it."
created: 2008-08-01 15:28:33
categories: ["dancing"]
%}


Expand Down
Expand Up @@ -4,6 +4,7 @@
title: "Deploying with Fabric & Mercurial"
snip: "Trimming typing."
created: 2009-01-15 20:51:09
categories: ["programming"]
%}

{% block article %}
Expand Down
1 change: 1 addition & 0 deletions content/blog/2009/01/going-open-source.html
Expand Up @@ -4,6 +4,7 @@
title: "Going Open Source"
snip: "Why I’m making the code to this website public."
created: 2009-01-13 20:08:56
categories: ["programming"]
%}

{% block article %}
Expand Down
1 change: 1 addition & 0 deletions content/blog/2009/01/site-redesign.html
Expand Up @@ -4,6 +4,7 @@
title: "Site Redesign"
snip: "Yeah, I know. Again."
created: 2009-01-11 17:58:23
categories: ["programming"]
%}

{% block article %}
Expand Down
1 change: 1 addition & 0 deletions content/blog/2009/02/how-and-why-i-dj.html
Expand Up @@ -4,6 +4,7 @@
title: "How & Why I DJ"
snip: "I like playing music for dancers."
created: 2009-02-06 17:53:44
categories: ["music", "dancing"]
%}

{% block article %}
Expand Down
1 change: 1 addition & 0 deletions content/blog/2009/02/how-i-shoot-dances.html
Expand Up @@ -4,6 +4,7 @@
title: "How I Shoot Dances"
snip: "Slow shutter and flash."
created: 2009-02-09 18:04:36
categories: ["photography", "dancing"]
%}

{% block article %}
Expand Down
1 change: 1 addition & 0 deletions content/blog/2009/03/candy-colored-terminal.html
Expand Up @@ -4,6 +4,7 @@
title: "Candy Colored Terminal"
snip: "Better colors for the OS X Terminal."
created: 2009-03-18 18:26:28
categories: ["programming"]
%}

{% block article %}
Expand Down
1 change: 1 addition & 0 deletions content/blog/2009/03/mercurial-bash-prompts.html
Expand Up @@ -4,6 +4,7 @@
title: "Mercurial Bash Prompts"
snip: "Always know where you are."
created: 2009-03-17 21:34:55
categories: ["programming"]
%}

{% block article %}
Expand Down
1 change: 1 addition & 0 deletions content/blog/2009/04/why-people-dont-like-metal.html
Expand Up @@ -4,6 +4,7 @@
title: "Why People Don’t Like Metal"
snip: "It’s probably not what you think."
created: 2009-04-02 22:32:27
categories: ["music"]
%}

{% block article %}
Expand Down
1 change: 1 addition & 0 deletions content/blog/2009/05/what-i-hate-about-mercurial.html
Expand Up @@ -4,6 +4,7 @@
title: "What I Hate About Mercurial"
snip: "Hg, I love you, but sometimes you bring me down."
created: 2009-05-29 19:51:05
categories: ["programming"]
%}

{% block article %}
Expand Down
1 change: 1 addition & 0 deletions content/blog/2009/06/how-to-contribute-to-mercurial.html
Expand Up @@ -4,6 +4,7 @@
title: "How to Contribute to Mercurial"
snip: "Ten minutes of setup will make it easier."
created: 2009-06-01 20:09:44
categories: ["programming"]
%}

{% block article %}
Expand Down
Expand Up @@ -4,6 +4,7 @@
title: "A Guide to Branching in Mercurial"
snip: "With illustrations and comparisons to git."
created: 2009-08-30 20:27:12
categories: ["programming"]
%}

{% block article %}
Expand Down
1 change: 1 addition & 0 deletions content/blog/2009/11/my-sitesprint-project-lindyhub.html
Expand Up @@ -4,6 +4,7 @@
title: "My SiteSprint Project: LindyHub"
snip: "I want to make something awesome for dancers."
created: 2009-11-16 19:15:07
categories: ["programming", "dancing"]
%}

{% block article %}
Expand Down
1 change: 1 addition & 0 deletions content/blog/2010/01/moving-from-django-to-hyde.html
Expand Up @@ -4,6 +4,7 @@
title: "Moving from Django to Hyde"
snip: "Another year, another rewrite."
created: 2010-01-15 20:14:00
categories: ["programming"]
%}

{% block article %}
Expand Down
7 changes: 7 additions & 0 deletions content/blog/dancing.html
@@ -0,0 +1,7 @@
{% extends "skeleton/_categorylisting.html" %}

{% hyde
title: "Blog"
category: "dancing"
exclude: True
%}
7 changes: 7 additions & 0 deletions content/blog/music.html
@@ -0,0 +1,7 @@
{% extends "skeleton/_categorylisting.html" %}

{% hyde
title: "Blog"
category: "music"
exclude: True
%}
7 changes: 7 additions & 0 deletions content/blog/photography.html
@@ -0,0 +1,7 @@
{% extends "skeleton/_categorylisting.html" %}

{% hyde
title: "Blog"
category: "photography"
exclude: True
%}
7 changes: 7 additions & 0 deletions content/blog/programming.html
@@ -0,0 +1,7 @@
{% extends "skeleton/_categorylisting.html" %}

{% hyde
title: "Blog"
category: "programming"
exclude: True
%}
1 change: 1 addition & 0 deletions content/projects/django-hoptoad.html
Expand Up @@ -4,6 +4,7 @@
title: "django-hoptoad"
snip: "Now ponies can ride the toad too."
created: 2009-07-25 01:16:40
categories: ["programming"]
%}

{% block article %}
Expand Down
1 change: 1 addition & 0 deletions content/projects/fuego.html
Expand Up @@ -4,6 +4,7 @@
title: "Fuego"
snip: "Photographs of Alex. Studio."
created: 2009-01-19 01:25:20
categories: ["photography"]
%}

{% block article %}
Expand Down
1 change: 1 addition & 0 deletions content/projects/grabtweets.html
Expand Up @@ -4,6 +4,7 @@
title: "grabtweets"
snip: "A simple tool for backing up your tweets."
created: 2009-09-12 11:02:46
categories: ["programming"]
%}

{% block article %}
Expand Down
1 change: 1 addition & 0 deletions content/projects/hg-paste.html
Expand Up @@ -4,6 +4,7 @@
title: "hg-paste"
snip: "Send diffs from Mercurial to various pastebin websites."
created: 2009-09-16 17:52:55
categories: ["programming"]
%}

{% block article %}
Expand Down
1 change: 1 addition & 0 deletions content/projects/hg-prompt.html
Expand Up @@ -4,6 +4,7 @@
title: "hg-prompt"
snip: "A Mercurial extension for adding repository info to your shell prompt."
created: 2009-06-19 22:25:17
categories: ["programming"]
%}

{% block article %}
Expand Down
2 changes: 2 additions & 0 deletions content/projects/hgtab.html
Expand Up @@ -4,6 +4,8 @@
title: "hgtab"
snip: "Smarter tab completion for Mercurial in bash."
created: 2009-03-10 20:22:44
categories: ["programming"]
exclude: True
%}

{% block article %}
Expand Down
1 change: 1 addition & 0 deletions content/projects/lindyjam-com.html
Expand Up @@ -4,6 +4,7 @@
title: "lindyjam.com"
snip: "A page for a local weekly swing dance event (and more)."
created: 2009-01-21 18:28:35
categories: ["programming"]
%}

{% block article %}
Expand Down
7 changes: 7 additions & 0 deletions content/projects/photography.html
@@ -0,0 +1,7 @@
{% extends "skeleton/_categorylisting.html" %}

{% hyde
title: "Programming"
category: "photography"
exclude: True
%}
7 changes: 7 additions & 0 deletions content/projects/programming.html
@@ -0,0 +1,7 @@
{% extends "skeleton/_categorylisting.html" %}

{% hyde
title: "Projects"
category: "programming"
exclude: True
%}
1 change: 1 addition & 0 deletions content/projects/stevelosh-com.html
Expand Up @@ -4,6 +4,7 @@
title: "stevelosh.com"
snip: "This website."
created: 2009-01-11 15:40:26
categories: ["programming"]
%}

{% block article %}
Expand Down
1 change: 1 addition & 0 deletions content/projects/t.html
Expand Up @@ -4,6 +4,7 @@
title: "t"
snip: "A command-line todo list manager for people that want to <em>finish</em> tasks, not organize them."
created: 2009-09-11 19:03:29
categories: ["programming"]
%}

{% block article %}
Expand Down
1 change: 1 addition & 0 deletions content/projects/women-in-water.html
Expand Up @@ -4,6 +4,7 @@
title: "Women in Water"
snip: "Photographs of women in Lake Ontario."
created: 2009-08-04 18:57:36
categories: ["photography"]
%}

{% block article %}
Expand Down
2 changes: 1 addition & 1 deletion fabfile.py
Expand Up @@ -15,7 +15,7 @@ def regen():
local('hyde -g -s .')

def serve():
local('hyde -w -s .')
local('hyde -w -s . -k')

def reserve():
regen()
Expand Down
10 changes: 9 additions & 1 deletion layout/_post.html
Expand Up @@ -11,7 +11,15 @@
<h1><a href="{{ page.url }}">{{ page.title|safe|typogrify }}</a></h1>
</div>

<div id="leaf-stats"><p>Posted on {{ page.created|date:"l, F j, Y" }} ({{ page.created|timesince }} ago).</p></div>
<div id="leaf-stats">
<p>
Posted {{ page.created|timesince }} ago on {{ page.created|date:"F j, Y" }}
{% if page.categories %}
and tagged as
{% for category in page.categories %}{% if not forloop.first %}{% if forloop.last %} and {% else %}, {% endif %}{% endif %}<a href="{{ page.node.ancestors.1.url }}/{{ category }}/">{{ category }}</a>{% endfor %}.
{% endif %}
</p>
</div>

<div id="leaf-content">
{% filter typogrify %}
Expand Down
5 changes: 3 additions & 2 deletions layout/skeleton/_base.html
Expand Up @@ -8,7 +8,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">

<title>{% block title %}{{ page.title|safe }} / {{ site.name }}{% endblock %}</title>
<title>{% block title %}{% block extra_title %}{% endblock %}{{ page.title|safe }} / {{ site.name }}{% endblock %}</title>

{% block feeds %}
<link href="{{ site.url }}/blog/atom.xml"
Expand Down Expand Up @@ -43,8 +43,9 @@
<div id="main-wrap">
<div id="header">
<h1>
<a href="/">steve losh</a> <span class="page-title">/ {{ page.title|safe|typogrify }}</span>
<a href="/">steve losh</a> <span class="page-title">/ {{ page.title|safe|typogrify }}{% block extra_header %}{% endblock %}</span>
</h1>
{% block after_header %}{% endblock %}
</div>

<div id="nav">
Expand Down
22 changes: 22 additions & 0 deletions layout/skeleton/_categorylisting.html
@@ -0,0 +1,22 @@
{% extends "skeleton/_base.html"%}

{% block extra_title %}{{ page.category|capfirst }} / {% endblock %}
{% block extra_header %} / {{ page.category }}{% endblock %}

{% block content %}
<div id="section-listing">
<ol>
{% with page.node.ancestors|last as cat_root_node %}
{% for cat_name, cat in cat_root_node.categories.items %}
{% ifequal cat_name page.category %}
{% for list_page in cat.posts|dictsortreversed:"created" %}
{% if not list_page.exclude %}
{% include "skeleton/_listingitem.html" %}
{% endif %}
{% endfor %}
{% endifequal %}
{% endfor %}
{% endwith %}
</ol>
</div>
{% endblock %}
9 changes: 1 addition & 8 deletions layout/skeleton/_innerlisting.html
Expand Up @@ -6,14 +6,7 @@
{% for list_page in node.pages %}
{% ifnotequal list_page node.listing_page %}
{% if not list_page.exclude %}
<li>
<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|safe|typogrify }}
{%endwith%}
</a>
<span class="snip">{{ list_page.snip|safe|typogrify }}</span>
</li>
{% include "skeleton/_listingitem.html" %}
{%endif%}
{% endifnotequal %}
{% endfor %}
Expand Down
19 changes: 19 additions & 0 deletions layout/skeleton/_listing.html
@@ -1,5 +1,24 @@
{% extends "skeleton/_base.html"%}

{% block extra_header %}{% if page.node.categories %} / {% endif %}{% endblock %}

{% block after_header %}
{% if page.node.categories %}
<ul id="section-tags">
<span class="section-tags-col">
{% for category in page.node.categories.keys %}
<li><a href="{{ page.url }}{{ category }}">{{ category }}</a></li>
{% if forloop.counter|divisibleby:2 %}
{% if not forloop.last %}
</span><span class="section-tags-col">
{% endif %}
{% endif %}
{% endfor %}
</span>
</ul>
{% endif %}
{% endblock %}

{% block content %}
<div id="section-listing">
<ol>
Expand Down
8 changes: 8 additions & 0 deletions layout/skeleton/_listingitem.html
@@ -0,0 +1,8 @@
<li>
<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|safe|typogrify }}
{%endwith%}
</a>
<span class="snip">{{ list_page.snip|safe|typogrify }}</span>
</li>

0 comments on commit 4dfb4e8

Please sign in to comment.