Browse Source

Fixed .active hacks in header

mj-deploy
Standa Lukeš 4 years ago
parent
commit
36bd4e4344
  1. 2
      server/Ksp.WebServer/KspPageRewriter.cs

2
server/Ksp.WebServer/KspPageRewriter.cs

@ -40,6 +40,8 @@ namespace Ksp.WebServer
encyklopedie.SetAttribute("href", "/grafik"); encyklopedie.SetAttribute("href", "/grafik");
if ("grafik" == path) if ("grafik" == path)
{ {
foreach (var li in document.QuerySelectorAll("#menu ul li.active"))
li.ClassList.Remove("active");
encyklopedie.ParentElement.ClassList.Add("active"); encyklopedie.ParentElement.ClassList.Add("active");
} }
} }