summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateja <mail@matejamaric.com>2021-01-28 22:33:56 +0100
committerMateja <mail@matejamaric.com>2021-01-28 22:33:56 +0100
commitfad5048739420150a4bd0eab724c4544bcc8a444 (patch)
tree6d8fe9e39168a6420b32127ba8e2141485ffc5b5
parent6963f58102c368967cb7f0ed3fce5f978493177d (diff)
downloadblog-fad5048739420150a4bd0eab724c4544bcc8a444.tar.gz
blog-fad5048739420150a4bd0eab724c4544bcc8a444.zip
Smart active links.
-rw-r--r--layouts/_default/baseof.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 07a8f32..694d8a0 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -19,11 +19,11 @@
<body>
<nav>
<div class="mm">Mateja Maric</div>
- <a href="/" class="active">Home</a>
- <a href="/blog/">Blog</a>
+ <a class="{{ if eq .URL `/`}}active{{ end }}" href="/">Home</a>
+ <a class="{{ if eq .URL `/blog/`}}active{{ end }}" href="/blog/">Blog</a>
<a href="https://github.com/MatejaMaric">GitHub</a>
<a href="https://git.matejamaric.com">Git server</a>
- <a href="/contact/">Contact</a>
+ <a class="{{ if eq .URL `/contact/`}}active{{ end }}" href="/contact/">Contact</a>
</nav>
<main>
{{ block "main" . }}{{ end }}