diff options
| author | a73x <[email protected]> | 2024-09-03 08:16:46 +0100 |
|---|---|---|
| committer | a73x <[email protected]> | 2024-09-03 08:16:46 +0100 |
| commit | 1c0e1cc8c6a51457907ce028599c2bcad82d0bfd (patch) | |
| tree | 1c1e8436cef1fbb4724b88731afe2ddd5d40ad74 /templates/layouts | |
| parent | 94392c082192b1fc69fda2954e7b60eb0b741a72 (diff) | |
feat(html): nav underlines if page selected
Diffstat (limited to 'templates/layouts')
| -rw-r--r-- | templates/layouts/_default.html | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/templates/layouts/_default.html b/templates/layouts/_default.html index 0762919..09b2239 100644 --- a/templates/layouts/_default.html +++ b/templates/layouts/_default.html @@ -18,6 +18,10 @@ font-style: normal; } + .no-decorations { + text-decoration: none; + } + code:not(pre > code) { background-color: #f0f0f0; padding: 0.2em 0.4em; @@ -52,16 +56,23 @@ } </style> </head> - <body> - <h2>a73x</h2> + <h1>a73x</h1> <sub>high effort, low reward</sub> <nav> <ul> + {{ if eq .Path "index" }} <li><a href="/">home</a></li> + {{else}} + <li><a class="no-decorations" href="/">home</a></li> + {{end}} {{ range $key, $value := .Collections }} {{if ne $key "all"}} + {{ if eq $.Path $key }} <li><a href="/{{$key}}">{{$key}}</a></li> + {{else}} + <li><a class="no-decorations" href="/{{$key}}">{{$key}}</a></li> + {{end}} {{end}} {{end}} </ul> |
