Skip to content

Commit bda1c3e

Browse files
authored
site: add tooltip for gordon header btn (#24378)
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2 parents cfe318e + e0b858a commit bda1c3e

1 file changed

Lines changed: 23 additions & 10 deletions

File tree

layouts/_partials/header.html

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,29 @@
4747
</div>
4848
<div id="buttons" class="flex min-w-0 items-center justify-end flex-shrink-0">
4949
<div class="flex items-center gap-2">
50-
<button
51-
x-data
52-
@click="$store.gordon.toggle()"
53-
class="cursor-pointer flex items-center gap-2 p-2 rounded-lg bg-blue-700 border border-blue-500 text-white transition-colors focus:outline-none focus:ring focus:ring-blue-400 shimmer open-kapa-widget"
54-
>
55-
<span class="icon-svg">
56-
{{ partial "utils/svg.html" "/icons/sparkle.svg" }}
57-
</span>
58-
<span class="hidden px-1 lg:inline">Gordon</span>
59-
</button>
50+
<div data-tooltip-wrapper class="relative">
51+
<button
52+
x-data
53+
@click="$store.gordon.toggle()"
54+
aria-label="Ask Gordon, AI assistant"
55+
aria-describedby="gordon-tooltip"
56+
class="cursor-pointer flex items-center gap-2 p-2 rounded-lg bg-blue-700 border border-blue-500 text-white transition-colors focus:outline-none focus:ring focus:ring-blue-400 shimmer open-kapa-widget"
57+
>
58+
<span class="icon-svg">
59+
{{ partial "utils/svg.html" "/icons/sparkle.svg" }}
60+
</span>
61+
<span class="hidden px-1 lg:inline">Gordon</span>
62+
</button>
63+
<div
64+
id="gordon-tooltip"
65+
data-tooltip-body
66+
class="absolute top-0 left-0 hidden whitespace-nowrap rounded-sm bg-gray-900 p-2 text-sm text-white"
67+
role="tooltip"
68+
>
69+
Ask Gordon — AI assistant for Docker docs
70+
<div data-tooltip-arrow class="absolute h-2 w-2 rotate-45 bg-gray-900"></div>
71+
</div>
72+
</div>
6073

6174
<div id="search-bar-container">
6275
{{ partialCached "search-bar.html" "-" }}

0 commit comments

Comments
 (0)