Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
mateomorris authored Jul 1, 2023
1 parent 2af21c0 commit eca97f1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions assets/Markdown from Github.json
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"}

0 comments on commit eca97f1

Please sign in to comment.