1 <html metal:use-macro="here/main_template/macros/master">
4 <meta http-equiv="content-type" content="text/html;charset=UTF-8">
5 <title>color table</title>
8 <body metal:fill-slot="main"
9 tal:define="propsheet here/base_properties ;
10 propMap propsheet/propertyMap ;
11 strProps python:[ p for p in propMap if p['type'] == 'string' ] ;
12 colorProps python:[ p for p in strProps if p['id'].lower().find('color') >=0 or (propsheet.getProperty(p['id']).startswith('#') and propsheet.getProperty(p['id'])[1:].isalnum() ) ]"
15 <table width="180" border="1" cellspacing="2" cellpadding="0">
16 <tr tal:repeat="prop colorProps">
17 <th tal:content="prop/id">color name</th>
18 <td tal:content="python:propsheet.getProperty(prop['id'])">#fde</td>
19 <td bgcolor="#ddd" tal:attributes="style python:'background: %s' % propsheet.getProperty(prop['id'])"> </td>