moar prettiness
This commit is contained in:
parent
c92b5cdb68
commit
8b50c49a57
2 changed files with 17 additions and 7 deletions
19
mysecrets.py
19
mysecrets.py
|
@ -7,7 +7,7 @@ from web import form
|
||||||
from urllib import urlopen
|
from urllib import urlopen
|
||||||
from urlparse import urlparse
|
from urlparse import urlparse
|
||||||
from contextlib import closing
|
from contextlib import closing
|
||||||
|
import time
|
||||||
|
|
||||||
db = web.database(dbn='mysql', user='mysecrets', pw='horsebatteries',
|
db = web.database(dbn='mysql', user='mysecrets', pw='horsebatteries',
|
||||||
db='mysecrets')
|
db='mysecrets')
|
||||||
|
@ -107,6 +107,8 @@ class index:
|
||||||
|
|
||||||
if method == 'new':
|
if method == 'new':
|
||||||
|
|
||||||
|
start = time.time()
|
||||||
|
|
||||||
i = web.input()
|
i = web.input()
|
||||||
|
|
||||||
f = create()
|
f = create()
|
||||||
|
@ -140,9 +142,12 @@ class index:
|
||||||
body.append('<tr><td><label for="password">Password</label></td>')
|
body.append('<tr><td><label for="password">Password</label></td>')
|
||||||
body.append('<td><input id="password" type="text" name="password" \
|
body.append('<td><input id="password" type="text" name="password" \
|
||||||
value="'+generated+'"/></td></tr>')
|
value="'+generated+'"/></td></tr>')
|
||||||
body.append('<tr><td><input type="submit" name="submit" id="submit" /></td></tr>')
|
body.append('<tr><td style="text-align:center;"><input type="submit" \
|
||||||
|
name="submit" id="submit" value="Store Secret" /></td></tr>')
|
||||||
body.append('</table></form>')
|
body.append('</table></form>')
|
||||||
|
|
||||||
|
body.append('<p>Rendered in '+str(round(time.time()-start,3))+' seconds</p>')
|
||||||
|
|
||||||
return render.page(domain,'\n'.join(body))
|
return render.page(domain,'\n'.join(body))
|
||||||
|
|
||||||
|
|
||||||
|
@ -177,16 +182,20 @@ class index:
|
||||||
s.innerHTML='\
|
s.innerHTML='\
|
||||||
.myS{\
|
.myS{\
|
||||||
font-family:Georgia;\
|
font-family:Georgia;\
|
||||||
color:#000;\
|
color:#3C3C3C;\
|
||||||
text-align:center;\
|
text-align:center;\
|
||||||
text-size:14px;\
|
text-size:14px;\
|
||||||
}\
|
}\
|
||||||
|
.myS iframe {\
|
||||||
|
border: none;\
|
||||||
|
}\
|
||||||
.myS p {\
|
.myS p {\
|
||||||
|
color:#3C3C3C;\
|
||||||
padding:10px;\
|
padding:10px;\
|
||||||
}\
|
}\
|
||||||
.myS a {\
|
.myS a {\
|
||||||
text-decoration:none;\
|
text-decoration:none;\
|
||||||
color:#00F;\
|
color:#3C3C3C;\
|
||||||
}\
|
}\
|
||||||
.myS a:hover{\
|
.myS a:hover{\
|
||||||
text-decoration:underline;\
|
text-decoration:underline;\
|
||||||
|
@ -229,7 +238,7 @@ class index:
|
||||||
e=document.createElement('p');
|
e=document.createElement('p');
|
||||||
e.className+='myS';
|
e.className+='myS';
|
||||||
e.onclick=function(){cleanHouse();};
|
e.onclick=function(){cleanHouse();};
|
||||||
e.innerHTML='<a class="close">Close</a>';
|
e.innerHTML='<a class="myS close">Close</a>';
|
||||||
i.appendChild(e);
|
i.appendChild(e);
|
||||||
|
|
||||||
})();'''
|
})();'''
|
||||||
|
|
|
@ -60,6 +60,7 @@ $def with (title, body)
|
||||||
font-family: Georgia;
|
font-family: Georgia;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
color: #3C3C3C;
|
||||||
}
|
}
|
||||||
h1 {
|
h1 {
|
||||||
font-size: 1.3em;
|
font-size: 1.3em;
|
||||||
|
|
Reference in a new issue