Mercurial > hg > MPIWGWeb
changeset 4:1a895905f7ca
feature teaser works now.
author | casties |
---|---|
date | Mon, 11 Feb 2013 20:14:47 +0100 |
parents | ee3eb9a6665a |
children | 9e720c6c5b6c |
files | MPIWGFeature.py css/mpiwg.css zpt/www/main_template.zpt |
diffstat | 3 files changed, 155 insertions(+), 192 deletions(-) [+] |
line wrap: on
line diff
--- a/MPIWGFeature.py Fri Feb 08 20:42:18 2013 +0100 +++ b/MPIWGFeature.py Mon Feb 11 20:14:47 2013 +0100 @@ -66,6 +66,13 @@ pt = getattr(dir, 'intro.pt') return pt(**args) + def getTeaserPath(self): + """returns the path to the teaser template""" + # get Language from MPIWGRoot + lang = self.getLang() + dir = getattr(self, lang, self.en) + return '%s/%s/teaser.pt'%(self.getId(),dir.getId()) + def getMain(self, **args): """returns the main part as PageTemplate""" # get Language from MPIWGRoot
--- a/css/mpiwg.css Fri Feb 08 20:42:18 2013 +0100 +++ b/css/mpiwg.css Mon Feb 11 20:14:47 2013 +0100 @@ -21,7 +21,7 @@ } a { - color: #ee802d; + color: #d45a00; text-decoration: none; } @@ -68,9 +68,31 @@ } a.maillink { - color: #485297 !important; + color: #3b4186 !important; +} + +h1 { + color: #3b4186; + font-size: 15px; + font-weight: bold; + margin: 10px 2px 10px 2px; } +h2 { + color: #3b4186; + font-size: 15px; + font-weight: normal; + margin: 2px; +} + +h3 { + color: #3b4186; + font-size: 13px; + font-weight: normal; + margin: 2px; +} + + h1 a { /* a header with a link looks like a header */ color: inherit; @@ -90,46 +112,48 @@ #wrapper { /* float: left; */ - width: 960px; + width: 900px; margin: 0 auto; - padding: 20px 0 0 20px; + padding: 10px 40px 10px 20px; background-color: #fcf2df; + box-shadow: 0 0 5px 3px #d0d0d0; } #header { /* float: left; */ + position: relative; width: 900px; + height: 90px; margin: 0 0 10px 0; } #header div.title { display: inline; /* float: left; */ - width: 661px; + position: absolute; + left: 0; + top: 20px; + width: 661px; height: 40px; } -#header div.title img { - margin-bottom: 30px; -} - #header div.logo { display: inline; /* float: right; */ + position: absolute; + right: 0; width: 87px; height: 88px; } -#header div.logo img { - margin-left: 145px; -} - /* Main Navigation */ #mainnav { /* float: left; */ + position: relative; width: 900px; - font-size: 12px; + font-family: Verdana, Arial, sans-serif; + font-size: 12px; border-top: 8px solid #fab775; margin-bottom: 20px; padding-top: 5px; @@ -149,7 +173,7 @@ } #mainnav a { - color: #666666; + color: #696968; outline: none; } @@ -169,60 +193,16 @@ } #mainnav div.sec.lang { - float: right; - margin-top: -13px; + /* float: right; */ + position: absolute; + right: 0; + top: -8px; margin-right: 0; } - - - - -/* Search */ - -div.search { - float: left; - width: 900px; - height: 25px; -} - -#wrapper_home div.search { - float: right; - width: 220px; -} - -.searchform { - float: right; -} +/* Breadcrumbs */ -input.searchinput { - width: 211px; - padding-left: 18px; - border: 1px solid #dccbae; - background: url(../images/search.gif) no-repeat #FFFFFF; - color: #EA8500; -} - - - - - - -/* Breadcrumbs & Quicklinks */ - -div.quicklinks { - float: left; - width: 900px; - border-bottom: 3px solid #dccbae; - color: #EA8500; -} - -#wrapper_home div.quicklinks { - float: right; - width: 230px; - border-bottom: none; -} div.breadcrumbs { float: left; @@ -240,76 +220,73 @@ font-weight: bold; } -select.quickfind { - float: right; - width: 230px; - height: 20px; - padding: 2px 2px 2px 18px; - color: #EA8500; - font-size: 11px; - border: none; - background: url(../images/arr_qf.gif) no-repeat #f4daae; + +/* + * Front page feature + */ + +div.feature { + width: 900px; + background-color: #f4e0c7; } - - - - - - - +div.feature div.teaser_image { + /* float: left; */ + display: inline-block; + vertical-align: top; + position: relative; + width: 593px; + height: 351px; +} -/* - * Content - */ - -/* frontpage */ - -div.feature, div.feature .thumbnails { - float: left; - width: 650px; -/* margin-right: 20px; */ - font-size: 12px; - line-height: 1.6; +div.feature div.teaser_image div.caption { + position: absolute; + bottom: 0; + padding: 3px; + text-align: right; + color: white; + font-size: 10px; + opacity: 0.8; + background-color: gray; + /* background-color: rgba(80,80,80,0.6); */ } -div.feature .thumb { - float: left; - width: 129px; - margin-right: 1px; - margin-bottom: 1px; -} - -div.feature .feature_image { - float: left; - width: 650px; - margin-bottom: 15px; +div.feature div.teaser_text { + display: inline-block; + position: relative; + width: 265px; + padding-left: 21px; + padding-right: 21px; } -div.feature .caption { - text-align: right; - font-size: 10px; - color: #b69f7b; - margin-top: 5px; +div.feature div.teaser_text div.feature_number { + position: absolute; + right: 14px; + top: 5px; + font-family: Georgia, Times, serif; + font-size: 26px; + color: #887163; +} +/* title */ +div.feature div.teaser_text h1 { + font-size: 16px; + font-weight: normal; + margin-top: 0; +} +/* "current research topic */ +div.feature div.teaser_text h2 { + font-size: 14px; + color: #887163; + margin-bottom: 0; +} +/* feature date */ +div.feature div.teaser_text h3 { + margin-top: 20px; + margin-bottom: 20px; } -div.feature h1 { - color: #485297; - font-size: 15px; - font-weight: bold; - margin: 10px 2px 2px 2px; -} - -div.feature h2 { - color: #485297; - font-size: 15px; - font-weight:normal; - margin: 10px 2px 2px 2px; -} - -div.feature p { -/* margin-top: 0.5em; - margin-bottom: 0.5em; */ +div.feature div.teaser_text p { + line-height: 1.5; } @@ -320,12 +297,12 @@ */ div.content { - float: left; + /* float: left; */ width: 900px; } div.main { - float: left; + /* float: left; */ width: 720px; background-color: #FFFFFF; margin-bottom: 10px; @@ -334,7 +311,7 @@ } div.main div.center { - float: left; + /* float: left; */ width: 460px; padding: 20px; } @@ -355,33 +332,13 @@ div.main div.center_wide { - float: left; + /* float: left; */ width: 710px; /* padding: 20px 0 0 20px; */ padding: 20px; } -div.main h1 { - color: #485297; - font-size: 15px; - font-weight: bold; - margin: 10px 2px 10px 2px; -} - -div.main h2 { - color: #485297; - font-size: 15px; - font-weight: normal; - margin: 2px; -} - -div.main h3 { - color: #485297; - font-size: 13px; - font-weight: normal; - margin: 2px; -} @@ -392,25 +349,25 @@ */ div.leftbox { - float: left; + /* float: left; */ width: 170px; } div.subnav { - float: left; + /* float: left; */ width: 170px; font-size: 11px; } div.subnav .sn_off, .subnavbox .sn_off { - float: left; + /* float: left; */ width: 164px; border-bottom: 1px solid #dccbae; padding: 3px 6px 6px 0; } div.subnav .sn_on { - float: left; + /* float: left; */ width: 158px; border-bottom: 1px solid #dccbae; padding: 3px 6px 6px 6px; @@ -434,14 +391,14 @@ div.subnavbox { /* navigation below e.g. research projects */ - float: left; + /* float: left; */ width: 170px; font-size: 11px; margin-top: 30px; } div.subnavbox h2 { - float: left; + /* float: left; */ width: 170px; height: 20px; font-size: 11px; @@ -473,7 +430,7 @@ } div.dept_block { - float: left; + /* float: left; */ width: 221px; min-height:420px; border-bottom: 2px solid #979CE0; @@ -542,7 +499,7 @@ */ div.namelist { - float: left; + /* float: left; */ clear: left; padding-top: 10px; } @@ -568,7 +525,7 @@ width:100%; } div.namelist div.row { - float: left; + /* float: left; */ border-bottom: 1px solid #dccbae; margin-top: 5px; padding-bottom: 7px; @@ -587,7 +544,7 @@ div.namelist .name { display: block; - float: left; + /* float: left; */ width: 30%; } @@ -597,7 +554,7 @@ div.namelist .definition { display: block; - float: left; + /* float: left; */ width: 70%; } @@ -611,14 +568,14 @@ } div.list_disclaimer { - float: left; + /* float: left; */ width: 180px; font-size: 10px; margin-right: 20px; } div.letters { - float: left; + /* float: left; */ margin-right: 10px; color: #EA8500; } @@ -628,7 +585,7 @@ } div.letter { - float: left; + /* float: left; */ width: 700px; margin-top: 20px; padding-bottom: 3px; @@ -639,7 +596,7 @@ } div.jump_top { - float: left; + /* float: left; */ width: 700px; text-align: right; font-size: 10px; @@ -664,7 +621,7 @@ */ div.sidebar { - float: right; + /* float: right; */ width: 220px; font-size: 10px; line-height: 1.6; @@ -677,7 +634,7 @@ div.sideblock { /* border-bottom: 1px solid #dccbae; */ - float: left; + /* float: left; */ clear: left; } @@ -697,21 +654,21 @@ div.sideblock h2 a { /* no longer so ugly hack to have right-adjust link... */ - float: right; + /* float: right; */ color: #EA8500; font-size: 10px; } div.sideblock h2 .proj_state { /* right-adjusted block besides the title */ - float: right; + /* float: right; */ font-size: 10px; color: #b69f7b; font-weight: bold; } div.sideblock h2 .proj_state a { /* inside should not float */ - float: none; + /* float: none; */ } div.sideblock a.maillink { @@ -719,7 +676,7 @@ } div.sideblock .item, div.sideblock p { - float:left; + /* float:left; */ width:220px; margin: 5px 0 0 0; padding: 0 0 5px 0; @@ -756,7 +713,7 @@ div.sideblock .item.featurearchive { border-bottom:none; - float:left; + /* float:left; */ margin: 5px 0 10px 0; padding: 0 0 5px 0; border-bottom: None; @@ -809,7 +766,7 @@ */ .footer { - float: left; + /* float: left; */ width: 700px; background-color: #FFFFFF; margin: 0 10px 20px 20px; @@ -817,14 +774,14 @@ } #wrapper_home .footer { - float: left; + /* float: left; */ width: 900px; margin: 0 10px 20px 20px; border-top: 1px solid #dccbae; } div.services { - float: right; + /* float: right; */ font-size: 11px; margin-top: 5px; } @@ -834,7 +791,7 @@ } div.serviceprint { - float: left; + /* float: left; */ margin-left: 20px; padding-left: 20px; height: 25px; @@ -842,7 +799,7 @@ } div.serviceforward { - float: left; + /* float: left; */ margin-left: 20px; padding-left: 20px; height: 25px; @@ -850,7 +807,7 @@ } div.servicepdf { - float: left; + /* float: left; */ margin-left: 20px; padding-left: 20px; height: 25px; @@ -858,13 +815,13 @@ } div.boilerplate { - float: left; + /* float: left; */ margin: 0 0 50px 170px; width: 730px; } #wrapper_home div.boilerplate { - float: left; + /* float: left; */ margin: 30px 0 50px 0px; width: 900px; border-top: 1px solid #dccbae; @@ -872,13 +829,13 @@ } div.legal { - float: left; + /* float: left; */ font-size: 11px; color: #EA8500; } div.mpg_signet { - float: right; + /* float: right; */ } @@ -901,7 +858,7 @@ /* Sitemap */ div.dept_block_sitemap { - float: left; + /* float: left; */ width: 221px; font-size: 11px; } @@ -937,11 +894,11 @@ padding: 10px; } div.image_small.left { - float: left; + /* float: left; */ padding-left: 0px; } div.image_small.right { - float: right; + /* float: right; */ padding-right: 0px; } div.image_small .caption { @@ -1000,7 +957,7 @@ div.caption_inline { /* caption for images on project pages */ - float: left; + /* float: left; */ width: 208px; font-size: 9px; color: #b69f7b; @@ -1008,11 +965,11 @@ } div.pic_inline { - float: left; + /* float: left; */ width: 220px; } div.pic_inline_container { - float: left; + /* float: left; */ width: 220px; margin: 5px 15px 0 0; } @@ -1082,7 +1039,7 @@ div.event div.row { width:100%; - float: left; + /* float: left; */ border-bottom: 1px solid #dccbae; margin-bottom: 5px; padding-bottom: 7px; @@ -1090,13 +1047,13 @@ div.event div.row div.name { - float:left; + /* float:left; */ width:80px; color:#485297; } div.event div.row div.definition { - float:left; + /* float:left; */ margin-left:20px; width:300px; } @@ -1110,7 +1067,7 @@ } div.media_nav div.element { - float:left; + /* float:left; */ margin-left:8px; margin-right:8px; }
--- a/zpt/www/main_template.zpt Fri Feb 08 20:42:18 2013 +0100 +++ b/zpt/www/main_template.zpt Mon Feb 11 20:14:47 2013 +0100 @@ -13,7 +13,6 @@ 'news':'news', 'lang':'en'}; subsection python:template.getSubSection(crumbs=crumbs); - frontfeature python:int(request.get('ff',4)); "> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />