Conditional List of Colors
This page uses an HTML Form and a Conditional Hashtag List to show matching Color Names,
but only when a color name is provided.
{ Block } command processing is disarmed by adding a closing #> after the {,
and then adding a start <# before the closing }.
<# if("<#[url.color]#>"!="") { #>
<# start list for colors;
include when name ~ "<#[url.color]#>";
show 5 rows per page;
#>
<# start header #>
<table class="table table-striped table-hover">
<thead>
<tr>
<th>Color</th>
<th>Name</th>
<th>Hex</th>
<th class="text-right">Red</th>
<th class="text-right">Green</th>
<th class="text-right">Blue</th>
</tr>
</thead>
<# end header #>
<# start row #>
<tr>
<td style="background-color:<# hex #>"> </td>
<td><# name #></td>
<td class="monospace"><# hex #></td>
<td class="text-right"><# r #></td>
<td class="text-right"><# g #></td>
<td class="text-right"><# b #></td>
</tr>
<# end row #>
<# start footer #>
</table>
<# end footer #>
<# no results #>
<# redirect to "/lists/purge?land=pager"; #>
<# end no results #>
<# end list #>
<# } #>