Skip to content

Commit

Permalink
webapps.mason.grid: column widths
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjbq7 committed Aug 22, 2023
1 parent 3340d18 commit 92f9263
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions extra/webapps/mason/grids/grids.factor
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,29 @@ CONSTANT: cpus
}

: render-grid-header ( -- xml )
oses values [ [XML <th scope='col'><-></th> XML] ] map ;
oses values [ [XML <th scope="col"><-></th> XML] ] map ;

:: render-grid-row ( cpu quot -- xml )
cpu second oses keys [| os | cpu os quot render-grid-cell ] map
[XML <tr><th scope='row'><-></th><-></tr> XML] ;
[XML <tr><th scope="row"><-></th><-></tr> XML] ;

:: render-grid ( quot -- xml )
render-grid-header
cpus [ quot render-grid-row ] map
[XML
<table class="downloads" cellspacing="0">
<colgroup>
<col style="width: 25%" />
<col style="width: 25%" />
<col style="width: 25%" />
<col style="width: 25%" />
</colgroup>
<thead>
<tr><th class="nobg">OS/CPU</th><-></tr>
</thead>
<tbody>
<->
</tbody>
</table>
XML] ;

Expand Down

0 comments on commit 92f9263

Please sign in to comment.