rudimentary error / information / warning messages
git-svn-id: http://yolanda.mister-muffin.de/svn@379 7eef14d0-6ed0-489d-bf55-20463b2d70db
This commit is contained in:
parent
e3c4f65849
commit
bd4eb10579
5 changed files with 63 additions and 3 deletions
|
@ -15,11 +15,15 @@ class AccountController(BaseController):
|
|||
self.consumer = Consumer(self.openid_session, None)
|
||||
openid = request.params.get('username', None)
|
||||
if openid is None:
|
||||
return "invalid openid"
|
||||
# invalid openid
|
||||
c.error = "invalid openid"
|
||||
return render('/xhtml/index.mako')
|
||||
try:
|
||||
authrequest = self.consumer.begin(openid)
|
||||
except DiscoveryFailure, e:
|
||||
return "invalid openid"
|
||||
# invalid openid
|
||||
c.error = "invalid openid"
|
||||
return render('/xhtml/index.mako')
|
||||
|
||||
redirecturl = authrequest.redirectURL(
|
||||
h.url_for('',qualified=True),
|
||||
|
|
|
@ -194,9 +194,34 @@ ul#queries
|
|||
|
||||
ul#queries li a
|
||||
{
|
||||
color: #FFD95A;
|
||||
color: #FFD95A;
|
||||
}
|
||||
|
||||
/* classes */
|
||||
|
||||
.messagebox
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
.messagebox.error
|
||||
{
|
||||
/* "Scarlet Red 1" + 30 luminosity */
|
||||
background-color: #f46060;
|
||||
}
|
||||
|
||||
.messagebox.information
|
||||
{
|
||||
/* "Chameleon 1" + 30 luminosity */
|
||||
background-color: #a9ec68;
|
||||
}
|
||||
|
||||
.messagebox.warning
|
||||
{
|
||||
/* "Orange 1" */
|
||||
background-color: #fcaf3e;
|
||||
}
|
||||
|
||||
/* ids */
|
||||
|
||||
#copyright
|
||||
|
|
|
@ -122,6 +122,11 @@ ul
|
|||
|
||||
/* classes */
|
||||
|
||||
.messagebox
|
||||
{
|
||||
margin-right: 28em;
|
||||
}
|
||||
|
||||
/* ids */
|
||||
|
||||
/* sidebar stuff */
|
||||
|
|
|
@ -52,6 +52,29 @@
|
|||
</div>
|
||||
</%def>
|
||||
|
||||
<%def name="messagebox()">
|
||||
|
||||
%if c.error:
|
||||
<div class="messagebox error">
|
||||
${c.error}
|
||||
</div>
|
||||
%endif
|
||||
|
||||
%if c.information:
|
||||
<div class="messagebox information">
|
||||
${c.information}
|
||||
</div>
|
||||
%endif
|
||||
|
||||
%if c.warning:
|
||||
<div class="messagebox warning">
|
||||
${c.warning}
|
||||
</div>
|
||||
%endif
|
||||
|
||||
</%def>
|
||||
|
||||
|
||||
<%def name="tagcloud()">
|
||||
<div id="tagcloud">
|
||||
|
||||
|
@ -122,6 +145,8 @@
|
|||
|
||||
${self.tagcloud()}
|
||||
|
||||
${self.messagebox()}
|
||||
|
||||
${self.body()}
|
||||
|
||||
<div id="copyright">
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
<%def name="heading()">
|
||||
Welcome to Yolanda, a place for people who hate Adobe Flash.
|
||||
${request.headers.get('REFERER')}
|
||||
</%def>
|
||||
|
||||
<h1>An introduction to Yolanda</h1>
|
||||
|
|
Loading…
Reference in a new issue