From c7f93dc789da16ff03fa37b1c14ccc03c80e6b0a Mon Sep 17 00:00:00 2001 From: Alex Shpak Date: Tue, 8 Oct 2019 23:55:34 +0200 Subject: Update example file structure, give each shortcode own file --- exampleSite/content/docs/shortcodes/_index.md | 3 ++ exampleSite/content/docs/shortcodes/buttons.md | 13 +++++++ exampleSite/content/docs/shortcodes/columns.md | 45 +++++++++++++++++++++++ exampleSite/content/docs/shortcodes/expand.md | 35 ++++++++++++++++++ exampleSite/content/docs/shortcodes/hints.md | 32 +++++++++++++++++ exampleSite/content/docs/shortcodes/katex.md | 27 ++++++++++++++ exampleSite/content/docs/shortcodes/mermaid.md | 38 ++++++++++++++++++++ exampleSite/content/docs/shortcodes/tabs.md | 50 ++++++++++++++++++++++++++ 8 files changed, 243 insertions(+) create mode 100644 exampleSite/content/docs/shortcodes/_index.md create mode 100644 exampleSite/content/docs/shortcodes/buttons.md create mode 100644 exampleSite/content/docs/shortcodes/columns.md create mode 100644 exampleSite/content/docs/shortcodes/expand.md create mode 100644 exampleSite/content/docs/shortcodes/hints.md create mode 100644 exampleSite/content/docs/shortcodes/katex.md create mode 100644 exampleSite/content/docs/shortcodes/mermaid.md create mode 100644 exampleSite/content/docs/shortcodes/tabs.md (limited to 'exampleSite/content/docs/shortcodes') diff --git a/exampleSite/content/docs/shortcodes/_index.md b/exampleSite/content/docs/shortcodes/_index.md new file mode 100644 index 0000000..9bb0430 --- /dev/null +++ b/exampleSite/content/docs/shortcodes/_index.md @@ -0,0 +1,3 @@ +--- +bookFlatSection: true +--- diff --git a/exampleSite/content/docs/shortcodes/buttons.md b/exampleSite/content/docs/shortcodes/buttons.md new file mode 100644 index 0000000..b8c96bb --- /dev/null +++ b/exampleSite/content/docs/shortcodes/buttons.md @@ -0,0 +1,13 @@ +# Buttons + +Buttons are styled links that can lead to local page or external link. + +```tpl +{{}}Get Home{{}} +{{}}Contribute{{}} +``` + +## Example + +{{< button relref="/" >}}Get Home{{< /button >}} +{{< button href="https://github.com/alex-shpak/hugo-book" >}}Contribute{{< /button >}} diff --git a/exampleSite/content/docs/shortcodes/columns.md b/exampleSite/content/docs/shortcodes/columns.md new file mode 100644 index 0000000..4df396a --- /dev/null +++ b/exampleSite/content/docs/shortcodes/columns.md @@ -0,0 +1,45 @@ +# Columns + +Columns help organize shorter pieces of content horizontally for readability. + + +```html +{{}} +# Left Content +Lorem markdownum insigne... + +<---> + +# Mid Content +Lorem markdownum insigne... + +<---> + +# Right Content +Lorem markdownum insigne... +{{}} +``` + +## Example + +{{< columns >}} +## Left Content +Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat +stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa +protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes. +Miseratus fonte Ditis conubia. + +<---> + +## Mid Content +Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat +stringit, frustra Saturnius uteroque inter! + +<---> + +## Right Content +Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat +stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa +protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes. +Miseratus fonte Ditis conubia. +{{< /columns >}} diff --git a/exampleSite/content/docs/shortcodes/expand.md b/exampleSite/content/docs/shortcodes/expand.md new file mode 100644 index 0000000..c62520f --- /dev/null +++ b/exampleSite/content/docs/shortcodes/expand.md @@ -0,0 +1,35 @@ +# Expand + +Expand shortcode can help to decrease clutter on screen by hiding part of text. Expand content by clicking on it. + +## Example +### Default + +```tpl +{{}} +## Markdown content +Lorem markdownum insigne... +{{}} +``` + +{{< expand >}} +## Markdown content +Lorem markdownum insigne... +{{< /expand >}} + +### With Custom Label + +```tpl +{{}} +## Markdown content +Lorem markdownum insigne... +{{}} +``` + +{{< expand "Custom Label" "..." >}} +## Markdown content +Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat +stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa +protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes. +Miseratus fonte Ditis conubia. +{{< /expand >}} diff --git a/exampleSite/content/docs/shortcodes/hints.md b/exampleSite/content/docs/shortcodes/hints.md new file mode 100644 index 0000000..3477113 --- /dev/null +++ b/exampleSite/content/docs/shortcodes/hints.md @@ -0,0 +1,32 @@ +# Hints + +Hint shortcode can be used as hint/alerts/notification block. +There are 3 colors to choose: `info`, `warning` and `danger`. + +```tpl +{{}} +**Markdown content** +Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat +stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa +{{}} +``` + +## Example + +{{< hint info >}} +**Markdown content** +Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat +stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa +{{< /hint >}} + +{{< hint warning >}} +**Markdown content** +Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat +stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa +{{< /hint >}} + +{{< hint danger >}} +**Markdown content** +Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat +stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa +{{< /hint >}} diff --git a/exampleSite/content/docs/shortcodes/katex.md b/exampleSite/content/docs/shortcodes/katex.md new file mode 100644 index 0000000..965577f --- /dev/null +++ b/exampleSite/content/docs/shortcodes/katex.md @@ -0,0 +1,27 @@ +# KaTeX + +KaTeX shortcode let you render math typesetting in markdown document. See [KaTeX](https://katex.org/) + +## Example +{{< columns >}} + +```latex +{{}} +x = \begin{cases} + a &\text{if } b \\ + c &\text{if } d +\end{cases} +{{}} +``` + +<---> + +{{< katex >}} +x = \begin{cases} + a &\text{if } b \\ + c &\text{if } d +\end{cases} +{{< /katex >}} + +{{< /columns >}} + diff --git a/exampleSite/content/docs/shortcodes/mermaid.md b/exampleSite/content/docs/shortcodes/mermaid.md new file mode 100644 index 0000000..3a617bc --- /dev/null +++ b/exampleSite/content/docs/shortcodes/mermaid.md @@ -0,0 +1,38 @@ +# Mermaid Chart + +[Mermaid](https://mermaidjs.github.io/) is library for generating svg charts and diagrams from text. + +## Example + +{{< columns >}} +```tpl +{{}} +sequenceDiagram + Alice->>Bob: Hello Bob, how are you? + alt is sick + Bob->>Alice: Not so good :( + else is well + Bob->>Alice: Feeling fresh like a daisy + end + opt Extra response + Bob->>Alice: Thanks for asking + end +{{}} +``` + +<---> + +{{< mermaid >}} +sequenceDiagram + Alice->>Bob: Hello Bob, how are you? + alt is sick + Bob->>Alice: Not so good :( + else is well + Bob->>Alice: Feeling fresh like a daisy + end + opt Extra response + Bob->>Alice: Thanks for asking + end +{{< /mermaid >}} + +{{< /columns >}} diff --git a/exampleSite/content/docs/shortcodes/tabs.md b/exampleSite/content/docs/shortcodes/tabs.md new file mode 100644 index 0000000..096892c --- /dev/null +++ b/exampleSite/content/docs/shortcodes/tabs.md @@ -0,0 +1,50 @@ +# Tabs + +Tabs let you organize content by context, for example installation instructions for each supported platform. + +```tpl +{{}} +{{}} # MacOS Content {{}} +{{}} # Linux Content {{}} +{{}} # Windows Content {{}} +{{}} +``` + +## Example + +{{< tabs "uniqueid" >}} +{{< tab "MacOS" >}} +# MacOS + +This is tab **MacOS** content. + +Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat +stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa +protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes. +Miseratus fonte Ditis conubia. +{{< /tab >}} + +{{< tab "Linux" >}} + +# Linux + +This is tab **Linux** content. + +Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat +stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa +protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes. +Miseratus fonte Ditis conubia. +{{< /tab >}} + +{{< tab "Windows" >}} + +# Windows + +This is tab **Windows** content. + +Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat +stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa +protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes. +Miseratus fonte Ditis conubia. +{{< /tab >}} +{{< /tabs >}} -- cgit v1.2.3