Skip to content

Commit

Permalink
Fix CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
terrazoon committed May 11, 2017
1 parent f89de15 commit 189b425
Show file tree
Hide file tree
Showing 6 changed files with 95 additions and 3 deletions.
5 changes: 5 additions & 0 deletions app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ handlers:
static_files: favicon.ico
upload: favicon\.ico


- url: /static
static_dir: static

- url: .*
script: main.app

Expand All @@ -15,4 +19,5 @@ libraries:
version: "2.5.2"
- name: jinja2
version: latest


5 changes: 3 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,9 @@ def post(self):
newpost = BlogPost(author=username, subject=subject, content=content)
newpost.put()

p = db.GqlQuery('SELECT * from BlogPost ORDER BY created DESC LIMIT 1')
self.redirect('/blog/%s' % str(p.get().key().id()))
#p = db.GqlQuery('SELECT * from BlogPost ORDER BY created DESC LIMIT 1')
#self.redirect('/blog/%s' % str(p.get().key().id()))
self.redirect('/blog/%s' % str(newpost.key().id()))
else:
self.redirect('/blog/newpost')

Expand Down
Binary file modified main.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion templates/base.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="static/style.css">
<link rel="stylesheet" href="/static/style.css">

<title>Terrazoon's Multi User Blog</title>
</head>
Expand Down
3 changes: 3 additions & 0 deletions templates/post.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<div class="post">
<div class="post-heading">
<div class="post-author">
{{p.author}}
</div>
<div class="post-title">
{{p.subject}}
</div>
Expand Down
83 changes: 83 additions & 0 deletions templates/static/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
body {
font-family: Helvetica, Arial, sans-serif;
font-size: 14px;

width: 800px;
margin: 0 auto;
padding: 10px;
color: #333;
}

h2 {
font-size: 24px;
font-weight: bold;
margin-bottom: 20px;
}

.error {
color: red;
}

label {
display: block;
font-size: 20px;
}

label + label {
margin-top: 20px;
}

input[type=text] {
width: 500px;
font-size: 20px;
padding: 2px;
font-family: monospace;
}

textarea {
width: 500px;
height: 400px;
font-size: 17px;
font-family: monospace;
}

input[type=submit] {
font-size: 24px;
}

.main-title {
display: block;
color: #222;
font-size: 40px;
font-weight: bold;
text-align: center;
margin-bottom: 30px;
text-decoration: none;
}

.post + .post {
margin-top: 15px;
}

.post-heading {
position: relative;
border-bottom: 3px solid #666;
}

.post-title {
font-size: 24px;
font-weight: bold;
}

.post-date {
position: absolute;
right: 0px;
bottom: 0px;
color: #999;

}

.post-content {
margin-top: 5px;
}

0 comments on commit 189b425

Please sign in to comment.