From bc2903d34aa55e4752dd6226380a78fa815fb1de Mon Sep 17 00:00:00 2001 From: Sangeeth Sudheer Date: Fri, 5 Apr 2024 05:13:02 +0530 Subject: [PATCH] doc: fix example snippet md --- README.md | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 97c754c..f73c7ce 100644 --- a/README.md +++ b/README.md @@ -17,39 +17,39 @@ Settings), enable the plugin and then restart Obsidian. To create a new Swarnam block, you need to open a block code snippet and give it the `swarnam` tag like so: -```swarnam -

Hello, world

-``` + ```swarnam +

Hello, world

+ ``` When you preview this, it'll show the source and render the HTML side-by-side. You can hover on the top-right and click the `` icon to edit the snippet to make some changes. You can also add CSS and JS by separating them with `---*---` like so: -```swarnam -

Hello world

+ ```swarnam +

Hello world

----*--- + ---*--- -h1 { - font-family: "Manjari"; - color: red; - animation: rainbow 5s ease infinite forwards; -} + h1 { + font-family: "Manjari"; + color: red; + animation: rainbow 5s ease infinite forwards; + } -@keyframes rainbow { - 0% { filter: hue-rotate(0); } - 100% { filter: hue-rotate(360deg); } -} + @keyframes rainbow { + 0% { filter: hue-rotate(0); } + 100% { filter: hue-rotate(360deg); } + } ----*--- + ---*--- -let i = 0; + let i = 0; -setInterval(() => { - h1.textContent = `${["Hello", "Hola", "നമസ്കാരം"][i++ % 3]} Obsidian!`; -}, 1500) -``` + setInterval(() => { + h1.textContent = `${["Hello", "Hola", "നമസ്കാരം"][i++ % 3]} Obsidian!`; + }, 1500) + ``` This'll render the three snippets on the left side and show the preview of a web page that has all these 3 blocks injected.