From 43fe1f377e6919b7b4379e9fe9917e10d9d425ae Mon Sep 17 00:00:00 2001 From: erlehmann Date: Sat, 11 Oct 2008 12:50:52 +0000 Subject: [PATCH] layout revision, added video page and debug stylesheet, introduction of global variables git-svn-id: http://yolanda.mister-muffin.de/svn@386 7eef14d0-6ed0-489d-bf55-20463b2d70db --- trunk/yolanda/controllers/index.py | 1 + trunk/yolanda/controllers/search.py | 22 ++++---- trunk/yolanda/controllers/video.py | 2 +- trunk/yolanda/lib/app_globals.py | 5 +- trunk/yolanda/public/css/colors/debug.css | 25 +++++++++ trunk/yolanda/public/css/colors/tango.css | 46 ++++++++--------- trunk/yolanda/public/css/default.css | 4 +- trunk/yolanda/public/css/flow/fake6.css | 16 +++--- trunk/yolanda/public/css/fonts/hurrdurr.css | 19 +++++++ trunk/yolanda/public/css/layout/fake6.css | 57 +++++++++++++-------- trunk/yolanda/templates/xhtml/base.mako | 38 ++++++++------ trunk/yolanda/templates/xhtml/index.mako | 2 +- trunk/yolanda/templates/xhtml/results.mako | 2 +- trunk/yolanda/templates/xhtml/video.mako | 30 +++++++++++ 14 files changed, 183 insertions(+), 86 deletions(-) create mode 100644 trunk/yolanda/public/css/colors/debug.css create mode 100644 trunk/yolanda/templates/xhtml/video.mako diff --git a/trunk/yolanda/controllers/index.py b/trunk/yolanda/controllers/index.py index 977b0cf..f5ef91f 100644 --- a/trunk/yolanda/controllers/index.py +++ b/trunk/yolanda/controllers/index.py @@ -8,3 +8,4 @@ class IndexController(BaseController): def index(self): return render('/xhtml/index.mako') + diff --git a/trunk/yolanda/controllers/search.py b/trunk/yolanda/controllers/search.py index 85957c5..facd4a3 100644 --- a/trunk/yolanda/controllers/search.py +++ b/trunk/yolanda/controllers/search.py @@ -13,17 +13,17 @@ class SearchController(BaseController): # c.results dummy c.results = [ - {'title': 'foobar', 'id': '23' , 'thumbnail': h.url_for('/images/404.png')}, - {'title': 'blablupp', 'id': '42', 'thumbnail': h.url_for('/images/404.png')}, - {'title': 'uiae nrdt', 'id': '555' , 'thumbnail': h.url_for('/images/404.png')}, - {'title': 'uiaenrtd uiaenrtd uiaenrdt', 'id': '666666666', 'thumbnail': h.url_for('/images/404.png')}, - {'title': 'foobar', 'id': '23' , 'thumbnail': h.url_for('/images/404.png')}, - {'title': 'blablupp', 'id': '42', 'thumbnail': h.url_for('/images/404.png')}, - {'title': 'James Bond drives a bulletproof Aston Martin !!!', 'id': '555' , 'thumbnail': h.url_for('/images/404.png')}, - {'title': 'uiaenrtd uiaenrtd uiaenrdt uiaenrtd uiaenrtd', 'id': '666666666', 'thumbnail': h.url_for('/images/404.png')}, - {'title': 'foobar', 'id': '123' , 'thumbnail': h.url_for('/images/404.png')}, - {'title': 'blablupp', 'id': '42', 'thumbnail': h.url_for('/images/404.png')}, - {'title': 'lolwtf hax !!!11', 'id': '9001', 'thumbnail': h.url_for('/images/404.png')} + {'title': 'foobar', 'id': '23' }, + {'title': 'blablupp', 'id': '42'}, + {'title': 'uiae nrdt', 'id': '555'}, + {'title': 'uiaenrtd uiaenrtd uiaenrdt', 'id': '666666666'}, + {'title': 'foobar', 'id': '23'}, + {'title': 'blablupp', 'id': '42'}, + {'title': 'James Bond drives a bulletproof Aston Martin !!!', 'id': '555'}, + {'title': 'uiaenrtd uiaenrtd uiaenrdt uiaenrtd uiaenrtd', 'id': '666666666'}, + {'title': 'foobar', 'id': '123'}, + {'title': 'blablupp', 'id': '42'}, + {'title': 'lolwtf hax !!!11', 'id': '9001'} ] return render('/xhtml/results.mako') diff --git a/trunk/yolanda/controllers/video.py b/trunk/yolanda/controllers/video.py index 71d21ec..249c748 100644 --- a/trunk/yolanda/controllers/video.py +++ b/trunk/yolanda/controllers/video.py @@ -12,7 +12,7 @@ class VideoController(BaseController): 'description': 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam sapien mauris, venenatis at, fermentum at, tempus eu, urna.' , 'preview': h.url_for('/images/404.png') } - return 'show a video html page' + return render('/xhtml/video.mako') def file(self): return 'serve video' diff --git a/trunk/yolanda/lib/app_globals.py b/trunk/yolanda/lib/app_globals.py index c144c9f..a42cdfb 100644 --- a/trunk/yolanda/lib/app_globals.py +++ b/trunk/yolanda/lib/app_globals.py @@ -11,5 +11,8 @@ class Globals(object): initialization and is available during requests via the 'g' variable """ - self.appname = "Application Name" + self.application_name = "Yolanda" + self.platform_name = "Demo Application" + self.platform_slogan = "Welcome to Demo Application, a video CMS without a slogan." + self.developers = ("Nils Dagsson Moskopp", "Johannes Schauer") pass diff --git a/trunk/yolanda/public/css/colors/debug.css b/trunk/yolanda/public/css/colors/debug.css new file mode 100644 index 0000000..37b2f8f --- /dev/null +++ b/trunk/yolanda/public/css/colors/debug.css @@ -0,0 +1,25 @@ +/* +div +{ + outline-color: black; + outline-style: solid; + outline-width: 1px; +} +*/ + +/* +h1, h2, h3, h4, h5, h6, p +{ + outline-color: black; + outline-style: dotted; + outline-width: 1px; +} +*/ + +a[href=""], +img[alt=""] +{ + outline-color: red; + outline-style: solid; + outline-width: 3px; +} diff --git a/trunk/yolanda/public/css/colors/tango.css b/trunk/yolanda/public/css/colors/tango.css index 253cd36..2f9a6de 100644 --- a/trunk/yolanda/public/css/colors/tango.css +++ b/trunk/yolanda/public/css/colors/tango.css @@ -88,7 +88,26 @@ ul#queries color: #FFD95A; } -/* classes */ +/* ids */ + +#copyright +{ + background-color: #131313; + border-color: #363636; + border-style: dotted; +} + +#video, +#header, +#heading, +#login, +#search, +#tagcloud +{ + background-color: #131313; + border-color: #363636; + border-style: solid; +} #messagebox { @@ -116,28 +135,3 @@ ul#queries background-color: #fcaf3e; color: #131313; } - - #messagebox #message - { - font-size: 1.4em; - } - -/* ids */ - -#copyright -{ - background-color: #131313; - border-color: #363636; - border-style: dotted; - font-family: monospace; -} - -#heading, -#login, -#search, -#tagcloud -{ - background-color: #131313; - border-color: #363636; - border-style: solid; -} diff --git a/trunk/yolanda/public/css/default.css b/trunk/yolanda/public/css/default.css index d344ccb..67ab338 100644 --- a/trunk/yolanda/public/css/default.css +++ b/trunk/yolanda/public/css/default.css @@ -8,6 +8,8 @@ Purpose of this file is to import reset, decoration and structure stylesheets. */ @import "reset.css"; +@import "colors/debug.css"; @import "colors/tango.css"; @import "fonts/hurrdurr.css"; -@import "structure/fake6.css"; +@import "layout/fake6.css"; +@import "flow/fake6.css"; diff --git a/trunk/yolanda/public/css/flow/fake6.css b/trunk/yolanda/public/css/flow/fake6.css index 859b102..94e81f3 100644 --- a/trunk/yolanda/public/css/flow/fake6.css +++ b/trunk/yolanda/public/css/flow/fake6.css @@ -7,18 +7,22 @@ This file is licensed under the WTF Public License. Purpose of this file is to provide the flow of the elements, such as: - float - clear - - margin */ -#heading, +#copyright +{ + clear: both; +} + +#header +{ +} + #login, #search, #tagcloud { + clear: right; float: right; } -#results -{ - margin-right: 28em; -} diff --git a/trunk/yolanda/public/css/fonts/hurrdurr.css b/trunk/yolanda/public/css/fonts/hurrdurr.css index ddc853c..8a1b425 100644 --- a/trunk/yolanda/public/css/fonts/hurrdurr.css +++ b/trunk/yolanda/public/css/fonts/hurrdurr.css @@ -137,3 +137,22 @@ ul line-height: 1.25em; text-transform: uppercase; } + +#copyright +{ + font-family: monospace; +} + + #messagebox #message + { + font-size: 1.4em; + } + +#header, +#heading, +#login, +#search, +#tagcloud +{ + text-align: justify; +} diff --git a/trunk/yolanda/public/css/layout/fake6.css b/trunk/yolanda/public/css/layout/fake6.css index 5b184f5..90a553a 100644 --- a/trunk/yolanda/public/css/layout/fake6.css +++ b/trunk/yolanda/public/css/layout/fake6.css @@ -68,15 +68,12 @@ ol ol#results { /* compensate for list element margin */ - margin-left: -1em; text-align: center; } ol#results li { display: inline-block; - margin-left: 1em; - margin-bottom: 1em; width: 216px; } @@ -113,7 +110,39 @@ ul padding-left: 0.5em; } -/* classes */ +#video +{ + display: block; + margin: auto; +} + +#video, +#copyright, +#header, +#heading, +#login, +#search, +#tagcloud +{ + border-width: 1px; + margin-bottom: 1em; +} + +#copyright, +#header, +#heading, +#login, +#search, +#tagcloud +{ + padding: 1em; +} + +#header +{ + height: 3em; + padding-bottom: 0.5em; +} #messagebox { @@ -123,23 +152,6 @@ ul text-align: center; } -/* ids */ - -/* sidebar stuff */ - -#copyright, -#heading, -#login, -#search, -#tagcloud -{ - border-width: 1px; - clear: right; - margin-bottom: 1em; - padding: 1em; - text-align: justify; -} - #heading, #login, #search, @@ -149,7 +161,8 @@ ul padding-bottom: 0.5em; } -#results +#content, +#header { margin-right: 28em; } diff --git a/trunk/yolanda/templates/xhtml/base.mako b/trunk/yolanda/templates/xhtml/base.mako index 925e6bb..55c0dc1 100644 --- a/trunk/yolanda/templates/xhtml/base.mako +++ b/trunk/yolanda/templates/xhtml/base.mako @@ -1,6 +1,6 @@ - + + <%def name="search()">