From 3fe979bd983f8d971834e32f31acca94a71bfe2f Mon Sep 17 00:00:00 2001 From: erlehmann Date: Fri, 26 Sep 2008 03:35:43 +0000 Subject: [PATCH] CSS hackery git-svn-id: http://yolanda.mister-muffin.de/svn@380 7eef14d0-6ed0-489d-bf55-20463b2d70db --- trunk/yolanda/controllers/account.py | 13 +- trunk/yolanda/public/css/colors/tango.css | 136 +++---------------- trunk/yolanda/public/css/default.css | 1 + trunk/yolanda/public/css/fonts/hurrdurr.css | 132 ++++++++++++++++++ trunk/yolanda/public/css/structure/fake6.css | 9 +- trunk/yolanda/templates/xhtml/base.mako | 30 ++-- trunk/yolanda/templates/xhtml/index.mako | 3 +- 7 files changed, 175 insertions(+), 149 deletions(-) create mode 100644 trunk/yolanda/public/css/fonts/hurrdurr.css diff --git a/trunk/yolanda/controllers/account.py b/trunk/yolanda/controllers/account.py index 94d1d60..674dc44 100644 --- a/trunk/yolanda/controllers/account.py +++ b/trunk/yolanda/controllers/account.py @@ -7,24 +7,23 @@ log = logging.getLogger(__name__) class AccountController(BaseController): def __before__(self): self.openid_session = session.get("openid_session", {}) - + # @validate(schema=something, form='login') def login(self): #FIXME: do not operate in stateless mode - replace store with local # openid store (app global) to make login faster with less overhead self.consumer = Consumer(self.openid_session, None) openid = request.params.get('username', None) - if openid is None: - # invalid openid - c.error = "invalid openid" - return render('/xhtml/index.mako') try: authrequest = self.consumer.begin(openid) except DiscoveryFailure, e: # invalid openid - c.error = "invalid openid" + c.message = { + 'type': 'error', + 'text': 'You were not logged on due to entering an invalid OpenID.' + } return render('/xhtml/index.mako') - + redirecturl = authrequest.redirectURL( h.url_for('',qualified=True), return_to=h.url_for('/account/verified',qualified=True), diff --git a/trunk/yolanda/public/css/colors/tango.css b/trunk/yolanda/public/css/colors/tango.css index 19e2c28..253cd36 100644 --- a/trunk/yolanda/public/css/colors/tango.css +++ b/trunk/yolanda/public/css/colors/tango.css @@ -9,104 +9,17 @@ Purpose of this file is to provide decoration, such as: - colors - images (background, list bullets etc.) - generated content - - text attributes */ a { color: #88D9F3; - text-decoration: none; } -a:hover -{ - text-decoration: underline; -} - - a.tag1 - { - font-size: 1.5em; - line-height: 1.25em; - } - - a.tag2 - { - font-size: 1.4em; - line-height: 1.2em; - } - - a.tag3 - { - font-size: 1.3em; - line-height: 1.15em; - } - - a.tag4 - { - font-size: 1.2em; - line-height: 1.25em; - } - - a.tag5 - { - font-size: 1.1em; - line-height: 1.05em; - } - - a.tag6 - { - font-size: 1em; - line-height: 1em; - } - body { background-color: #000000; color: #E5E5E5; - font-size: 12px; - font-family: sans-serif; -} - -blockquote:before -{ - content: open-quote; - font-size: 2em; - margin-left: 7.5em; -} - -blockquote:after -{ - content: close-quote; - font-size: 2em; - margin-right: 7.5em; -} - -code -{ - font-family: monospace; -} - -em -{ - font-style: italic; -} - -h1 -{ - font-size: 1.5em; - line-height: 1.25em; -} - -h2 -{ - font-size: 1.4em; - line-height: 1.2em; -} - -h3 -{ - font-size: 1.3em; - line-height: 1.15em; } input @@ -150,33 +63,11 @@ ol#results font-weight: bold; } -p -{ - line-height: 1.4em; -} - -q:before -{ - content: open-quote; -} - -q:after -{ - content: close-quote; -} - ul#queries { list-style-position: inside; } - ul#queries li - { - font-size: 1.5em; - line-height: 1.25em; - text-transform: uppercase; - } - ul#queries li#important { list-style-image: url(/images/tango/16x16/emblems/emblem-important.png) @@ -199,27 +90,36 @@ ul#queries /* classes */ -.messagebox +#messagebox { - + border-color: #363636; + border-style: solid; } - .messagebox.error + #messagebox.error { - /* "Scarlet Red 1" + 30 luminosity */ - background-color: #f46060; + /* "Scarlet Red 1" */ + background-color: #ef2929; + color: #ffffff; } - .messagebox.information + #messagebox.information { - /* "Chameleon 1" + 30 luminosity */ - background-color: #a9ec68; + /* "Chameleon 1" */ + background-color: #8ae234; + color: #131313; } - .messagebox.warning + #messagebox.warning { /* "Orange 1" */ background-color: #fcaf3e; + color: #131313; + } + + #messagebox #message + { + font-size: 1.4em; } /* ids */ diff --git a/trunk/yolanda/public/css/default.css b/trunk/yolanda/public/css/default.css index f88b71a..d344ccb 100644 --- a/trunk/yolanda/public/css/default.css +++ b/trunk/yolanda/public/css/default.css @@ -9,4 +9,5 @@ Purpose of this file is to import reset, decoration and structure stylesheets. @import "reset.css"; @import "colors/tango.css"; +@import "fonts/hurrdurr.css"; @import "structure/fake6.css"; diff --git a/trunk/yolanda/public/css/fonts/hurrdurr.css b/trunk/yolanda/public/css/fonts/hurrdurr.css new file mode 100644 index 0000000..bfb3362 --- /dev/null +++ b/trunk/yolanda/public/css/fonts/hurrdurr.css @@ -0,0 +1,132 @@ +/* +Yolanda HURR DURR font / text decoration stylesheet +(c) 2007-2008 Nils Dagsson Moskopp + +This file is licensed under the WTF Public License. + +Purpose of this file is to provide font / text decoration. +*/ + +a +{ + text-decoration: none; +} + +a:hover +{ + text-decoration: underline; +} + + a.tag1 + { + font-size: 1.5em; + line-height: 1.25em; + } + + a.tag2 + { + font-size: 1.4em; + line-height: 1.2em; + } + + a.tag3 + { + font-size: 1.3em; + line-height: 1.15em; + } + + a.tag4 + { + font-size: 1.2em; + line-height: 1.25em; + } + + a.tag5 + { + font-size: 1.1em; + line-height: 1.05em; + } + + a.tag6 + { + font-size: 1em; + line-height: 1em; + } + +/* +blockquote:before +{ + content: open-quote; + font-size: 2em; +} + +blockquote:after +{ + content: close-quote; + font-size: 2em; +} +*/ + +body +{ + font-size: 12px; + font-family: sans-serif; +} + +code +{ + font-family: monospace; +} + +em +{ + font-style: italic; +} + +h1 +{ + font-size: 1.5em; + line-height: 1.25em; +} + +h2 +{ + font-size: 1.4em; + line-height: 1.2em; +} + +h3 +{ + font-size: 1.3em; + line-height: 1.15em; +} + +p +{ + line-height: 1.4em; +} + +q +{ +} + + q:before + { + content: open-quote; + } + + q:after + { + content: close-quote; + } + +ul +{ +} + + ul#queries li + { + font-size: 1.5em; + line-height: 1.25em; + text-transform: uppercase; + } diff --git a/trunk/yolanda/public/css/structure/fake6.css b/trunk/yolanda/public/css/structure/fake6.css index f1dd7f4..ac52b95 100644 --- a/trunk/yolanda/public/css/structure/fake6.css +++ b/trunk/yolanda/public/css/structure/fake6.css @@ -117,14 +117,17 @@ ul ul#queries { - padding-left: 0.5em; + padding-left: 0.5em; } /* classes */ -.messagebox +#messagebox { - margin-right: 28em; + border-width: 1px; + margin-right: 28em !important; + padding: 1em; + text-align: center; } /* ids */ diff --git a/trunk/yolanda/templates/xhtml/base.mako b/trunk/yolanda/templates/xhtml/base.mako index cadcd91..925e6bb 100644 --- a/trunk/yolanda/templates/xhtml/base.mako +++ b/trunk/yolanda/templates/xhtml/base.mako @@ -40,8 +40,6 @@ <%def name="login()">
-

To upload videos, login.

- ${h.form(h.url_for('account/login'), method='post')} ${h.text_field('username')} @@ -54,21 +52,11 @@ <%def name="messagebox()"> -%if c.error: -
- ${c.error} -
-%endif - -%if c.information: -
- ${c.information} -
-%endif - -%if c.warning: -
- ${c.warning} +%if c.message: +
+ + ${c.message['text']} +
%endif @@ -133,6 +121,12 @@ + + + ${self.login()} +

${self.heading()} @@ -141,8 +135,6 @@ ${self.search()} - ${self.login()} - ${self.tagcloud()} ${self.messagebox()} diff --git a/trunk/yolanda/templates/xhtml/index.mako b/trunk/yolanda/templates/xhtml/index.mako index de8c477..9aed036 100644 --- a/trunk/yolanda/templates/xhtml/index.mako +++ b/trunk/yolanda/templates/xhtml/index.mako @@ -5,8 +5,7 @@ <%def name="heading()"> - Welcome to Yolanda, a place for people who hate Adobe Flash. - ${request.headers.get('REFERER')} + Welcome to Yolanda, a video CMS missing a proper slogan.

An introduction to Yolanda