Open pkra opened 8 years ago
I'm tending towards client-side JS. From this SO answer a gloriously simple query.
document.querySelectorAll('a[href="'+document.URL.substring(27)+'"]')[0].className = "current";
However, for /
the logo gets in the way.
var url = document.URL.substring(27);
if (url === '/'){
document.querySelectorAll('a[href="'+url+'"]')[1].className = "current";
}
else {
document.querySelectorAll('a[href="'+url+'"]')[0].className = "current";
}
Plus a style for .current
. What do you think?
Gah! Running into specificity issues; need to learn CSS ;-)
Check out https://github.com/mathblogging/mathblogging.org/tree/issue15 for the horror.
As per F2F