# HG changeset patch # User casties # Date 1368476164 -7200 # Node ID faaded775a8aed46abb192e4ba6947b1fb9fb7a3 # Parent ff0657e34ab4c77f5e1de4b52497b71c94830299 styles for feature and feature archive. diff -r ff0657e34ab4 -r faaded775a8a MPIWGFeature.py --- a/MPIWGFeature.py Mon May 13 18:06:11 2013 +0200 +++ b/MPIWGFeature.py Mon May 13 22:16:04 2013 +0200 @@ -27,8 +27,10 @@ {'label':'Configure', 'action':'changeForm'}, ) + # templates changeWeightForm = PageTemplateFile('zpt/feature/manage_change_weight', globals()) changeForm = PageTemplateFile('zpt/feature/manage_config', globals()) + feature_main = PageTemplateFile('zpt/feature/feature_template', globals()) def __init__(self, id, title=None, weight=0, date=None, title_en=None, title_de=None, author=None, author_id=None): self.id = str(id) @@ -189,7 +191,7 @@ img = getattr(self, 'img-thumb.jpg') return img - def getThumbImgUrl(self): + def getThumbUrl(self): """returns the URL of the image object for the sidebar thumbnail""" img = getattr(self, 'img-thumb.jpg') return img.absolute_url() diff -r ff0657e34ab4 -r faaded775a8a MPIWGRoot.py --- a/MPIWGRoot.py Mon May 13 18:06:11 2013 +0200 +++ b/MPIWGRoot.py Mon May 13 22:16:04 2013 +0200 @@ -168,6 +168,29 @@ return items + def getFeatureAuthorMap(self): + """Return a map of authors of features. + + Returns a dict with author names and a list of feature numbers. + """ + features = self.getFeatures() + authors = {} + # build dict of unique authors and features + fno = 0 + for f in features: + author = f.getAuthor() + fno += 1 + if author: + for a in author.split(';'): + a = a.strip() + if a in authors: + authors[a].append(fno) + else: + authors[a] = [fno] + + return authors + + def getDepartments(self): """returns a list of the Departments""" dir = getattr(self, 'departments', None) diff -r ff0657e34ab4 -r faaded775a8a css/mpiwg.css --- a/css/mpiwg.css Mon May 13 18:06:11 2013 +0200 +++ b/css/mpiwg.css Mon May 13 22:16:04 2013 +0200 @@ -876,6 +876,7 @@ } ul.items .type { + /* font-size: 11px; */ color: #696968; } @@ -960,34 +961,80 @@ /* - * figures (in project descriptions) + * figures (in project descriptions and features) */ -div.figure { +div.figure, +div.image_small { float: left; - width: 220px; + width: 230px; padding: 0.5em 1em 0 0; } -div.figure div.image img { - width: 220px; +div.image_small.right { + float: right; + padding: 0.5em 0 0 1em; } -div.figure div.figcaption { +div.figure div.image img, +div.image_small img { + width: 230px; +} +div.figure div.figcaption, +div.banner_large div.caption, +div.image_small div.caption { font-size: 10px; + line-height: 1.5; color: #9f917a; margin-top: 0.5em; } +div.banner_large img { + width: 460px; +} /* - * project description + * project description and feature */ h3.authors { margin-top: 0.5em; } +p.maintext_authors { + font-size: 14px; + color: #3b4186; +} + div.description { margin-top: 0.5em; line-height: 1.5; } +/* + * feature story archive + */ +ul.items.features li { + padding: 0 0 0.5em 0; + border-bottom: 1px solid #dccbae; +} +ul.items.features .thumb { + float:left; + padding: 8px 10px 0 0; +} +ul.items.features .thumb img { + width: 55px; + height: 34px; +} +ul.items.features .feature_number { + font-family: Georgia, Times, serif; + font-size: 24px; + color: #696968; +} +ul.items.features .date { + font-size: 11px; + color: #696968; +} +ul.items.features h1 { + font-size: 12px; + font-weight: bold; + margin: 0; +} /* * sidebar */ @@ -1053,6 +1100,33 @@ } /* + * special sideblocks + */ +div.sideblock .item.link, +div.sideblock .item.internal { + background: url(../images/internal.png) 0 11px no-repeat; + padding-left: 10px; +} + +div.sideblock .item.external { + background: url(../images/external.png) 0 11px no-repeat; + padding-left: 13px; +} + +div.sideblock .item.download { + background: url(../images/download.png) 0 8px no-repeat; + padding-left: 15px; +} + +div.sideblock .item.thumb img { + width: 55px; + height: 34px; +} +div.sideblock .item.thumb .text { + padding-left: 0.5em; +} + +/* * footer */ #footer { diff -r ff0657e34ab4 -r faaded775a8a zpt/feature/feature_template.zpt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/feature/feature_template.zpt Mon May 13 22:16:04 2013 +0200 @@ -0,0 +1,61 @@ + + + + + + + +
+ + (the latest feature should be here) + +
+ + + + + + +
\ No newline at end of file