Summary Files Commits Branches @commit @diff @stats
path: root / docs / src / elements / code.pug
diff options
context:
space:
mode:
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.