From 1f319d60d2f2e1cf1f538b0745ac3af2ff0e4dad Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Wed, 20 Sep 2023 11:25:10 +0200 Subject: [PATCH 1/2] feat: markdoc theme components --- src/markdoc/tags/Only_Dark.svelte | 1 + src/markdoc/tags/Only_Light.svelte | 1 + src/markdoc/tags/_Module.svelte | 2 ++ 3 files changed, 4 insertions(+) create mode 100644 src/markdoc/tags/Only_Dark.svelte create mode 100644 src/markdoc/tags/Only_Light.svelte diff --git a/src/markdoc/tags/Only_Dark.svelte b/src/markdoc/tags/Only_Dark.svelte new file mode 100644 index 0000000000..c24490115a --- /dev/null +++ b/src/markdoc/tags/Only_Dark.svelte @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/markdoc/tags/Only_Light.svelte b/src/markdoc/tags/Only_Light.svelte new file mode 100644 index 0000000000..81883a21be --- /dev/null +++ b/src/markdoc/tags/Only_Light.svelte @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/markdoc/tags/_Module.svelte b/src/markdoc/tags/_Module.svelte index d66398d76a..819d45e48a 100644 --- a/src/markdoc/tags/_Module.svelte +++ b/src/markdoc/tags/_Module.svelte @@ -5,4 +5,6 @@ export { default as Tabs } from './Tabs.svelte'; export { default as TabsItem } from './TabsItem.svelte'; export { default as Icon } from './Icon.svelte'; + export { default as Only_Light } from './Only_Light.svelte'; + export { default as Only_Dark } from './Only_Dark.svelte'; From a5b1a75ee53a52fba297244ae01e91a374c52a9d Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Wed, 20 Sep 2023 11:25:17 +0200 Subject: [PATCH 2/2] fix: images in tables --- CONTENT.md | 7 +++++++ src/markdoc/nodes/Image.svelte | 2 +- src/routes/docs/test/article/+page.markdoc | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CONTENT.md b/CONTENT.md index a7978731b9..3a815f6745 100644 --- a/CONTENT.md +++ b/CONTENT.md @@ -184,3 +184,10 @@ Lorem ipsum dolor sit amet consectetur. ``` {% icon icon="github" /%} ``` + +#### Only Light/Dark Theme + +``` +{% only_dark %}I am only shown in Dark Theme{% /only_dark %} +{% only_dark %}I am only shown in Light Theme{% /only_dark %} +``` diff --git a/src/markdoc/nodes/Image.svelte b/src/markdoc/nodes/Image.svelte index 8c2456f05a..9b22fb9778 100644 --- a/src/markdoc/nodes/Image.svelte +++ b/src/markdoc/nodes/Image.svelte @@ -9,7 +9,7 @@ {#if inTable} - + {:else}
diff --git a/src/routes/docs/test/article/+page.markdoc b/src/routes/docs/test/article/+page.markdoc index 4394269017..4ddcbeb5b5 100644 --- a/src/routes/docs/test/article/+page.markdoc +++ b/src/routes/docs/test/article/+page.markdoc @@ -150,6 +150,7 @@ Lorem ipsum dolor sit amet consectetur. Id nisi quam nisl iaculis semper nibh eg ## Sub title +{% multicode %} ```js const sdk = require('node-appwrite');