diff --git a/brain.py b/brain.py index 2926693..1dc2213 100644 --- a/brain.py +++ b/brain.py @@ -91,7 +91,7 @@ def render_file(name,public=False): content += '
Back to '+os.path.dirname(name)+'
' - return template('templates/yield', content = content, \ + return template('templates/repo', content = content, \ title=filename) else: @@ -172,7 +172,7 @@ def public(name=''): tree.append('New File ') tree.append('New Dir') - return template('templates/yield', content="\n".join(tree), title="Files in "+sanitize_path(name)) + return template('templates/repo', content="\n".join(tree), title="Files in "+sanitize_path(name)) else: return render_file(name) @@ -227,7 +227,7 @@ def upload(path=''): body.append('') - return template('templates/yield', content='\n'.join(body), \ + return template('templates/repo', content='\n'.join(body), \ title='Add') @@ -279,7 +279,7 @@ def do_upload(): content.append('') - return template('templates/yield', content='\n'.join(content), title='"'+filename+'" uploaded.') + return template('templates/repo', content='\n'.join(content), title='"'+filename+'" uploaded.') @@ -314,7 +314,7 @@ def delete(path = ''): body.append('') body.append('') - return template('templates/yield', content='\n'.join(body), title='Delete') + return template('templates/repo', content='\n'.join(body), title='Delete') @route('/delete', method='POST') @@ -347,7 +347,7 @@ def delete(): body.append(''+path+' does not exist.
') - return template('templates/yield', content='\n'.join(body), title=path+' deleted.') + return template('templates/repo', content='\n'.join(body), title=path+' deleted.') @@ -401,7 +401,7 @@ def edit(path=''): body.append('') body.append('') - return template('templates/yield', content='\n'.join(body), \ + return template('templates/repo', content='\n'.join(body), \ title='New') @@ -435,7 +435,7 @@ def edit(): else: body.append('' + path + ' not changed.
') - return template('templates/yield', content='\n'.join(body),\ + return template('templates/repo', content='\n'.join(body),\ title=path+' edited.') @@ -475,7 +475,7 @@ def new(path = ''): body.append('') - return template('templates/yield', content='\n'.join(body), \ + return template('templates/repo', content='\n'.join(body), \ title='New') @route('/new', method="POST") @@ -512,7 +512,7 @@ def new(): if commit: body.append('Git: '+commit+'
') - return template('templates/yield', content='\n'.join(body), \ + return template('templates/repo', content='\n'.join(body), \ title=filename + ' created') @@ -549,7 +549,7 @@ def rename(path = ''): body.append('') - return template('templates/yield', content='\n'.join(body),\ + return template('templates/repo', content='\n'.join(body),\ title='move') @route('/move', method="POST") @@ -584,7 +584,7 @@ def rename(): else: body.append('Must have both a current and new name.
') - return template('templates/yield', content='\n'.join(body),\ + return template('templates/repo', content='\n'.join(body),\ title=request.forms.current+' moved to '+request.forms.destination) @@ -617,7 +617,7 @@ def mkdir(path=''): body.append('') - return template('templates/yield', content='\n'.join(body),\ + return template('templates/repo', content='\n'.join(body),\ title='Create Directory') @route('/mkdir', method="POST") @@ -637,7 +637,7 @@ def mkdir(): body.append('Path exists.
') - return template('templates/yield', content='\n'.join(body),\ + return template('templates/repo', content='\n'.join(body),\ title='Create Directory') @@ -672,6 +672,39 @@ def short(short = ''): +# Let's make a place to store my secrets +@route('/secrets/Back to Repo
+ +%rebase templates/layout title=title