Summary Files Commits Branches @commit @diff @stats
path: root / docs / src / contents / badges.pug
diff options
context:
space:
mode:
Commitb903b30d81eb531eead430db3c9cc934ab5dea8f (patch)
Author
 Yan Zhu <picturepan2@hotmail.com>
2018-06-04 21:12:57 +0800
Committer
 Yan Zhu <picturepan2@hotmail.com>
2018-06-04 21:12:57 +0800
Files45153a88bc95c72566e19501ccf8b8914a824871 /docs/src/contents/badges.pug
Spectre-Dark-Gruvbox-b903b30d81eb531eead430db3c9cc934ab5dea8f.tar
Spectre-Dark-Gruvbox-b903b30d81eb531eead430db3c9cc934ab5dea8f.tar.gz
Spectre-Dark-Gruvbox-b903b30d81eb531eead430db3c9cc934ab5dea8f.zip
Parent17423a6156ba7cdc4de6744b0098d61702111101 (diff)
Update old docs to new Pug templates
1 files changed, 59 insertions, 0 deletions
-rw-r--r--docs/src/contents/badges.pug59
diff --git a/docs/src/contents/badges.pug b/docs/src/contents/badges.pug
new file mode 100644
index 0000000..250fb39
--- /dev/null
+++ b/docs/src/contents/badges.pug
@@ -0,0 +1,59 @@
+p Badges are often used as unread number indicators.
+
+.columns
+ .column.col-3.col-xs-6
+ span.badge(data-badge="")
+ | Notifications
+ .column.col-3.col-xs-6
+ span.badge(data-badge="8")
+ | Notifications
+ .column.col-3.col-xs-6
+ span.badge(data-badge="88")
+ | Notifications
+ .column.col-3.col-xs-6
+ span.badge(data-badge="888")
+ | Notifications
+
+p
+ | Add the #[code badge] class to non self closing elements.
+ | And add the #[code data-badge] attribute to define the content of a badge.
+ | The badge will appear in the top-right direction of the element.
+p
+ | If there is no #[code data-badge] or the attribute is not specified, the badge will appear as a dot.
+
+.columns
+ .column.col-sm-12
+ button.btn.badge(data-badge="") Button
+ button.btn.badge(data-badge="8") Button
+ .column.col-sm-12
+ button.btn.btn-primary.badge(data-badge="") Button
+ button.btn.btn-primary.badge(data-badge="8") Button
+ .column.col-sm-12
+ figure.avatar.avatar-xl.badge(data-badge="8" data-initial="YZ")
+ img(src="img/avatar-1.png" alt="YZ")
+ figure.avatar.avatar-lg.badge(data-badge="8" data-initial="YZ")
+ img(src="img/avatar-2.png" alt="YZ")
+ figure.avatar.badge(data-badge="8" data-initial="YZ")
+ img(src="img/avatar-3.png" alt="YZ")
+
+p
+ | Badges support #[code button] and #[code avatars] elements as well.
+
+pre.code(data-lang='HTML')
+ code
+ :highlight(lang="html")
+ <span class="badge">
+ Notifications
+ </span>
+
+ <span class="badge" data-badge="8">
+ Notifications
+ </span>
+
+ <button class="btn badge" data-badge="8">
+ Button
+ </button>
+
+ <figure class="avatar badge" data-badge="8" data-initial="YZ">
+ <img src="img/avatar-3.png" alt="YZ">
+ </figure> \ No newline at end of file