Fix navbar IPv4/IPv6 active style error

This commit is contained in:
Lan Tian 2020-03-26 23:32:42 +08:00
parent dfd7ea6f2c
commit a6513900e4
No known key found for this signature in database
GPG Key ID: 27F31700E751EC22

View File

@ -47,8 +47,8 @@ func templateHeader(w http.ResponseWriter, r *http.Request, title string) {
// Print the IPv4, IPv6, All Servers link in navbar
var serverNavigation string = `
<li class="nav-item"><a class="nav-link" href="` + ipv4URL + `"` + (map[bool]string{true: " active"})[strings.ToLower(split[0]) == "ipv4"] + `> IPv4 </a></li>
<li class="nav-item"><a class="nav-link" href="` + ipv6URL + `"` + (map[bool]string{true: " active"})[strings.ToLower(split[0]) == "ipv6"] + `> IPv6 </a></li>
<li class="nav-item"><a class="nav-link` + (map[bool]string{true: " active"})[strings.ToLower(split[0]) == "ipv4"] + `" href="` + ipv4URL + `"> IPv4 </a></li>
<li class="nav-item"><a class="nav-link` + (map[bool]string{true: " active"})[strings.ToLower(split[0]) == "ipv6"] + `" href="` + ipv6URL + `"> IPv6 </a></li>
<span class="navbar-text">|</span>
<li class="nav-item">
<a class="nav-link` + (map[bool]string{true: " active"})[serverAllActive] + `" href="` + allURL + `"> All Servers </a>