index.tmpl.html: change from table to div layout

This makes things a bit more condensed.
This commit is contained in:
Florian Klink 2019-12-05 21:25:05 +01:00
parent eae2eede04
commit c67b3ba7ea

View file

@ -63,25 +63,14 @@
{{ end }}
<h2 id="region-log">Log</h2>
<table class="table .table-sm">
<tbody>
{{ range $entry := .memory.Entries }}
<tr class="bg-dark {{ levelToClasses $entry.Level }}">
<td rowspan="2">
{{ $entry.Timestamp.Format "2006-01-02 15:04:05 UTC"}}
</td>
<td>{{ $entry.Level }}</td>
<td>
<code class="{{ levelToClasses $entry.Level }}">{{ $entry.Message }}</code><br />
</td>
</tr>
<tr class="bg-dark {{ levelToClasses $entry.Level }}">
<td colspan="2">
<code class="{{ levelToClasses $entry.Level }}">{{ fieldsToJSON $entry.Fields }}</code><br />
</td>
</tr>
<div class="d-flex flex-row bg-dark {{ levelToClasses $entry.Level }} text-monospace">
<div class="p-2"><small>{{ $entry.Timestamp.Format "2006-01-02 15:04:05 UTC"}}</small></div>
<div class="p-2 flex-grow-1"><small><strong>{{ $entry.Message }}</strong></small></div>
</div>
<div class="bg-dark {{ levelToClasses $entry.Level }} text-monospace text-break" style="padding-left: 4rem">
<small>{{ fieldsToJSON $entry.Fields }}</small>
</div>
{{ end }}
</tbody>
</table>
</body>
</html>