$def with (candidates, committees, occupation)
$var width: 90%
$var color: white
$var title: $occupation
<h1>$occupation.title()</h1>
<h2>Top candidates</h2>
<table class="structure" width="500">
$ trclass = "odd"
$for c in candidates:
$if trclass == "odd":
$ trclass = "even"
$else:
$ trclass = "odd"
<tr class="$trclass">
<td>$loop.index. <a href="/p/$c.polid">$c.firstname $c.lastname</a>$(c.party and ', '+c.party or '')</td>
<td style="text-align: right;">\$$commify(int(c.amt))</td>
</tr>
</table>
<p><a href="/occupation/$occupation/candidates" class="footer">More...</a></p>
<h2>Top committees</h2>
<table class="structure" width="500">
$ trclass = "odd"
$for c in committees:
$if trclass == "odd":
$ trclass = "even"
$else:
$ trclass = "odd"
<tr class="$trclass">
<td>$loop.index. $c.name.title()</td>
<td style="text-align: right;">\$$commify(int(c.amt))</td>
</tr>
</table>
<p><a href="/occupation/$occupation/committees" class="footer">More...</a></p>