-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
organize files by themes and a simple webapp to test the themes.
- Loading branch information
1 parent
8123798
commit d9f6c5d
Showing
9 changed files
with
164 additions
and
136 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
$def with (page) | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<title>$page.title - PyCon India 2010</title> | ||
<link rel="stylesheet" type="text/css" href="/themes/alankar/style.css" /> | ||
|
||
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> | ||
<script type="text/javascript" src="http://ideamonk.in/inpycon/static/jquery.countdown.min.js"></script> | ||
|
||
<script type="text/javascript"> | ||
\$(document).ready( function(){ | ||
// setup countdown | ||
var pyconDate = new Date(); | ||
pyconDate = new Date(2010, 7, 25); | ||
\$('#defaultCountdown').countdown({ | ||
until: pyconDate, | ||
format: 'DHMS', | ||
layout: '<div id="t7_timer">'+ | ||
'<div id="t7_vals">'+ | ||
'<div id="t7_d" class="t7_numbs">{dnn}</div>'+ | ||
'<div id="t7_h" class="t7_numbs">{hnn}</div>'+ | ||
'<div id="t7_m" class="t7_numbs">{mnn}</div>'+ | ||
'<div id="t7_s" class="t7_numbs">{snn}</div>'+ | ||
'</div>'+ | ||
'<div id="t7_labels">'+ | ||
'<div id="t7_dl" class="t7_labs">days</div>'+ | ||
'<div id="t7_hl" class="t7_labs">hours</div>'+ | ||
'<div id="t7_ml" class="t7_labs">mins</div>'+ | ||
'<div id="t7_sl" class="t7_labs">secs</div>'+ | ||
'</div>'+ | ||
'<div id="t7_timer_over"></div>'+ | ||
'</div>' | ||
}); | ||
}); | ||
</script> | ||
</head> | ||
<body> | ||
<div id="wrapper"> | ||
<div id="header"> | ||
<div id="account"> | ||
$if ctx.user: | ||
<form name='logout' action="$homepath()/account/logout" method='POST' style="display:none;"></form> | ||
Welcome <a href="$homepath()/$ctx.user">$ctx.user.displayname</a>! | ||
| <a href="#" onclick="document.forms['logout'].submit()">Log out</a> | ||
$else: | ||
<a href="$homepath()/account/login">Login</a> | ||
</div> | ||
|
||
<div id="defaultCountdown"></div> | ||
|
||
<div id="nav"> | ||
<ul> | ||
<li> | ||
<a href="$homepath()/"> | ||
Home | ||
</a> | ||
<span> </span> | ||
</li> | ||
<li> | ||
<a href="$homepath()/sponsors">Sponsors</a> | ||
<span> behind the scene </span> | ||
</li> | ||
<li> | ||
<a href="$homepath()/cfp">CFP</a> | ||
<span> participate! </span> | ||
</li> | ||
<li> | ||
<a href="$homepath()/program">Schedule</a> | ||
<span> talks, speakers </span> | ||
</li> | ||
<li> | ||
<a href="$homepath()/faq">FAQ</a> | ||
<span> more details </span> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
<!-- end of header --> | ||
|
||
<div id="content"> | ||
<div id="sidebar"> | ||
<h3>Platinum Sponspors</h3> | ||
<p> | ||
<img src="http://placehold.it/120x80&text=Sponsor" alt="" title=""/> | ||
</p> | ||
|
||
<h3>Gold Sponspors</h3> | ||
<p> | ||
<img src="http://placehold.it/120x80&text=Sponsor" alt="" title=""/> | ||
</p> | ||
<p> | ||
<img src="http://placehold.it/120x80&text=Sponsor" alt="" title=""/> | ||
</p> | ||
|
||
<h3>Silver Sponspors</h3> | ||
<p> | ||
<img src="http://placehold.it/120x80&text=Sponsor" alt="" title=""/> | ||
</p> | ||
<p> | ||
<img src="http://placehold.it/120x80&text=Sponsor" alt="" title=""/> | ||
</p> | ||
<p> | ||
<img src="http://placehold.it/120x80&text=Sponsor" alt="" title=""/> | ||
</p> | ||
</div> | ||
<!-- end of sidebar --> | ||
|
||
<div id="contents"> | ||
<!-- | ||
<h2>PyCon India 2010</h2> | ||
<p> | ||
Pycon India 2010 is the second Python conference in India. A purely volunteer effort, it is being hosted for the second time in India, and will attract some of the best Python developers in India and abroad. | ||
</p> | ||
--> | ||
|
||
$if page.title != "Home": | ||
<h2>$page.title</h2> | ||
$:page | ||
|
||
</div> | ||
<!-- end of normal content --> | ||
|
||
</div> | ||
<!-- end of content --> | ||
|
||
<div id="footer"> | ||
<a href="#">Contact Us</a> | ||
<span style="float: right">Powered by <a href="http://infogami.org/">Infogami</a></span> | ||
</div> | ||
<!-- end of content --> | ||
|
||
</div> | ||
</body> | ||
</html> |
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import web | ||
|
||
urls = ( | ||
"/(themes/.*)", "media", | ||
"/(.*)", "page" | ||
) | ||
app = web.application(urls, globals()) | ||
|
||
tglobals = dict( | ||
ctx=web.storage(user=None, flash_messages=[]), | ||
homepath=lambda: "", | ||
) | ||
|
||
def render_page(name): | ||
return web.template.TemplateResult(title=name, __body__="Hello, world!") | ||
|
||
class media: | ||
def GET(self, path): | ||
raise web.found("/static/" + path) | ||
|
||
class page: | ||
def GET(self, name): | ||
i = web.input(theme="alankar") | ||
t = web.template.frender("static/themes/" + i.theme + "/site.html", globals=tglobals) | ||
return t(render_page(name)) | ||
|
||
if __name__ == "__main__": | ||
app.run() |