Mercurial > hg > MPIWGWeb
comparison zpt/www/common_template.zpt @ 26:8a99ad8713d6
new common template for fragments. new styles for servicebox.
author | casties |
---|---|
date | Thu, 18 Apr 2013 20:39:01 +0200 |
parents | |
children | b12d80f033fb |
comparison
equal
deleted
inserted
replaced
25:5a4b22fa726c | 26:8a99ad8713d6 |
---|---|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
3 <html xmlns="http://www.w3.org/1999/xhtml"> | |
4 <head> | |
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
6 </head> | |
7 <body> | |
8 <!-- common template snippets as METAL macros --> | |
9 | |
10 <!-- full-row feature block --> | |
11 <div class="row teaser" metal:define-macro="feature_teaser" | |
12 tal:define="features python:here.getFeatures(); | |
13 feature_num python:int(request.get('ff',len(features)-1)); | |
14 feature python:features[feature_num]; | |
15 feature_url python:feature.getUrl('%s/%s/features'%(root,secmap['news'])); | |
16 teaser_path string:here/features/${feature/getTeaserPath};"> | |
17 <!-- feature image and intro --> | |
18 <div class="col"> | |
19 <div class="box teaser_image"> | |
20 <div class="slider prev" tal:condition="python:feature_num>1"> | |
21 <a tal:attributes="href python:'?ff=%s'%(feature_num-1)"><img tal:attributes="src string:$root/images/slider_prev.png" | |
22 alt="previous" /></a> | |
23 </div> | |
24 <a tal:attributes="href feature_url"> <img tal:attributes="src feature/getFrontpageImgUrl" width="593" height="351" /> | |
25 </a> | |
26 <tal:block tal:condition="exists:python:path(teaser_path+'/macros/caption')"> | |
27 <tal:block metal:use-macro="python:path(teaser_path+'/macros/caption')" /> | |
28 </tal:block> | |
29 </div> | |
30 </div> | |
31 <div class="col"> | |
32 <div class="box teaser_text"> | |
33 <div class="feature_number" tal:content="feature_num|nothing" /> | |
34 <div class="date" tal:content="feature/getDateString" /> | |
35 <h3> | |
36 <metal:block metal:define-slot="topic_title">Current Research Topic</metal:block> | |
37 </h3> | |
38 <tal:block tal:condition="exists:python:path(teaser_path+'/macros/text')"> | |
39 <tal:block tal:condition="exists:python:path(teaser_path+'/macros/text')" | |
40 metal:use-macro="python:path(teaser_path+'/macros/text')" /> | |
41 </tal:block> | |
42 <p> | |
43 <a class="internal" tal:attributes="href feature_url"><metal:block metal:define-slot="topic_link">Current Research Topic</metal:block></a> | |
44 </p> | |
45 <p> | |
46 <a class="internal" tal:attributes="href string:$root/${secmap/news}/featurearchive.html"><metal:block | |
47 metal:define-slot="topic_archive">Research Topic Archive</metal:block></a> | |
48 </p> | |
49 <div class="slider next" tal:condition="python:feature_num<len(features)-1"> | |
50 <a tal:attributes="href python:'?ff=%s'%(feature_num+1)"><img tal:attributes="src string:$root/images/slider_next.png" | |
51 alt="next" /></a> | |
52 </div> | |
53 </div> | |
54 </div> | |
55 </div> | |
56 <!-- feature --> | |
57 | |
58 </body> | |
59 </html> |