goipam/web/templates/index.templ

43 lines
1.0 KiB
Plaintext
Raw Normal View History

2024-02-22 20:52:37 +01:00
package templates
import "fmt"
templ Index(metaContent MetaContent, counters IndexCounts) {
@wrapBase(metaContent, "GoIPAM") {
2024-02-22 20:52:37 +01:00
<div class="section is-centered">
<div class="container">
@indexStats(counters)
</div>
</div>
}
}
templ indexStats(counters IndexCounts) {
<div class="level mt-5 box">
<div class="level-item has-text-centered">
2024-02-23 11:22:28 +01:00
<a href="/subnets/">
2024-02-22 20:52:37 +01:00
<p class="heading">Subnets</p>
<p class="title">{ fmt.Sprint(counters.SubnetCount) }</p>
2024-02-23 11:22:28 +01:00
</a>
2024-02-22 20:52:37 +01:00
</div>
<div class="level-item has-text-centered">
2024-02-23 11:22:28 +01:00
<a href="/addresses/">
2024-02-22 20:52:37 +01:00
<p class="heading">Addresses</p>
<p class="title">{ fmt.Sprint(counters.AddressCount) }</p>
2024-02-23 11:22:28 +01:00
</a>
2024-02-22 20:52:37 +01:00
</div>
<div class="level-item has-text-centered">
2024-02-23 11:22:28 +01:00
<a href="/devices/">
2024-02-22 20:52:37 +01:00
<p class="heading">Devices</p>
<p class="title">{ fmt.Sprint(counters.DeviceCount) }</p>
2024-02-23 11:22:28 +01:00
</a>
2024-02-22 20:52:37 +01:00
</div>
<div class="level-item has-text-centered">
2024-02-23 11:22:28 +01:00
<a href="/locations/">
2024-02-22 20:52:37 +01:00
<p class="heading">Locations</p>
<p class="title">{ fmt.Sprint(counters.LocationCount) }</p>
2024-02-23 11:22:28 +01:00
</a>
2024-02-22 20:52:37 +01:00
</div>
</div>
}