# HG changeset patch # User Brian Neal # Date 1319854818 18000 # Node ID 2698ff124e873507c5d65dfc8ed88b06cd3129ed # Parent 71f2941161e9ec560ffd1bd0423385c7abc00e33 Created a template tag for displaying a Bootstrap CSS toolbar. diff -r 71f2941161e9 -r 2698ff124e87 bns_website/core/templatetags/core_tags.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bns_website/core/templatetags/core_tags.py Fri Oct 28 21:20:18 2011 -0500 @@ -0,0 +1,13 @@ +""" +Miscellaneous template tags. + +""" +from django import template + + +register = template.Library() + + +@register.inclusion_tag('core/navbar_tag.html') +def navbar(active_tab): + return {'active_tab': active_tab} diff -r 71f2941161e9 -r 2698ff124e87 bns_website/static/css/base.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bns_website/static/css/base.css Fri Oct 28 21:20:18 2011 -0500 @@ -0,0 +1,1 @@ +body { padding-top: 40px } diff -r 71f2941161e9 -r 2698ff124e87 bns_website/templates/core/navbar_tag.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bns_website/templates/core/navbar_tag.html Fri Oct 28 21:20:18 2011 -0500 @@ -0,0 +1,16 @@ +{% load url from future %} +
+ +
diff -r 71f2941161e9 -r 2698ff124e87 bns_website/templates/home.html --- a/bns_website/templates/home.html Fri Oct 28 20:32:29 2011 -0500 +++ b/bns_website/templates/home.html Fri Oct 28 21:20:18 2011 -0500 @@ -1,5 +1,7 @@ {% extends 'base.html' %} +{% load core_tags %} {% block title %}Home{% endblock %} {% block content %} +{% navbar 'home' %}

Welcome to The Brave New Surf!

{% endblock %}