From 7a08442e734fca04b101471a01bba8cd295379ff Mon Sep 17 00:00:00 2001 From: Pascal Fischer Date: Fri, 26 May 2023 17:35:12 +0200 Subject: [PATCH 1/3] code boxes light --- src/components/Code.jsx | 12 ++++++------ src/styles/tailwind.css | 13 +++++++++++++ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/components/Code.jsx b/src/components/Code.jsx index 602dba23..e1e1d247 100644 --- a/src/components/Code.jsx +++ b/src/components/Code.jsx @@ -64,7 +64,7 @@ function CopyButton({ code }) { 'group/button absolute right-4 top-3.5 overflow-hidden rounded-full py-1 pl-2 pr-3 text-2xs font-medium opacity-0 backdrop-blur transition focus:opacity-100 group-hover:opacity-100', copied ? 'bg-orange-400/10 ring-1 ring-inset ring-orange-400/20' - : 'bg-white/5 hover:bg-white/7.5 dark:bg-white/2.5 dark:hover:bg-white/5' + : 'bg-black/5 dark:bg-white/5 hover:bg-black/7.5 dark:hover:bg-white/7.5 dark:bg-white/2.5 dark:hover:bg-white/5' )} onClick={() => { window.navigator.clipboard.writeText(code).then(() => { @@ -101,7 +101,7 @@ function CodePanelHeader({ tag, label }) { } return ( -
+
{tag && (
{tag} @@ -142,9 +142,9 @@ function CodeGroupHeader({ title, children, selectedIndex }) { } return ( -
+
{title && ( -

+

{title}

)} @@ -156,7 +156,7 @@ function CodeGroupHeader({ title, children, selectedIndex }) { 'border-b py-3 transition focus:[&:not(:focus-visible)]:outline-none', childIndex === selectedIndex ? 'border-orange-500 text-orange-400' - : 'border-transparent text-zinc-400 hover:text-zinc-300' + : 'border-transparent text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300' )} > {getPanelTitle(child.props)} @@ -266,7 +266,7 @@ export function CodeGroup({ children, title, ...props }) { {children} diff --git a/src/styles/tailwind.css b/src/styles/tailwind.css index 3f32aeaa..afd21615 100644 --- a/src/styles/tailwind.css +++ b/src/styles/tailwind.css @@ -1,4 +1,17 @@ :root { + --shiki-color-text: theme('colors.black'); + --shiki-token-constant: theme('colors.orange.600'); + --shiki-token-string: theme('colors.orange.600'); + --shiki-token-comment: theme('colors.zinc.500'); + --shiki-token-keyword: theme('colors.sky.600'); + --shiki-token-parameter: theme('colors.pink.600'); + --shiki-token-function: theme('colors.violet.600'); + --shiki-token-string-expression: theme('colors.orange.600'); + --shiki-token-punctuation: theme('colors.zinc.800'); +} + +/* Dark mode styles */ +:root.dark { --shiki-color-text: theme('colors.white'); --shiki-token-constant: theme('colors.orange.300'); --shiki-token-string: theme('colors.orange.300'); From beb7a3b5d7ac8dfa3129814f7475cf0a68a517ae Mon Sep 17 00:00:00 2001 From: Pascal Fischer Date: Fri, 26 May 2023 17:43:26 +0200 Subject: [PATCH 2/3] change border radius --- src/components/Code.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Code.jsx b/src/components/Code.jsx index e1e1d247..8ad39713 100644 --- a/src/components/Code.jsx +++ b/src/components/Code.jsx @@ -266,7 +266,7 @@ export function CodeGroup({ children, title, ...props }) { {children} From 8cadca7323b1d24518ae6f70002ab1eb89ccec25 Mon Sep 17 00:00:00 2001 From: Pascal Fischer Date: Fri, 26 May 2023 18:54:00 +0200 Subject: [PATCH 3/3] add left padding to ToC --- src/components/Layout.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Layout.jsx b/src/components/Layout.jsx index 2ac08632..b56add6a 100644 --- a/src/components/Layout.jsx +++ b/src/components/Layout.jsx @@ -167,7 +167,7 @@ export function Layout({ children, title, tableOfContents }) {
- {!router.route.startsWith("/ipa/resources") &&
+ {!router.route.startsWith("/ipa/resources") &&