-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
103 additions
and
1 deletion.
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
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,36 @@ | ||
<script lang="ts"> | ||
import { mdiInformationVariantCircle } from '@mdi/js'; | ||
import { Button, Dialog, Toggle } from 'svelte-ux'; | ||
import type { Readable } from 'svelte/store'; | ||
import Markdown from 'svelte-exmarkdown'; | ||
import NewTabLinkRenderer from './NewTabLinkRenderer.svelte'; | ||
import { onMount } from 'svelte'; | ||
export let text: Readable<string>; | ||
let toggle: Toggle; | ||
onMount(() => { | ||
if (!localStorage.getItem('suppressAbout')) { | ||
toggle.on = true; | ||
localStorage.setItem('suppressAbout', 'true'); | ||
} | ||
}); | ||
</script> | ||
|
||
<Toggle bind:this={toggle} let:on={open} let:toggleOn let:toggleOff> | ||
<Button on:click={toggleOn} size="sm" variant="outline" icon={mdiInformationVariantCircle}> | ||
<div class="hidden sm:contents"> | ||
About | ||
</div> | ||
</Button> | ||
<Dialog {open} on:close={toggleOff} class="w-[700px]"> | ||
<div class="m-6 prose"> | ||
<Markdown md={$text} plugins={[{ renderer: { a: NewTabLinkRenderer } }]} /> | ||
</div> | ||
<div class="flex-grow"></div> | ||
<div slot="actions"> | ||
<Button>Close</Button> | ||
</div> | ||
</Dialog> | ||
</Toggle> |
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,16 @@ | ||
<script lang="ts"> | ||
export let href: string; | ||
export let title: string | undefined = undefined; | ||
</script> | ||
|
||
<a {href} {title} target="_blank" class="external-link link link-hover"> | ||
<!-- prevents the link from ever being at the very beginning of a new line --> | ||
<slot /> <span class="i-mdi-open-in-new external-link-icon" /> | ||
</a> | ||
|
||
<style> | ||
.external-link-icon { | ||
margin-bottom: -0.7%; | ||
font-size: 0.9em; | ||
} | ||
</style> |
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