aboutsummaryrefslogtreecommitdiff
path: root/src/_includes/partials/header.njk
blob: 0f27845836ccc7d766c7a97ae256143b5819275d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<header class="header">
    <h1><a class="logo" href="/">indrajith.dev</a></h1>
    <nav>
        <ul>
            <li><a href="/about" id="about" class="links">About</a></li>
            |
            <li><a href="/posts" id="posts" class="links">Posts</a></li>
            |
            <li><a href="/timeline" id="cv" class="links">Timeline</a></li>
            |
            <li><a href="https://git.indrajith.dev" id="cv" class="links">git</a></li>
            |
            <li><a href="/contact" id="cv" class="links">Contact</a></li>
        </ul>

    </nav>
</header>

<script>
(function(){
    const currentLocation = location.pathname;
    const navs = ["about","posts","cv"];
    const currentNav = navs.find(nav=>currentLocation.includes(nav));
    if (currentNav) {
        document.getElementById(currentNav).parentElement.classList.add("text-lightish-50");
    }
})();
</script>