HTML adjusted to make them responsive and better sized when viewed on a mobile device. There should be no change when viewing these on tablets large screens. Changes include: - Making containers 100% wide on screens below the Bootstrap "lg" breakpoint. This removes the left and right outer margins, making the most of available space on small screens. - Making the navigation menu collapse on small screens, to be replaced by a "hamburger" icon that then expands to show the menu when clicked. - Making all tables responsive so that they can be horizontally scrolled on small screens. - Table items now centrally align vertically on the table rows (using the "align-middle" class").
83 lines
4.1 KiB
HTML
83 lines
4.1 KiB
HTML
{{ define "line"}}
|
|
<body>
|
|
<div class="container-lg mt-3 table-responsive">
|
|
<table class="table table-striped">
|
|
<tr>
|
|
<form action="/sort_hosts/" method="post">
|
|
<th>Name<br>
|
|
<button type="submit" name="sort_method" value="name-up" class="btn btn-primary btn-sm">
|
|
<i class="bi bi-caret-up"></i>
|
|
</button>
|
|
<button type="submit" name="sort_method" value="name-down" class="btn btn-primary btn-sm">
|
|
<i class="bi bi-caret-down"></i>
|
|
</button>
|
|
</th>
|
|
<th>IP<br>
|
|
<button type="submit" name="sort_method" value="ip-up" class="btn btn-primary btn-sm">
|
|
<i class="bi bi-caret-up"></i>
|
|
</button>
|
|
<button type="submit" name="sort_method" value="ip-down" class="btn btn-primary btn-sm">
|
|
<i class="bi bi-caret-down"></i>
|
|
</button>
|
|
</th>
|
|
<th>Mac<br>
|
|
<button type="submit" name="sort_method" value="mac-up" class="btn btn-primary btn-sm">
|
|
<i class="bi bi-caret-up"></i>
|
|
</button>
|
|
<button type="submit" name="sort_method" value="mac-down" class="btn btn-primary btn-sm">
|
|
<i class="bi bi-caret-down"></i>
|
|
</button>
|
|
|
|
</th>
|
|
<th>Hardware<br>
|
|
<button type="submit" name="sort_method" value="hw-up" class="btn btn-primary btn-sm">
|
|
<i class="bi bi-caret-up"></i>
|
|
</button>
|
|
<button type="submit" name="sort_method" value="hw-down" class="btn btn-primary btn-sm">
|
|
<i class="bi bi-caret-down"></i>
|
|
</button>
|
|
</th>
|
|
<th>Last seen<br>
|
|
<button type="submit" name="sort_method" value="date-up" class="btn btn-primary btn-sm">
|
|
<i class="bi bi-caret-up"></i>
|
|
</button>
|
|
<button type="submit" name="sort_method" value="date-down" class="btn btn-primary btn-sm">
|
|
<i class="bi bi-caret-down"></i>
|
|
</button>
|
|
</th>
|
|
<th>Known<br>
|
|
<button type="submit" name="sort_method" value="known-up" class="btn btn-primary btn-sm">
|
|
<i class="bi bi-caret-up"></i>
|
|
</button>
|
|
<button type="submit" name="sort_method" value="known-down" class="btn btn-primary btn-sm">
|
|
<i class="bi bi-caret-down"></i>
|
|
</button>
|
|
</th>
|
|
</form>
|
|
</tr>
|
|
{{ range .Hosts }}
|
|
<form action="/update_host/" method="post">
|
|
<input name="id" type="hidden" class="form-control" value="{{ .ID }}">
|
|
<tr>
|
|
<td class="align-middle">
|
|
<input name="name" type="text" class="form-control text-dark" value="{{ .Name }}">
|
|
</td>
|
|
<td class="align-middle"><a href="http://{{ .IP }}" target="_blank">{{ .IP }}</a></td>
|
|
<td class="align-middle"><a href="/host?id={{ .ID }}">{{ .Mac }}</a></td>
|
|
<td class="align-middle">{{ .Hw }}</td>
|
|
<td class="align-middle">{{ .Date }}</td>
|
|
<td class="align-middle">
|
|
{{ if eq .Known 1 }}
|
|
<button value="off" name="known" type="submit" class="btn btn-success">Yes</button>
|
|
{{ else }}
|
|
<button value="on" name="known" type="submit" class="btn btn-warning">No</button>
|
|
{{ end }}
|
|
</td>
|
|
</tr>
|
|
</form>
|
|
{{ end }}
|
|
</table>
|
|
</div>
|
|
|
|
{{ template "footer" }}
|
|
{{ end }}
|