-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create new page for the license
- Loading branch information
Showing
5 changed files
with
63 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<script> | ||
import Heading from './Heading.svelte'; | ||
import Markdown from 'svelte-markdown'; | ||
import { onMount } from 'svelte'; | ||
import Text from './Text.svelte'; | ||
import BlockQuote from './BlockQuote.svelte'; | ||
let source = ''; | ||
onMount(async () => { | ||
try { | ||
const response = await fetch( | ||
'https://raw.githubusercontent.com/rainlanguage/decentralicense/refs/heads/master/README.md', | ||
); | ||
if (response.ok) { | ||
source = await response.text(); | ||
} else { | ||
console.error('Failed to fetch license content'); | ||
} | ||
} catch (error) { | ||
console.error('Error fetching license content:', error); | ||
} | ||
}); | ||
</script> | ||
|
||
<Markdown | ||
{source} | ||
renderers={{ | ||
text: Text, | ||
heading: Heading, | ||
blockquote: BlockQuote, | ||
}} | ||
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<blockquote class="p-2 py-1"><slot /></blockquote> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<script> | ||
export let depth; | ||
</script> | ||
|
||
{#if depth === 1} | ||
<div class="mb-4 text-4xl font-medium dark:text-white"><slot /></div> | ||
{:else if depth === 2} | ||
<div class="my-4 text-2xl font-medium dark:text-white"><slot /></div> | ||
{:else if depth === 3} | ||
<div class="my-4 text-xl font-medium dark:text-white"><slot /></div> | ||
{:else if depth === 4} | ||
<div class="my-4 text-lg font-medium dark:text-white"><slot /></div> | ||
{:else if depth === 5} | ||
<h5><slot /></h5> | ||
{:else if depth === 6} | ||
<h6><slot /></h6> | ||
{:else} | ||
<slot /> | ||
{/if} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<script> | ||
export let text; | ||
text; | ||
export let raw; | ||
raw; | ||
</script> | ||
|
||
<div class="my-2 mb-3"><slot /></div> |