]> Pileus Git - ~andy/ct/blobdiff - knot/html.ct
update knot
[~andy/ct] / knot / html.ct
index 40fbe44c88be7bad8d379559aed257b6a633caad..a80c21d450d15db9f533d28bbf0c26b5e8702066 100644 (file)
@@ -9,7 +9,7 @@
        <% } %>
 <% } %>
 
-<% void print_index(tile_t **tiles) { %>
+<% void print_index(row_t *rows) { %>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
        <meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
        <head>
                <style type="text/css">
-                       *   { border:0; margin:0; padding:0; }
-                       table { border-collapse:separate; margin:auto; width:1800px;}
-                       td  { width:64px; height:64px; border-spacing:0px 0px;}
+                       td  { min-width:64px; height:64px; }
                        img { position:absolute; }
                </style>
        </head>
        <body>
-       <table cellpadding="0" cellspacing="0">
-               <% for (int row = 1; row < 10; row++) { %>
-               <tr>
-                       <% for (int col = 1; col < 30; col++) { %>
-                       <td>
-                       <% print_img(tiles[row][col].bot); %>
-                       <% print_img(tiles[row][col].top); %>
-                       </td>
+               <table cellpadding="0" cellspacing="0">
+                       <% for (int row = 0; rows[row].ncols >= 0; row++) { %>
+                       <tr>
+                               <% for (int col = 0; col < rows[row].ncols; col++) { %>
+                               <td>
+                                       <% print_img(rows[row].cols[col].bot); %>
+                                       <% print_img(rows[row].cols[col].top); %>
+                               </td>
+                               <% } %>
+                       </tr>
                        <% } %>
-               </tr>
-               <% } %>
                </table>
        </body>
 </html>