diff --git a/static/style.css b/static/style.css index 497c6dd..686fef1 100644 --- a/static/style.css +++ b/static/style.css @@ -175,6 +175,10 @@ th { background: var(--surface); font-weight: 600; } /* DEVICE TOOLBAR */ .device-toolbar { display: flex; gap: 0.5em; align-items: center; margin-bottom: 0.5em; } +/* DEVICE IMAGES */ +.device-images { display: flex; gap: 1.5em; margin: 0.8em 0; } +.device-images img.device-img { max-width: 300px; max-height: 250px; border: 1px solid var(--border); border-radius: 4px; display: block; margin-top: 0.3em; } + /* BADGES */ .badge { display: inline-block; padding: 0.1em 0.4em; font-size: 0.75em; border-radius: 3px; background: var(--surface2); } .badge-network { background: #224444; color: var(--green); } diff --git a/templates/device.html b/templates/device.html index 89f3232..565d579 100644 --- a/templates/device.html +++ b/templates/device.html @@ -2,6 +2,10 @@

{{.Device.Name}}

{{if .Error}}
{{.Error}}
{{end}} +{{if .Device.Rack}} + +{{end}} +
{{if .Device.Model}}

Model: {{.Device.Model.Manufacturer}} {{.Device.Model.Name}}

{{end}} {{if .Device.UsageDescription}}

Usage: {{.Device.UsageDescription}}

{{end}} @@ -35,5 +39,25 @@

Ports

+{{if .Device.Model}}{{if or .Device.Model.FrontImage .Device.Model.BackImage}} +
+ {{if .Device.Model.FrontImage}}
Front
Front
{{end}} + {{if .Device.Model.BackImage}}
Back
Back
{{end}} +
+{{end}}{{end}} {{template "port_list" .}} + +
+Rename Ports +
+ {{range .Device.Ports}} +
+ + + {{.Side}} +
+ {{end}} + +
+
{{end}}