aboutsummaryrefslogtreecommitdiff
path: root/src/views/layout.ecr
blob: 9a3eeebb04bcbc0f96e406304cf9947bcde7118b (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title> <%= page_title %> | {indrajith.dev}</title>
    <link rel="stylesheet" href="/css/styles.css">
    <script src="https://unpkg.com/htmx.org@2.0.0"></script>
    <link rel="icon" href="/favicon.ico">
    <link rel="me" href="https://mastodon.social/@indrajithkl">
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">
</head>
<body>
    <header class="header">
        <h1>
            <a class="logo" href="/">indrajith.dev</a>
        </h1>
        <h4 class="slogan">(Software is Art)</h4>
        <nav>
            <ul>
                <li><a href="/" id="home" class="hvr-underline-reveal links">home</a></li>
                <li><a href="/blog" class="hvr-underline-reveal links" id="blog">blog</a></li>
                <li><a href="/timeline" class="hvr-underline-reveal links" id="timeline">timeline</a></li>
                <li><a href="/about"  class="hvr-underline-reveal links" id="about">about</a></li>
                <li><a href="https://git.indrajith.dev" class="hvr-underline-reveal links" id="git">git</a></li>
                <li><a href="/contact" id="contact" class="links hvr-underline-reveal">contact</a></li>
                <!-- <li><a href="/feed.xml" id="cv" class="links hvr-underline-reveal">feed</a></li> -->
            </ul>
        </nav>
        <hr>
    </header>

    <main id="content" hx-ext="response-targets">        
        <%- if published_at -%>
            <div>
                <%= published_at %>
            </div>
        <%- else -%>
        <%- end -%>
        <%= content %>
    </main>

    <footer>
        <hr>
        <ul>
            <li>
                <p>&copy; 2024 Indrajith K L </p>
            </li>
        </ul>
        <img src="/images/indrajith.dev.gif" class="etyone" alt="">
    </footer>
    <script>
    (function(){
        const currentLocation = location.pathname;
        if (currentLocation=="/") {
            document.getElementById("home").parentElement.classList.add("text-lightish-50");
        } else {
            const navs = ["about","blog","timeline", "contact"];
            const currentNav = navs.find(nav=>currentLocation.includes(nav));
            if (currentNav) {
                document.getElementById(currentNav).parentElement.classList.add("text-lightish-50");
            }
        }
        
    })();
    </script>
</body>
</html>