From ab4ee5f395145e58553f81c21f36b03c95282823 Mon Sep 17 00:00:00 2001 From: Arthur Date: Fri, 18 Jul 2025 12:17:12 +0200 Subject: [PATCH 1/3] css: refactor styles --- assets/css/utilities.css | 4 ++++ hugo_stats.json | 5 ++++- layouts/partials/md-dropdown.html | 5 ++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/assets/css/utilities.css b/assets/css/utilities.css index cc7f6b3ba1b9..41f87f83640e 100644 --- a/assets/css/utilities.css +++ b/assets/css/utilities.css @@ -237,6 +237,10 @@ @apply flex w-full items-start gap-2 rounded-sm px-2 py-2 text-left text-gray-700 transition-colors hover:bg-gray-50 dark:text-gray-100 dark:hover:bg-gray-800; } +@utility dropdown-base { + @apply rounded-sm border border-gray-300 bg-white text-gray-700 dark:border-gray-300 dark:bg-gray-900 dark:text-gray-100; +} + @utility toc { a { @apply block max-w-full truncate py-1 pl-2 hover:font-medium hover:no-underline; diff --git a/hugo_stats.json b/hugo_stats.json index 2a45252271b8..861a159230b6 100644 --- a/hugo_stats.json +++ b/hugo_stats.json @@ -97,6 +97,8 @@ "Okta", "Okta-SAML", "Old-Dockerfile", + "On-Unix-environments", + "On-Windows", "Other-providers", "PHP", "PowerShell", @@ -193,7 +195,6 @@ "border-gray-200", "border-gray-300", "border-gray-400", - "border-gray-600", "border-green-400", "border-l-2", "border-l-magenta-light", @@ -279,6 +280,7 @@ "download-links", "download-links-subcontainer", "drop-shadow", + "dropdown-base", "duration-300", "fill-blue", "fixed", @@ -578,6 +580,7 @@ "w-2", "w-5", "w-56", + "w-65", "w-8", "w-[1200px]", "w-fit", diff --git a/layouts/partials/md-dropdown.html b/layouts/partials/md-dropdown.html index 86d954ce0e07..7d8839d3ae85 100644 --- a/layouts/partials/md-dropdown.html +++ b/layouts/partials/md-dropdown.html @@ -1,7 +1,6 @@
Page options @@ -14,7 +13,7 @@
+ + + +
@@ -105,6 +131,32 @@ } } + function openInChatGPT() { + fetch(getCurrentPlaintextUrl()) + .then((response) => response.text()) + .then((text) => { + const encodedText = encodeURIComponent(text); + const chatGPTUrl = `https://chat.openai.com/?q=${encodedText}`; + window.open(chatGPTUrl, "_blank"); + }) + .catch((err) => { + console.error("Error opening in ChatGPT:", err); + }); + } + + function openInClaude() { + fetch(getCurrentPlaintextUrl()) + .then((response) => response.text()) + .then((text) => { + const encodedText = encodeURIComponent(text); + const claudeUrl = `https://claude.ai/chat?contextUrl=${currentUrl}`; + window.open(claudeUrl, '_blank'); + }) + .catch((err) => { + console.error("Error opening in Claude:", err); + }); + } + document.addEventListener("click", function (event) { const dropdown = document.getElementById("markdownDropdown"); From f936a9f14ae8ae02fdaa8ff7bae06550ea325c30 Mon Sep 17 00:00:00 2001 From: Arthur Date: Fri, 18 Jul 2025 14:00:48 +0200 Subject: [PATCH 3/3] add icons --- assets/css/utilities.css | 4 ++-- assets/icons/claude.svg | 1 + assets/icons/openai.svg | 1 + layouts/partials/md-dropdown.html | 6 +++--- 4 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 assets/icons/claude.svg create mode 100644 assets/icons/openai.svg diff --git a/assets/css/utilities.css b/assets/css/utilities.css index 41f87f83640e..9b2ec25df0fd 100644 --- a/assets/css/utilities.css +++ b/assets/css/utilities.css @@ -234,11 +234,11 @@ } @utility sub-button { - @apply flex w-full items-start gap-2 rounded-sm px-2 py-2 text-left text-gray-700 transition-colors hover:bg-gray-50 dark:text-gray-100 dark:hover:bg-gray-800; + @apply flex w-full items-center gap-2 rounded-sm px-2 py-2 text-left text-gray-600 transition-colors hover:bg-gray-50 dark:text-gray-100 dark:hover:bg-gray-800; } @utility dropdown-base { - @apply rounded-sm border border-gray-300 bg-white text-gray-700 dark:border-gray-300 dark:bg-gray-900 dark:text-gray-100; + @apply rounded-sm border border-gray-300 bg-white text-gray-600 dark:border-gray-300 dark:bg-gray-900 dark:text-gray-100; } @utility toc { diff --git a/assets/icons/claude.svg b/assets/icons/claude.svg new file mode 100644 index 000000000000..e29f32825727 --- /dev/null +++ b/assets/icons/claude.svg @@ -0,0 +1 @@ +Claude \ No newline at end of file diff --git a/assets/icons/openai.svg b/assets/icons/openai.svg new file mode 100644 index 000000000000..50d94d6c1085 --- /dev/null +++ b/assets/icons/openai.svg @@ -0,0 +1 @@ +OpenAI \ No newline at end of file diff --git a/layouts/partials/md-dropdown.html b/layouts/partials/md-dropdown.html index 44d150cdc38e..3ab319d97ae7 100644 --- a/layouts/partials/md-dropdown.html +++ b/layouts/partials/md-dropdown.html @@ -63,7 +63,7 @@ class="sub-button" > - {{ partial "icon" "search" }} + {{ partial "icon" "/icons/openai.svg" }}
Open in ChatGPT
@@ -76,7 +76,7 @@ class="sub-button" > - {{ partial "icon" "search" }} + {{ partial "icon" "/icons/claude.svg" }}
Open in Claude
@@ -149,7 +149,7 @@ .then((response) => response.text()) .then((text) => { const encodedText = encodeURIComponent(text); - const claudeUrl = `https://claude.ai/chat?contextUrl=${currentUrl}`; + const claudeUrl = `https://claude.ai/new?q=${encodedText}`;https://claude.ai/new?q=%22hey%22 window.open(claudeUrl, '_blank'); }) .catch((err) => {