{{ define "index"}}

{{ template "header" }}

<body>
    <div class="container mt-3">
        <h2>Now online</h2>
        <table class="table table-striped">
            <tr>
                <th>Name</th>
                <th>Ip</th>
                <th>Mac</th>
                <th>Hardware</th>
                <th>Known</th>
            </tr>
            {{ range . }}
            <tr>
                <td>{{ .Name }}</td>
                <td>{{ .Ip }}</td>
                <td>{{ .Mac }}</td>
                <td>{{ .Hw }}</td>
                <td>{{ .Known }}</td>
            </tr>
            {{ end }}
        </table>
        <h2>Log</h2>
        <table class="table table-striped">
            <tr>
                <th>Name</th>
                <th>Ip</th>
                <th>Mac</th>
                <th>Hardware</th>
                <th>Last seen</th>
                <th>Known</th>
            </tr>
            {{ range . }}
            <tr>
                <td>{{ .Name }}</td>
                <td>{{ .Ip }}</td>
                <td>{{ .Mac }}</td>
                <td>{{ .Hw }}</td>
                <td>{{ .Date }}</td>
                <td>{{ .Known }}</td>
            </tr>
            {{ end }}
        </table>
    </div>
</body>
</html>
{{ end }}