Created
December 4, 2010 18:36
-
-
Save amcgregor/728379 to your computer and use it in GitHub Desktop.
Master / theme template, included by inner page templates.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
from __future__ import unicode_literals | |
from alacarte.template.simplithe.html5 import * | |
__all__ = ['theme'] | |
theme = [ | |
match ( "title" ) [ | |
title [ matched, " — Craphound.ca" ] | |
], | |
match ( "header" ) [ | |
header [ | |
link ( rel = "stylesheet", src = "/theme/css/styles.css" ), | |
matched | |
], | |
flush | |
] | |
match ( "body" ) [ | |
body [ | |
header [ | |
h1 [ "My Awesome Site" ], | |
aside [ | |
form ( action = "/search" ) [ | |
input ( type = "search", name = "q", placeholder = "Site-wide search" ) | |
] | |
] | |
], | |
matched, | |
footer [ | |
p ( class_ = "copyright" ) [ "Copyright © 2010 Alice Bevan-McGregor" ] | |
] | |
] | |
] | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
from __future__ import unicode_literals | |
from alacarte.template.simplithe.html5 import * | |
from master import theme | |
__all__ = ['welcome'] | |
welcome = html [ | |
theme, | |
head [ | |
title [ "Welcome" ] | |
], | |
body [ | |
article [ | |
h1 [ "Latest News" ], | |
dl [[[ | |
dt [ a ( href = "" ) [ article.title ] ], | |
dd [ article.description ] | |
] for article in news.objects()[:10] ] ] | |
] | |
] | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment