News for hackers. Stuff that matters.
Re:Ask HN: How do you display HTML tables on any screen size? by andrewfromx on Tuesday July 04, 2023 @07:05PM (#36593636)
Big Table logic:

                {{ $headers := index . "headers" }}
                {{ range $i, $h := $headers }}
                <th>{{ $h }}</th>
                {{ end }}

                {{ $cells := index . "cells" }}
                {{ range $i, $c := $cells }}
              <tr>
                {{ range $j, $cell := $c }}
                <td>
                    {{ $cell }}
                </td>
                {{ end }}
              </tr>
              {{ end }}

There are no comments on this comment yet.