diff --git a/README.md b/README.md index 919433a..c5dddd6 100644 --- a/README.md +++ b/README.md @@ -109,10 +109,10 @@ import Example from "$components/helpers/Example.svelte"; * `ButtonSet.svelte`: Accessible button group inputs. * `Chunk.svelte`: Split text into smaller dom element chunks. -* `CMS.svelte`: Rendering template for Google Docs-driven CMS. * `Countdown.svelte`: Countdown timer text. * `DarkModeToggle.svelte`: A toggle button for dark mode. * `Figure.svelte`: A barebones chart figure component to handle slots. +* `MicroCMS.svelte`: Rendering template for Google Docs-driven CMS. * `MotionToggle.svelte`: A toggle button to enable/disable front-end user motion preference. * `Range.svelte`: Customizable range slider. * `Scrolly.svelte`: Scrollytelling. diff --git a/src/components/demo/Demo.CMS.svelte b/src/components/demo/Demo.CMS.svelte deleted file mode 100644 index 4c8dcf6..0000000 --- a/src/components/demo/Demo.CMS.svelte +++ /dev/null @@ -1,14 +0,0 @@ - - -
-

CMS

- -
diff --git a/src/components/demo/Demo.CMS.Test.svelte b/src/components/demo/Demo.MicroCMS.Test.svelte similarity index 100% rename from src/components/demo/Demo.CMS.Test.svelte rename to src/components/demo/Demo.MicroCMS.Test.svelte diff --git a/src/components/demo/Demo.MicroCMS.svelte b/src/components/demo/Demo.MicroCMS.svelte new file mode 100644 index 0000000..1beb0e5 --- /dev/null +++ b/src/components/demo/Demo.MicroCMS.svelte @@ -0,0 +1,30 @@ + + +
+

Micro CMS

+

+ Turn a Google Doc with a mix of text, html elements, and svelte components: +

+ +
{googleDoc}
+
+

Into this:

+ +
+ + diff --git a/src/components/demo/Demo.svelte b/src/components/demo/Demo.svelte index fe14b89..389deef 100644 --- a/src/components/demo/Demo.svelte +++ b/src/components/demo/Demo.svelte @@ -8,7 +8,7 @@ import DemoSortTable from "$components/demo/Demo.SortTable.svelte"; import DemoSvelteElement from "$components/demo/Demo.SvelteElement.svelte"; import DemoSvelteComponent from "$components/demo/Demo.SvelteComponent.svelte"; - import DemoCMS from "$components/demo/Demo.CMS.svelte"; + import DemoMicroCMS from "$components/demo/Demo.MicroCMS.svelte"; import DemoFigure from "$components/demo/Demo.Figure.svelte"; import DemoTip from "$components/demo/Demo.Tip.svelte"; import DemoScrolly from "$components/demo/Demo.Scrolly.svelte"; @@ -20,7 +20,7 @@ - + diff --git a/src/components/helpers/CMS.svelte b/src/components/helpers/MicroCMS.svelte similarity index 100% rename from src/components/helpers/CMS.svelte rename to src/components/helpers/MicroCMS.svelte diff --git a/src/data/copy.json b/src/data/copy.json index 6b2b188..2422c16 100644 --- a/src/data/copy.json +++ b/src/data/copy.json @@ -1 +1 @@ -{"meta":{"title":"Title TK","description":"Description tk."},"body":[{"section":"intro","content":[{"type":"h4","value":"An h4 element with no attributes"},{"type":"text","value":"Some random text text here, followed by an img tag."},{"type":"img","value":{"src":"assets/demo/test.jpg","alt":"A cat"}},{"type":"Test","value":{"label":"I’m a custom component!","value":"50"}}]}]} \ No newline at end of file +{"meta":{"title":"Title TK","description":"Description tk."},"body":[{"section":"intro","content":[{"type":"h4","value":"An h4 element with no attributes"},{"type":"text","value":"Some random text here, followed by an img tag."},{"type":"img","value":{"src":"assets/demo/test.jpg","alt":"A cat"}},{"type":"Test","value":{"label":"I’m a custom component!","value":"50"}}]}]} \ No newline at end of file diff --git a/src/data/google-doc.txt b/src/data/google-doc.txt new file mode 100644 index 0000000..19bcff6 --- /dev/null +++ b/src/data/google-doc.txt @@ -0,0 +1,19 @@ +[body] + +section: intro +[.+content] +h4: An h4 element with no attributes + +Some random text here, followed by an img tag. + +{.img} +src: assets/demo/test.jpg +alt: A cat +{} + +{.Test} +label: I’m a custom component! +value: 50 +{} + +[] \ No newline at end of file