Skip to content

Commit 7309594

Browse files
add chatgpt option back, move to aside
1 parent 9b4b43f commit 7309594

File tree

5 files changed

+18
-21
lines changed

5 files changed

+18
-21
lines changed

hugo_stats.json

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@
188188
"dark:bg-background-dark",
189189
"dark:bg-blue-dark",
190190
"dark:bg-blue-dark-400",
191-
"dark:bg-gray-800",
192191
"dark:bg-gray-dark-100",
193192
"dark:bg-gray-dark-200",
194193
"dark:bg-gray-dark-300",
@@ -217,7 +216,6 @@
217216
"dark:from-blue-dark-400",
218217
"dark:from-gray-dark-100",
219218
"dark:hidden",
220-
"dark:hover:bg-blue-500",
221219
"dark:hover:bg-blue-dark",
222220
"dark:hover:bg-blue-dark-500",
223221
"dark:hover:bg-gray-dark-200",
@@ -291,7 +289,6 @@
291289
"h-16",
292290
"h-2",
293291
"h-32",
294-
"h-4",
295292
"h-48",
296293
"h-6",
297294
"h-8",
@@ -303,7 +300,6 @@
303300
"hidden",
304301
"hidden'",
305302
"highlight",
306-
"hover:bg-blue-600",
307303
"hover:bg-blue-light-400",
308304
"hover:bg-gray-light-100",
309305
"hover:bg-gray-light-200",
@@ -419,7 +415,6 @@
419415
"overflow-y-auto",
420416
"p-1",
421417
"p-2",
422-
"p-3",
423418
"p-4",
424419
"p-6",
425420
"p-8",
@@ -445,7 +440,6 @@
445440
"pt-4",
446441
"px-1",
447442
"px-2",
448-
"px-3",
449443
"px-4",
450444
"px-6",
451445
"py-1",
@@ -457,20 +451,16 @@
457451
"right-0",
458452
"right-3",
459453
"right-8",
460-
"ring-1",
461454
"ring-2",
462455
"ring-[1.5px]",
463-
"ring-black",
464456
"ring-blue-light-400",
465457
"ring-gray-light-200",
466-
"ring-opacity-5",
467458
"rotate-45",
468459
"rounded",
469460
"rounded-[6px]",
470461
"rounded-b-lg",
471462
"rounded-full",
472463
"rounded-lg",
473-
"rounded-md",
474464
"rounded-sm",
475465
"scale-50",
476466
"scale-75",
@@ -481,7 +471,6 @@
481471
"self-start",
482472
"shadow",
483473
"shadow-lg",
484-
"shadow-sm",
485474
"sm:block",
486475
"sm:flex",
487476
"sm:flex-row",
@@ -490,7 +479,6 @@
490479
"sm:w-full",
491480
"space-x-2",
492481
"space-y-2",
493-
"space-y-3",
494482
"space-y-4",
495483
"sticky",
496484
"svg-container",
@@ -540,9 +528,6 @@
540528
"underline-offset-2",
541529
"uppercase",
542530
"w-2",
543-
"w-4",
544-
"w-64",
545-
"w-72",
546531
"w-8",
547532
"w-[1200px]",
548533
"w-[32px]",

layouts/partials/aside.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@
1212
</div>
1313
{{- end }}
1414
{{- end }}
15-
</aside>
15+
<span>{{ partial "llms-dropdown.html" }}</span>
16+
</aside>

layouts/partials/content-default.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ <h1 data-pagefind-weight="10" class="scroll-mt-36">{{ .Title }}</h1>
88
<hr />
99
</div>
1010
{{ .Content }}
11-
{{ partial "llms-dropdown.html" . }}
1211
</article>
1312
<div class="hidden flex-1 min-w-52 lg:block -mr-8 -mt-8">
1413
{{ partial "aside.html" . }}

layouts/partials/llms-dropdown.html

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,15 @@
2222
<div class="text-gray-500 dark:text-gray-400">View this page as plain text</div>
2323
</div>
2424
<div>
25-
<button onclick="openInDocsAI()" class="text-left text-blue-500 hover:text-blue-600 font-semibold">Open in Docker Docs AI</button>
26-
<div class="text-gray-500 dark:text-gray-400">Ask questions about this page with Docker Docs AI</div>
25+
<button onclick="openInDocsAI()" class="text-left text-blue-500 hover:text-blue-600 font-semibold">Search Docs AI</button>
26+
<div class="text-gray-500 dark:text-gray-400">Ask questions with Docs AI</div>
27+
</div>
28+
<div>
29+
<button onclick="openInChatGPT()" class="text-left text-blue-500 hover:text-blue-600 font-semibold">Open in ChatGPT</button>
30+
<div class="text-gray-500 dark:text-gray-400">Ask questions about this page with ChatGPT</div>
2731
</div>
2832
</div>
33+
</div>
2934
</details>
3035
</div>
3136

@@ -55,7 +60,14 @@
5560
if (kapaButton) {
5661
kapaButton.click();
5762
} else {
58-
alert("Couldn't find the DocsAI button.");
63+
alert("Couldn't find the Docs AI button.");
5964
}
6065
}
66+
67+
function openInChatGPT() {
68+
const markdownURL = getCurrentPlaintextUrl();
69+
const prompt = `Read ${markdownURL} so I can ask questions about it`;
70+
const chatGPTUrl = `https://chat.openai.com/?model=gpt-4&prompt=${encodeURIComponent(prompt)}`;
71+
window.open(chatGPTUrl, '_blank');
72+
}
6173
</script>

layouts/partials/sidebar/sections.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,4 @@
104104
{{- with .Params.sidebar.badge }}
105105
<span>{{- partial "components/badge.html" (dict "color" .color "content" .text) }}</span>
106106
{{- end }}
107-
{{ end }}
107+
{{ end }}

0 commit comments

Comments
 (0)