improvements around
This commit is contained in:
@@ -1,13 +1,3 @@
|
||||
<script>
|
||||
|
||||
window.onload = function(){
|
||||
let activeCategory = window.location.pathname.split("/")[2]
|
||||
if (typeof activeCategory === "undefined") { activeLink = document.getElementById("all") }
|
||||
else { activeLink = document.getElementById(activeCategory)}
|
||||
activeLink.className = activeLink.className.replace("text-black font-normal", "text-black font-semibold");
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<div class="mx-8 md:mx-4 flex flex-col">
|
||||
<div class="lg:pt-24 flex flex-col mb-12 md:mr-24">
|
||||
@@ -34,4 +24,15 @@
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function setActiveCategory() {
|
||||
let activeCategory = window.location.pathname.split("/")[2]
|
||||
if (typeof activeCategory === "undefined") { activeLink = document.getElementById("all") }
|
||||
else { activeLink = document.getElementById(activeCategory)}
|
||||
activeLink.className = activeLink.className.replace("text-black font-normal", "text-black font-semibold");
|
||||
}
|
||||
|
||||
setActiveCategory()
|
||||
</script>
|
Reference in New Issue
Block a user