Permalink
Browse files

Adding initial versions of CSS and Javascript.

  • Loading branch information...
1 parent f7b363e commit 6e9dea768b9b60d13fde32686bd26c17038d498e @mpdaugherty committed Mar 12, 2010
Showing with 20 additions and 1 deletion.
  1. +4 −0 js/main.js
  2. +6 −1 main.py
  3. +10 −0 stylesheets/main.css
View
@@ -0,0 +1,4 @@
+$(document).ready(function () {
+ $('h2').hide();
+ $('h2').show(500);
+});
View
@@ -20,13 +20,18 @@ class MainPage(webapp.RequestHandler):
def get(self):
self.response.out.write("<html>")
self.response.out.write("<head><title>Beijing Air Status</title>");
+ self.response.out.write('<link rel="stylesheet" href="stylesheets/main.css" type="text/css" />');
self.response.out.write("<script src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js\" type=\"text/javascript\"></script>");
+ self.response.out.write("<script src=\"js/main.js\" type=\"text/javascript\"></script>");
self.response.out.write("</head>")
+
self.response.out.write("<body>")
+ self.response.out.write('<div id="PageContainer">')
self.response.out.write("<h1>Beijing Air Status</h1>")
self.response.out.write(self.getCurrentPollutantHTML("PM2.5"))
self.response.out.write(self.getCurrentPollutantHTML("Ozone"))
- self.response.out.write("</body></html>");
+ self.response.out.write('</div>')
+ self.response.out.write("</body></html>")
def getCurrentPollutantHTML(self, pollutant):
pm2Query = PollutantStatus.all()
View
@@ -0,0 +1,10 @@
+#PageContainer
+{
+ width:50%;
+ margin:auto;
+}
+
+#PageContainer>h1
+{
+ text-align:center;
+}

0 comments on commit 6e9dea7

Please sign in to comment.