Summary Files Commits Branches @commit @diff @stats
path: root / docs / src / elements / code.pug
diff options
context:
space:
mode:
Commitb777a03857cba6322929e3f11a4bb14d0338d160 (patch)
Author
 Yan Zhu <picturepan2@hotmail.com>
2018-11-14 14:43:30 +0800
Committer
 Yan Zhu <picturepan2@hotmail.com>
2018-11-14 14:43:30 +0800
Files01717734622d0a07907cdf25eb7135a50478a10e /docs/src/elements/code.pug
Spectre-Dark-Gruvbox-b777a03857cba6322929e3f11a4bb14d0338d160.tar
Spectre-Dark-Gruvbox-b777a03857cba6322929e3f11a4bb14d0338d160.tar.gz
Spectre-Dark-Gruvbox-b777a03857cba6322929e3f11a4bb14d0338d160.zip
Parent26d3d62515b3911f6a3f87e6161b9491cb02d8de (diff)
Update Docs examples
1 files changed, 13 insertions, 0 deletions
-rw-r--r--docs/src/elements/code.pug13
diff --git a/docs/src/elements/code.pug b/docs/src/elements/code.pug
index 894b617..920fea9 100644
--- a/docs/src/elements/code.pug
+++ b/docs/src/elements/code.pug
@@ -11,8 +11,21 @@ block docs-content
include ../_layout/_ad-g.pug
p Code is used for styling inline and multiline code snippets.
+
+ +docs-subheading('code-inline', 'Inline code')
+
+ pre.code(data-lang='HTML')
+ code
+ :highlight(lang="html")
+ <!-- inline code -->
+ <code>code</code>
+
p
| For inline code, you can use the #{'<code>'} element.
+
+ +docs-subheading('code-snippet', 'Code snippet')
+
+ p
| For multiline code snippet blocks, you can use #{'<pre>'} with the #[code code] class as a container, and add #{'<code>'} inside it.
| The #[code data-lang] attribute is rendered as the language name in the top right.