changing to a css-only solution to tab highlightning

This commit is contained in:
aajjbb 2017-01-03 17:01:04 -02:00
parent 898ea2754f
commit 91b0b2c0a7
6 changed files with 7 additions and 27 deletions

View File

@ -1,6 +1,4 @@
<h1 id="page-id"> # Community
Community
</h1>
**awesome** has an active and growing community. **awesome** has an active and growing community.

View File

@ -1,6 +1,4 @@
<h1 id="page-id"> # Download
Download
</h1>
## Stable ## Stable

BIN
images/screenshots/ss1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

View File

@ -1,8 +1,6 @@
# Home # Home
<h1 id="page-id"> # Home
Home
</h1>
**awesome** is a highly configurable, next generation framework window **awesome** is a highly configurable, next generation framework window
manager for X. It is very fast, extensible and licensed under the manager for X. It is very fast, extensible and licensed under the

View File

@ -117,6 +117,10 @@ blockquote{
width: 100%; width: 100%;
} }
#menu ul {
float: right;
}
#menu ul { #menu ul {
list-style: none; list-style: none;
} }

View File

@ -158,24 +158,6 @@ href="https//awesomewm.org"></a>
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s); g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})(); })();
</script> </script>
<script type="text/javascript">
var ul = document.getElementById("menu-tabs");
var items = ul.getElementsByTagName("li");
var active = document.getElementById("page-id").innerHTML;
for (var i = 0; i < items.length; i++) {
var element = items[i].getElementsByTagName("a")[0];
var sA = element.innerHTML.toLowerCase().trim();
var sB = active.toLowerCase().trim();
if (sA === sB) {
console.log("found");
element.style.color = "black";
}
}
</script>
<noscript><p><img src="https://piwik.awesomewm.org/piwik.php?idsite=26" style="border:0;" alt="" /></p></noscript> <noscript><p><img src="https://piwik.awesomewm.org/piwik.php?idsite=26" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code --> <!-- End Piwik Code -->