From ef1c45b59443c08d7245ce9fb1ec5e59713572ab Mon Sep 17 00:00:00 2001 From: Dawid Harat Date: Fri, 3 Jan 2020 19:53:52 +0100 Subject: [PATCH] toasts docs and example class option added --- js/tabler.js | 1 + pages/_docs/toasts.md | 19 +++++++++++++++++-- pages/_includes/ui/toast.html | 4 ++-- pages/_plugins/jekyll-example.rb | 2 +- scss/ui/_toasts.scss | 3 +++ 5 files changed, 24 insertions(+), 5 deletions(-) diff --git a/js/tabler.js b/js/tabler.js index 79ebc0a9..e86be4b6 100644 --- a/js/tabler.js +++ b/js/tabler.js @@ -58,6 +58,7 @@ $(document).ready(function() { // $('[data-toggle="tooltip"]').tooltip(); // $('[data-toggle="popover"]').popover(); + $('[data-toggle="toast"]').toast(); /* Imask plugin diff --git a/pages/_docs/toasts.md b/pages/_docs/toasts.md index 1e5598f6..faf9efda 100644 --- a/pages/_docs/toasts.md +++ b/pages/_docs/toasts.md @@ -5,10 +5,25 @@ description: The toast component is like an alert box that is only shown for a c bootstrap-link: components/toasts/ --- - - ### Default markup {% example %} {% include ui/toast.html %} {% endexample %} + +### Translucent + +Toasts are slightly translucent, too, so they blend over whatever they might appear over. For browsers that support the `backdrop-filter` CSS property, we’ll also attempt to blur the elements under a toast. + +{% example html class=bg-gray %} +{% include ui/toast.html %} +{% endexample %} + +### Stacking toasts + +If you want to stack toasts just put them in the same container. + +{% example %} +{% include ui/toast.html person-id=3 %} +{% include ui/toast.html date="7 mins ago" text="This is another toast message." %} +{% endexample %} \ No newline at end of file diff --git a/pages/_includes/ui/toast.html b/pages/_includes/ui/toast.html index fd0227a9..ded90207 100644 --- a/pages/_includes/ui/toast.html +++ b/pages/_includes/ui/toast.html @@ -1,6 +1,6 @@ {% assign person-id = include.person-id | default: 2 %} {% assign person = site.data.people[person-id] %} -