-
Notifications
You must be signed in to change notification settings - Fork 3
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
1 parent
2af21c0
commit eca97f1
Showing
1 changed file
with
1 addition
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"name":"Markdown from Github","code":{"js":"import Icon from \"@iconify/svelte/dist/Icon.svelte\";\nimport showdown from \"showdown\";\n\nconst converter = new showdown.Converter();\n\nlet content;\nasync function get_content(url) {\n const markdown = await fetch(url).then(res => res.text());\n const converted = converter.makeHtml(markdown);\n content = converted;\n}\n$: get_content(github_markdown_file_url);\n","css":".markdown-content {\n padding: 0;\n margin: initial;\n\n :global(h1) {\n font-size: 2rem;\n font-weight: 500;\n }\n\n :global(h2) {\n font-size: 1.5rem;\n font-weight: 400;\n margin-top: 1rem;\n }\n\n :global(h3) {\n font-size: 1.25rem;\n font-weight: 400;\n margin-top: 0.75rem;\n }\n\n :global(h4) {\n font-size: 1.125rem;\n font-weight: 400;\n margin-top: 0.25rem;\n }\n\n :global(ul) {\n list-style: disc;\n padding-left: 1rem;\n margin-block: 1rem;\n }\n\n :global(img) {\n width: 100%;\n margin: 1rem 0;\n }\n\n :global(hr) {\n margin: 4rem 0;\n border-color: var(--border-color);\n }\n}\n","html":"<section class=\"section-container\">\n <main class=\"markdown-content\">\n {#if content}\n {@html content}\n {:else}\n <Icon icon=\"line-md:loading-twotone-loop\" />\n {/if}\n </main>\n</section>\n"},"fields":[{"id":"uhpao","key":"github_markdown_file_url","type":"url","label":"Github Markdown File URL","fields":[],"options":{},"is_static":false}],"content":{"en":{"github_markdown_file_url":"https://raw.githubusercontent.com/primocms/docs/main/development.md"}},"created_at":"2023-07-01T16:36:57.226877+00:00","id":"b3734416-e151-4979-839d-a75b43aca1f4","site":"cd39839c-d242-4652-b902-768f8e669563"} |