mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-01-18 19:00:24 +00:00
rework expand documentation
This commit is contained in:
parent
86317356d6
commit
5f7cba3d97
2 changed files with 72 additions and 30 deletions
|
@ -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.
|
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%}}
|
{{%expand%}}
|
||||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
|
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
|
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
|
||||||
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
|
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
|
||||||
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||||
{{%/expand%}}
|
{{% /expand%}}
|
||||||
|
|
||||||
|
{{% expand "Show markup" %}}
|
||||||
## Usage
|
````
|
||||||
|
{{%/* expand */%}}
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
|
||||||
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
|
|
||||||
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
|
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
|
||||||
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
||||||
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
|
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
|
||||||
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
|
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
|
||||||
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.{{% /expand%}}
|
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%}}
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ You can add:
|
||||||
> the possiblities are endless
|
> the possiblities are endless
|
||||||
{{% /notice %}}
|
{{% /notice %}}
|
||||||
|
|
||||||
{{% expand Code %}}
|
{{% expand "Show markup" %}}
|
||||||
````
|
````
|
||||||
{{%/* notice note */%}}
|
{{%/* notice note */%}}
|
||||||
A **notice** disclaimer
|
A **notice** disclaimer
|
||||||
|
@ -79,7 +79,7 @@ You can add:
|
||||||
> the possiblities are endless
|
> the possiblities are endless
|
||||||
{{% /notice %}}
|
{{% /notice %}}
|
||||||
|
|
||||||
{{% expand Code %}}
|
{{% expand "Show markup" %}}
|
||||||
````
|
````
|
||||||
{{%/* notice info */%}}
|
{{%/* notice info */%}}
|
||||||
An **information** disclaimer
|
An **information** disclaimer
|
||||||
|
@ -123,7 +123,7 @@ You can add:
|
||||||
> the possiblities are endless
|
> the possiblities are endless
|
||||||
{{% /notice %}}
|
{{% /notice %}}
|
||||||
|
|
||||||
{{% expand Code %}}
|
{{% expand "Show markup" %}}
|
||||||
````
|
````
|
||||||
{{%/* notice tip */%}}
|
{{%/* notice tip */%}}
|
||||||
A **tip** disclaimer
|
A **tip** disclaimer
|
||||||
|
@ -167,7 +167,7 @@ You can add:
|
||||||
> the possiblities are endless
|
> the possiblities are endless
|
||||||
{{% /notice %}}
|
{{% /notice %}}
|
||||||
|
|
||||||
{{% expand Code %}}
|
{{% expand "Show markup" %}}
|
||||||
````
|
````
|
||||||
{{%/* notice warning */%}}
|
{{%/* notice warning */%}}
|
||||||
A **warning** disclaimer
|
A **warning** disclaimer
|
||||||
|
|
Loading…
Reference in a new issue