Skip to content
This repository has been archived by the owner on Jun 17, 2018. It is now read-only.

Commit

Permalink
change url, improve css
Browse files Browse the repository at this point in the history
  • Loading branch information
Dongsheng Cai committed Apr 17, 2011
1 parent 8f90b25 commit d4bf051
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 17 deletions.
6 changes: 3 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def post(self):
code.content = self.request.get('content')
code.code = self.request.get('code')
code.put()
self.redirect('/n-'+str(code.key().id()))
self.redirect('/'+str(code.key().id()))
else:
logging.error('Spamer attacked')
self.redirect('/')
Expand Down Expand Up @@ -182,8 +182,8 @@ def post(self, ID, action):
('/', MainPage),
('/latest/', ListSnippet),
('/latest/(\d+)', ListSnippet),
('/n-(\d+)/(.+)', HandleSnippet),
('/n-(\d+)', ViewSnippet),
('/(\d+)/(.+)', HandleSnippet),
('/(\d+)', ViewSnippet),
], debug=True)

def main():
Expand Down
2 changes: 1 addition & 1 deletion scripts/get.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
str="curl"
str=$str" http://foleo.appspot.com/n-$@/raw"
str=$str" http://foleo.appspot.com/$@/raw"
eval $str
2 changes: 1 addition & 1 deletion scripts/post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ if [ $id == 0 ]; then
echo "Error: Code ID must be specified!"
exit
fi
str=$str" http://localhost:8080/n-$id/update"
str=$str" http://localhost:8080/$id/update"
eval $str
2 changes: 1 addition & 1 deletion static/code.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ blockquote p{margin-top: 1.5em;}
.bracket{color:#DEE7EC}
#opt{text-align:right;background:#E5ECF9;border-top:1px solid #3366CC;padding: 0.5em}
#title span{font-size: 14px;color: blue}
#footer{text-align:center;background:#E5ECF9;}
#footer{text-align:center;background:#E5ECF9;color: #CCC; font-size:11px;padding: 2px}
#speakform td.l{text-align:right}
.btn{padding:.5em 0;font-size:18px}
.c-0{padding-left:6px;border-left: 18px solid #0AA7D6}
Expand Down
5 changes: 2 additions & 3 deletions views/code.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<!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" dir="ltr">
<!DOCTYPE html>
<html xml:lang="en" lang="en">
<head>
<title>Code #{{ ID }} {{ title }}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="KEYWORDS" content="" />
<meta name="robots" content="index,follow" />
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="stylesheet" href="/static/code.css" type="text/css" />
Expand Down
2 changes: 1 addition & 1 deletion views/footer.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div id="footer">
&copy;2008 Dongsheng Cai
&copy;2011 Dongsheng Cai
</div>
<div id='link'><a href="/">New</a> | <a href="/latest/">Latest</a> | <a href="http://github.com/dongsheng/pastebin/tree/master">Source</a> | <a href="http://dongsheng.org/">About</a></div>
</body>
Expand Down
5 changes: 2 additions & 3 deletions views/home.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<!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" dir="ltr">
<!DOCTYPE html>
<html xml:lang="en" lang="en">
<head>
<title>Code #0</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="KEYWORDS" content="" />
<meta name="robots" content="index,follow" />
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="stylesheet" href="/static/code.css" type="text/css" />
Expand Down
7 changes: 3 additions & 4 deletions views/list.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<!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" dir="ltr">
<!DOCTYPE html>
<html xml:lang="en" lang="en">
<head>
<title>Code //</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="KEYWORDS" content="" />
<meta name="robots" content="index,follow" />
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="stylesheet" href="/static/code.css" type="text/css" />
Expand All @@ -27,7 +26,7 @@ <h1 id='brand'>CodeLab</h1>
{% endif %}
<h4>
<span>{{ i.ID }}</span>
<a href="/n-{{ i.ID }}"> {% if not i.title %} No title {% else %} {{ i.title }} {% endif %} </a>
<a href="/{{ i.ID }}"> {% if not i.title %} No title {% else %} {{ i.title }} {% endif %} </a>
</h4>
<blockquote>
{% if not i.content %}
Expand Down

0 comments on commit d4bf051

Please sign in to comment.