-
Notifications
You must be signed in to change notification settings - Fork 0
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 #8 from efergus/dev
Clean up code blocks
- Loading branch information
Showing
18 changed files
with
260 additions
and
55 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 |
---|---|---|
@@ -1,13 +1,33 @@ | ||
<script lang="ts"> | ||
import Highlight from "svelte-highlight"; | ||
import atom from "svelte-highlight/styles/atom-one-dark"; | ||
import js from "svelte-highlight/languages/javascript"; | ||
import xml from "svelte-highlight/languages/xml"; | ||
import css from "svelte-highlight/languages/css"; | ||
import bash from "svelte-highlight/languages/bash"; | ||
import yaml from "svelte-highlight/languages/yaml"; | ||
const languages = { | ||
css, | ||
js, | ||
xml, | ||
html: xml, | ||
bash, | ||
sh: bash, | ||
yaml, | ||
svelte: js, | ||
}; | ||
export let source: string; | ||
export let lang: any; | ||
export let lang: keyof typeof languages; | ||
const language = languages[lang]; | ||
console.log({ lang }); | ||
</script> | ||
|
||
<svelte:head> | ||
{@html atom} | ||
</svelte:head> | ||
|
||
<Highlight language={lang} code={source} /> | ||
<Highlight {language} code={source} /> |
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,20 @@ | ||
<script lang="ts"> | ||
export let size = 24; | ||
export let width = size; | ||
export let height = size; | ||
export let stroke = 2; | ||
</script> | ||
|
||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
{width} | ||
{height} | ||
viewBox="0 0 24 24" | ||
fill="none" | ||
stroke="currentColor" | ||
stroke-width={stroke} | ||
stroke-linecap="round" | ||
stroke-linejoin="round" | ||
class="feather feather-check" | ||
><polyline points="20 6 9 17 4 12"></polyline></svg | ||
> |
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,20 @@ | ||
<script lang="ts"> | ||
export let width = 24; | ||
export let height = width; | ||
</script> | ||
|
||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
{width} | ||
{height} | ||
viewBox="0 0 24 24" | ||
fill="none" | ||
stroke="currentColor" | ||
stroke-width="2" | ||
stroke-linecap="round" | ||
stroke-linejoin="round" | ||
class="feather feather-copy" | ||
><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path | ||
d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" | ||
></path></svg | ||
> |
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,20 @@ | ||
<script lang="ts"> | ||
export let width = 24; | ||
export let height = width; | ||
</script> | ||
|
||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
{width} | ||
{height} | ||
viewBox="0 0 24 24" | ||
fill="none" | ||
stroke="currentColor" | ||
stroke-width="2" | ||
stroke-linecap="round" | ||
stroke-linejoin="round" | ||
class="feather feather-mail" | ||
><path | ||
d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" | ||
></path><polyline points="22,6 12,13 2,6"></polyline></svg | ||
> |
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
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<header> | ||
<label class="dark-mode-toggle"> | ||
<input type="checkbox" class="dark-mode-toggle" /> | ||
Your svg here | ||
Your icon here | ||
</label> | ||
Your header here | ||
The container of the dark mode button here | ||
</header> | ||
<div>The rest of your site here</div> |
Oops, something went wrong.