From f7344f3e056a94640b6260ad7b7badfd33646c37 Mon Sep 17 00:00:00 2001 From: Yan Zhu Date: Sun, 3 Jun 2018 18:07:08 +0800 Subject: Update code and media docs to new Pug templates --- docs/src/contents/code.pug | 22 ++++++++++++++ docs/src/contents/codes.pug | 0 docs/src/contents/media.pug | 73 +++++++++++++++++++++++++++++++++++++++++++++ docs/src/elements.pug | 4 +-- 4 files changed, 97 insertions(+), 2 deletions(-) create mode 100644 docs/src/contents/code.pug delete mode 100644 docs/src/contents/codes.pug (limited to 'docs/src') diff --git a/docs/src/contents/code.pug b/docs/src/contents/code.pug new file mode 100644 index 0000000..f1ee876 --- /dev/null +++ b/docs/src/contents/code.pug @@ -0,0 +1,22 @@ +p Code is used for styling inline and multiline code snippets. +p + | For inline code, you can use the #{''} element. + | For multiline code snippet blocks, you can use #{'
'} with the #[code code] class as a container, and add #{''} inside it.
+  | The #[code data-lang] ibute is rendered as the language name in the top right.
+
+pre.code(data-lang='HTML')
+  code
+    :highlight(lang="html")
+      
+      
+
+pre.code(data-lang='HTML')
+  code
+    :highlight(lang="html")
+      
<!-- code snippets -->
+      <button class="btn">
+        Submit
+      </button>
+      
\ No newline at end of file diff --git a/docs/src/contents/codes.pug b/docs/src/contents/codes.pug deleted file mode 100644 index e69de29..0000000 diff --git a/docs/src/contents/media.pug b/docs/src/contents/media.pug index e69de29..fcb8d36 100644 --- a/docs/src/contents/media.pug +++ b/docs/src/contents/media.pug @@ -0,0 +1,73 @@ +p Media includes responsive images, figures and video classes. + ++docs-subheading('media-images', 'Images') + +p + | Add the #[code img-responsive] class to #{''} elements. The images will scale with the parent sizes. + +.columns + .column.col-12 + img.img-responsive.rounded(src="img/osx-el-capitan.jpg" alt="macOS El Capitan Wallpaper") + +p + | Add the #[code img-fit-contain] or #[code img-fit-cover] class to #{''} or #{'