-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #953 from rainlanguage/2024-10-21-license
Adding license link to sidebar
- Loading branch information
Showing
7 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,32 @@ | ||
<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(); | ||
} | ||
} catch { | ||
source = ''; | ||
} | ||
}); | ||
</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> |