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").
59 lines
2.9 KiB
HTML
59 lines
2.9 KiB
HTML
{{ define "header"}}
|
|
<html lang="en" data-bs-theme="{{ .Config.Color }}">
|
|
<head>
|
|
<title>Watch Your LAN</title>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<!--Favicon-->
|
|
<link href="data:image/x-icon;base64,{{ .Config.Icon }}" rel="icon" type="image/x-icon" />
|
|
{{ if eq .Config.NodePath "" }}
|
|
<!-- Bootstrap and theme -->
|
|
<link href="https://cdn.jsdelivr.net/npm/bootswatch@5.3.0/dist/{{ .Config.Theme }}/bootstrap.min.css" rel="stylesheet">
|
|
<!-- Font for icons -->
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css">
|
|
{{ else }}
|
|
<link rel="stylesheet" href="{{ .Config.NodePath }}/node_modules/bootstrap-icons/font/bootstrap-icons.css">
|
|
<link href="{{ .Config.NodePath }}/node_modules/bootswatch/dist/{{ .Config.Theme }}/bootstrap.min.css" rel="stylesheet">
|
|
{{ end }}
|
|
</head>
|
|
<body>
|
|
<nav class="navbar navbar-expand-sm navbar-dark bg-primary">
|
|
<div class="container-lg">
|
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarContent" aria-controls="navbarContent" aria-expanded="false" aria-label="Toggle navigation">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
<div class="collapse navbar-collapse" id="navbarContent">
|
|
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
|
|
<li class="nav-item">
|
|
<a class="nav-link active" href="/">Home</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link active" href="/line?state=on">Online</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link active" href="/line?state=off">Offline</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link active" href="/history/">History</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link active" href="/config/">Config</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link active" href="/auth_conf/">Auth</a>
|
|
</li>
|
|
{{ if .Config.Auth }}
|
|
<li class="nav-item">
|
|
<a class="nav-link active" href="/login/?logout=yes">Log Out</a>
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
<form action="/search_hosts/" method="post" class="d-flex mb-0">
|
|
<input name="search" type="text" class="form-control text-dark me-2" placeholder="Search">
|
|
<button type="submit" class="btn btn-primary">Search</button>
|
|
</form>
|
|
</div>
|
|
<a class="ms-auto" target="_blank" href="https://github.com/aceberg/WatchYourLAN"><i class="bi bi-github" style="font-size: 2rem;"></i></a>
|
|
</div>
|
|
</nav>
|
|
{{ end }}
|