|
1 | 1 | {{ define "head" }} |
2 | 2 |
|
3 | | -{{ $base := .Site.BaseURL }} |
4 | | -{{ $parsed := urls.Parse $base }} |
5 | | -{{ $path := $parsed.Path }} |
6 | | -{{ if (eq $path "/") }} |
7 | | - {{ .Scratch.Set "path" ""}} |
8 | | -{{ else }} |
9 | | - {{ .Scratch.Set "path" $path}} |
10 | | -{{ end }} |
11 | | - |
12 | | -<script src='{{ .Scratch.Get "path" }}/js/cli.js' defer></script> |
| 3 | +<script src='{{ relURL "js/cli.js" }}' defer></script> |
13 | 4 | {{ end }} |
14 | 5 |
|
15 | 6 | {{ define "main" }} |
@@ -48,25 +39,25 @@ <h1 class="text-5xl font-medium">{{ .Title }}</h1> |
48 | 39 | </button> |
49 | 40 | <div id="dropdown" class="hidden lg:block border-t border-opacity-50 border-redis-ink-900 text-redis-pen-800"> |
50 | 41 | <ul class="p-6"> |
51 | | - <li><a class="py-2 hover:underline hover:text-redis-pen-600" href='{{ .Scratch.Get "path" }}/develop'>Develop with Redis</a></li> |
52 | | - <li><a class="py-2 hover:underline hover:text-redis-pen-600" href='{{ .Scratch.Get "path" }}/integrate'>Libraries and tools</a></li> |
53 | | - <li><a class="py-2 hover:underline hover:text-redis-pen-600" href='{{ .Scratch.Get "path" }}/operate'>Redis products</a></li> |
54 | | - <li><a class="py-2 hover:underline hover:text-redis-pen-600" href='{{ .Scratch.Get "path" }}/commands'>Commands</a></li> |
55 | | - <li><a class="py-2 hover:underline hover:text-redis-pen-600" href='{{ .Scratch.Get "path" }}/apis'>APIs</a></li> |
| 42 | + <li><a class="py-2 hover:underline hover:text-redis-pen-600" href='{{ relURL "develop" }}'>Develop with Redis</a></li> |
| 43 | + <li><a class="py-2 hover:underline hover:text-redis-pen-600" href='{{ relURL "integrate" }}'>Libraries and tools</a></li> |
| 44 | + <li><a class="py-2 hover:underline hover:text-redis-pen-600" href='{{ relURL "operate" }}'>Redis products</a></li> |
| 45 | + <li><a class="py-2 hover:underline hover:text-redis-pen-600" href='{{ relURL "commands" }}'>Commands</a></li> |
| 46 | + <li><a class="py-2 hover:underline hover:text-redis-pen-600" href='{{ relURL "apis" }}'>APIs</a></li> |
56 | 47 | </ul> |
57 | 48 | </div> |
58 | 49 | </div> |
59 | 50 | </nav> |
60 | 51 | <nav class="hidden lg:block w-full lg:w-64 z-40 h-full leading-7"> |
61 | 52 | <div class="flex flex-col gap-4"> |
62 | 53 | <div class="flex flex-col border border-redis-ink-900 border-opacity-50 rounded-md"> |
63 | | - <a class="px-6 py-4 rounded-t-md hover:bg-redis-pen-200" href='{{ .Scratch.Get "path" }}/develop'>Develop with Redis</a> |
64 | | - <a class="px-6 py-4 hover:bg-redis-pen-200 border-y border-redis-ink-900 border-opacity-50" href='{{ .Scratch.Get "path" }}/integrate'>Libraries and tools</a> |
65 | | - <a class="px-6 py-4 rounded-b-md hover:bg-redis-pen-200" href='{{ .Scratch.Get "path" }}/operate'>Redis products</a> |
| 54 | + <a class="px-6 py-4 rounded-t-md hover:bg-redis-pen-200" href='{{ relURL "develop" }}'>Develop with Redis</a> |
| 55 | + <a class="px-6 py-4 hover:bg-redis-pen-200 border-y border-redis-ink-900 border-opacity-50" href='{{ relURL "integrate" }}'>Libraries and tools</a> |
| 56 | + <a class="px-6 py-4 rounded-b-md hover:bg-redis-pen-200" href='{{ relURL "operate" }}'>Redis products</a> |
66 | 57 | </div> |
67 | 58 | <div class="flex flex-col border border-redis-ink-900 border-opacity-50 rounded-md"> |
68 | | - <a class="px-6 py-4 rounded-t-md hover:bg-redis-pen-200 text-redis-red-600" href='{{ .Scratch.Get "path" }}/commands'>Commands</a> |
69 | | - <a class="px-6 py-4 rounded-b-md hover:bg-redis-pen-200 border-t border-redis-ink-900 border-opacity-50" href='{{ .Scratch.Get "path" }}/apis'>APIs</a> |
| 59 | + <a class="px-6 py-4 rounded-t-md hover:bg-redis-pen-200 text-redis-red-600" href='{{ relURL "commands" }}'>Commands</a> |
| 60 | + <a class="px-6 py-4 rounded-b-md hover:bg-redis-pen-200 border-t border-redis-ink-900 border-opacity-50" href='{{ relURL "apis" }}'>APIs</a> |
70 | 61 | </div> |
71 | 62 | </div> |
72 | 63 | </nav> |
|
0 commit comments