Skip to content
Browse files

Add widget mode

  • Loading branch information...
1 parent b879063 commit d63161ade2ec93dff5ff3909683c44ea37dbb787 Brian Klug committed Jun 8, 2010
Showing with 23 additions and 1 deletion.
  1. +3 −0 main.py
  2. +1 −1 templates/approved.html
  3. +19 −0 templates/mini.html
View
3 main.py
@@ -94,6 +94,9 @@ def get(self):
today = local_today()
events = Event.get_approved_list()
tomorrow = today + timedelta(days=1)
+ whichbase = 'base.html'
+ if self.request.get('base'):
+ whichbase = self.request.get('base') + ".html"
self.response.out.write(template.render('templates/approved.html', locals()))
class MyEventsHandler(webapp.RequestHandler):
View
2 templates/approved.html
@@ -1,4 +1,4 @@
-{% extends 'base.html' %}
+{% extends whichbase %}
{% block content %}
<div id="menu" style="float: right; margin: 10px; font-size: smaller;">
Approved | <a href="/pending">Pending</a> | <a href="/new" style="font-weight: bold;">New Event</a>
View
19 templates/mini.html
@@ -0,0 +1,19 @@
+<html>
+ <head>
+ <title>Hacker Dojo Events</title>
+ <link href="/static/style.css" type="text/css" rel="stylesheet" />
+ <link type="text/css" href="/static/css/blitzer/jquery-ui-1.8.1.custom.css" rel="stylesheet" />
+ <style>#menu {display:none;}
+ #primary, #wrapper, #menu, #content, body {margin:0; width:100%; overflow:hidden;}
+ #content {padding:0; border-top:none;}
+ #primary {padding:0 margin:1em;}
+ </style>
+ </head>
+ <body>
+ <div id="wrapper">
+ <div id="content">
+ {% block content %}{% endblock %}
+ </div>
+ </div>
+ </body>
+</html>

0 comments on commit d63161a

Please sign in to comment.
Something went wrong with that request. Please try again.