From 5f7cba3d97ae5c45fb5d555c2e156aaee7573aef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Fri, 16 Jul 2021 22:35:20 +0200 Subject: [PATCH] rework expand documentation --- exampleSite/content/shortcodes/expand.en.md | 94 +++++++++++++++------ exampleSite/content/shortcodes/notice.en.md | 8 +- 2 files changed, 72 insertions(+), 30 deletions(-) diff --git a/exampleSite/content/shortcodes/expand.en.md b/exampleSite/content/shortcodes/expand.en.md index d0341423fe..d000315ac9 100644 --- a/exampleSite/content/shortcodes/expand.en.md +++ b/exampleSite/content/shortcodes/expand.en.md @@ -4,7 +4,20 @@ description : "Displays an expandable/collapsible section of text on your page" --- The Expand shortcode displays an expandable/collapsible section of text on your page. -Here is an example + +## Usage + +```` +{{%/*expand "Does this relearn theme rock?" */%}} +Yes! +{{%/* /expand*/%}} +```` + +This shortcode takes one optional parameter to define the text that appears next to the expand/collapse icon. The default text is *"Expand me..."*. + +## Examples + +### Default text {{%expand%}} Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod @@ -13,33 +26,62 @@ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -{{%/expand%}} +{{% /expand%}} - -## Usage - - -this shortcode takes exactly one optional parameter to define the text that appears next to the expand/collapse icon. (default is "Expand me...") - - {{%/*expand "Does this relearn theme rock?" */%}}Yes !.{{%/* /expand*/%}} - -{{%expand "Does this relearn theme rock?" %}}Yes !{{% /expand%}} - -# Demo - - {{%/*expand*/%}} - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod - tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, - quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse - cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non - proident, sunt in culpa qui officia deserunt mollit anim id est laborum. - {{%/* /expand*/%}} - - -{{%expand%}}Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod +{{% expand "Show markup" %}} +```` +{{%/* expand */%}} +Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum.{{% /expand%}} \ No newline at end of file +proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +{{%/* /expand */%}} +```` +{{% /expand%}} + +### Arbitrary text + +{{%expand "Show me endless possibilities" %}} +Some expandable text. + +You can add: + +- multiple paragraphs +- bullet point lists +- *emphasized*, **bold** and even ***bold emphasized*** text +- [links](https://example.com) +- other shortcodes besides `expand` +- etc. + +``` +...and even source code +``` + +> the possiblities are endless +{{% /expand%}} + +{{% expand "Show markup" %}} +```` +{{%/* expand "Show me endless possibilities" */%}} +Some expandable text. + +You can add: + +- multiple paragraphs +- bullet point lists +- *emphasized*, **bold** and even ***bold emphasized*** text +- [links](https://example.com) +- other shortcodes besides `expand` +- etc. + +``` +...and even source code +``` + +> the possiblities are endless +{{%/* /expand */%}} +```` +{{% /expand%}} + diff --git a/exampleSite/content/shortcodes/notice.en.md b/exampleSite/content/shortcodes/notice.en.md index 38976ae6e2..14fb456578 100644 --- a/exampleSite/content/shortcodes/notice.en.md +++ b/exampleSite/content/shortcodes/notice.en.md @@ -35,7 +35,7 @@ You can add: > the possiblities are endless {{% /notice %}} -{{% expand Code %}} +{{% expand "Show markup" %}} ```` {{%/* notice note */%}} A **notice** disclaimer @@ -79,7 +79,7 @@ You can add: > the possiblities are endless {{% /notice %}} -{{% expand Code %}} +{{% expand "Show markup" %}} ```` {{%/* notice info */%}} An **information** disclaimer @@ -123,7 +123,7 @@ You can add: > the possiblities are endless {{% /notice %}} -{{% expand Code %}} +{{% expand "Show markup" %}} ```` {{%/* notice tip */%}} A **tip** disclaimer @@ -167,7 +167,7 @@ You can add: > the possiblities are endless {{% /notice %}} -{{% expand Code %}} +{{% expand "Show markup" %}} ```` {{%/* notice warning */%}} A **warning** disclaimer