forked from alex-shpak/hugo-book
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
alex-shpak#205, Add details shortcode
- Loading branch information
1 parent
b88d5f6
commit 6696858
Showing
6 changed files
with
37 additions
and
2 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
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,22 @@ | ||
# Details | ||
|
||
Details shortcode is a helper for `details` html5 element. It is going to replace `expand` shortcode. | ||
|
||
## Example | ||
```tpl | ||
{{</* details "Title" [open] */>}} | ||
## Markdown content | ||
Lorem markdownum insigne... | ||
{{</* /details */>}} | ||
``` | ||
```tpl | ||
{{</* details title="Title" open=true */>}} | ||
## Markdown content | ||
Lorem markdownum insigne... | ||
{{</* /details */>}} | ||
``` | ||
|
||
{{< details "Title" open >}} | ||
## Markdown content | ||
Lorem markdownum insigne... | ||
{{< /details >}} |
2 changes: 1 addition & 1 deletion
2
exampleSite/resources/_gen/assets/scss/book.scss_50fc8c04e12a2f59027287995557ceff.content
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
exampleSite/resources/_gen/assets/scss/book.scss_50fc8c04e12a2f59027287995557ceff.json
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 |
---|---|---|
@@ -1 +1 @@ | ||
{"Target":"book.min.284c8fc21ced13c579d9027a9d14893c56b243c6045001180391cebb4cc36ab8.css","MediaType":"text/css","Data":{"Integrity":"sha256-KEyPwhztE8V52QJ6nRSJPFayQ8YEUAEYA5HOu0zDarg="}} | ||
{"Target":"book.min.6df681b0bb21155cba49f6078e3559216772d8e03e780d240c73ea21817ed5e5.css","MediaType":"text/css","Data":{"Integrity":"sha256-bfaBsLshFVy6SfYHjjVZIWdy2OA+eA0kDHPqIYF+1eU="}} |
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,6 @@ | ||
<details {{ if or (.Get "open") (in .Params "open") }}open{{ end }}> | ||
<summary>{{ cond .IsNamedParams (.Get "title") (.Get 0) }}</summary> | ||
<div class="markdown-inner"> | ||
{{ .Inner | markdownify }} | ||
</div> | ||
</details> |
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