Skip to content
Browse files

added views, switched to jinja/webapp added static folder 'media'

  • Loading branch information...
1 parent b9f4d8a commit 9ef47e17795eeb2186d723361519e03b9eed2494 dacresni committed May 8, 2012
Showing with 94 additions and 26 deletions.
  1. +10 −0 appengine/Views.py
  2. +5 −2 appengine/app.yaml
  3. +1 −24 appengine/main.py
  4. +55 −0 appengine/media/base.css
  5. +23 −0 appengine/media/index.html
View
10 appengine/Views.py
@@ -0,0 +1,10 @@
+import jinja2, os, webapp2
+
+jinja_environment = jinja2.Environment(
+ loader = jinja2.FileSystemLoader(os.path.dirname(__file__)))
+
+
+class MainPage(webapp2.RequestHandler):
+ def get(self):
+ template = jinja_environment.get_template()
+ self.response.out.write(template.render(template_values))
View
7 appengine/app.yaml
@@ -2,7 +2,7 @@ application: dacresni
version: 1
runtime: python27
api_version: 1
-threadsafe: false
+threadsafe: true
handlers:
@@ -12,6 +12,9 @@ handlers:
- url: /mantext
static_dir: mantext
+- url: /static
+ static_dir: media
+
libraries:
-- name: django
+- name: jinja2
version: "1.2"
View
25 appengine/main.py
@@ -1,28 +1,5 @@
-#!/usr/bin/env python
-#
-# Copyright 2007 Google Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-from google.appengine.ext import webapp
-#from google.appengine.ext.webapp import util
import webapp2
-
-
-class MainPage(webapp2.RequestHandler):
- def get(self):
- self.response.headers['Content-Type'] = 'text/plain'
- self.response.out.write('Hello, WebApp World!')
+import os
def main():
application = webapp2.WSGIApplication([('/', MainPage)],
View
55 appengine/media/base.css
@@ -0,0 +1,55 @@
+@import url(http://fonts.googleapis.com/css?family=Nova+Flat|Nova+Square);
+
+html {
+ background-color:black;
+}
+body {
+ color:#FFFFFF;
+ background-color:#000000;
+ padding-top: 20px;
+
+}
+nav {
+
+}
+p {
+ font-family:'Nova Flat', cursive;
+}
+
+@font-face {
+ font-family: pso;
+ src: url('pso_font.TTF');
+}
+
+@font-face {
+ font-family: HuRaMar;
+ src: url('psoHRmar.TTF');
+}
+
+
+h1 {
+ color:#00F94B;
+ font-family: 'Nova Square', cursive;
+}
+h2 {
+ color:#00F94B;
+ font-family:HuRaMar;
+}
+
+a {
+ color:cyan;
+}
+
+a:hover {
+ color:white;
+}
+
+
+footer {
+ list-style-type:none;
+}
+
+footer ul li {
+ display:inline;
+}
+
View
23 appengine/media/index.html
@@ -0,0 +1,23 @@
+<!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" xml:lang="en" lang="en" ><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" href="http://twitter.github.com/bootstrap/1.3.0/bootstrap.min.css" />
+<link href="http://fonts.googleapis.com/css?family=Nova+Square" rel="stylesheet" type="text/css" />
+
+ <link rel="stylesheet" href="./css/base.css" />
+ <title>a man page database</title>
+</head>
+<body >
+ <h1>A man page database </h1>
+ <h2>A database of unix manual metadata </h2>
+ <form>
+ <input name="title" placeholder="Function Title" required />
+ <input name="meta" type="radio"
+ <form>
+<footer>
+
+
+</footer>
+
+
+</body></html>

0 comments on commit 9ef47e1

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