From 2c16c8bc117657242f84ac983c721f70a4b78bea Mon Sep 17 00:00:00 2001 From: Mahmoud Emad Date: Tue, 13 May 2025 10:20:07 +0300 Subject: [PATCH] feat: Improve IPFS demo integration and display - Removed the unnecessary `handleDemoButtonClick` function. - Improved the layout and presentation of the IPFS demo section. - Updated the styling of the error message in MarkdownContent. - Changed the text color of the markdown content to green. --- sweb/src/components/Home.svelte | 62 +++++++++++----------- sweb/src/components/MarkdownContent.svelte | 4 +- 2 files changed, 34 insertions(+), 32 deletions(-) diff --git a/sweb/src/components/Home.svelte b/sweb/src/components/Home.svelte index c578844..76030f9 100644 --- a/sweb/src/components/Home.svelte +++ b/sweb/src/components/Home.svelte @@ -10,43 +10,45 @@ // Flag to show IPFS demo let showIPFSDemo = false; - - function handleDemoButtonClick() { - console.log("Hello"); - showIPFSDemo = !showIPFSDemo; - }
-
-

- IPFS Integration -

-

- Experience the power of decentralized content storage and retrieval - with IPFS. -

- -
- -
-
- - {#if showIPFSDemo} -
- -
- {:else if contentPath && contentPath.trim() !== ""} + {#if contentPath && contentPath.trim() !== ""}
+ {:else} + +
+
+

+ IPFS Integration +

+

+ Experience the power of decentralized content storage and + retrieval with IPFS. +

+ +
+ +
+
+ + {#if showIPFSDemo} + + {/if} +
{/if}
diff --git a/sweb/src/components/MarkdownContent.svelte b/sweb/src/components/MarkdownContent.svelte index 0796162..d2490f1 100644 --- a/sweb/src/components/MarkdownContent.svelte +++ b/sweb/src/components/MarkdownContent.svelte @@ -160,11 +160,11 @@

Loading content...

{:else if error} -
+

Error: {error}

{:else} -
+
{@html content}
{/if}