Added readme
This commit is contained in:
parent
8a8b886be1
commit
36f30f3e67
44
README.md
Normal file
44
README.md
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
# BSToast5
|
||||||
|
|
||||||
|
> BSToast5 is a JavaScript helper for improving Bootstrap 5 toasts. Add (and remove) toasts to a page dynamically. Bootstrap 5 is required.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- Add (inject) and remove toasts into a page
|
||||||
|
|
||||||
|
## Screenshots
|
||||||
|
|
||||||
|
[](wiki/screenshot-1.png)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Background
|
||||||
|
|
||||||
|
This tool is an odd one, it might just be one of those tools that are only useful to me.
|
||||||
|
I wanted to search (a set of given) directories for files that match a wildcard pattern.
|
||||||
|
Then I wanted to run a file (from that list) at random.
|
||||||
|
For example: you wanted to watch a random episode of your favourite show.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Releases & Builds
|
||||||
|
|
||||||
|
See [Releases](/Ray/bstoast5)
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
|
||||||
|
See [Usage](wiki/USAGE.md)
|
||||||
|
|
||||||
|
## Acknowledgements
|
||||||
|
|
||||||
|
This software uses a number of dependencies and assets from third-parties.
|
||||||
|
These developers and artists deserve due credit for their work and for their commitment to sharing their work freely.
|
||||||
|
Each product is released under their own particular license, for more information please visit their websites.
|
||||||
|
|
||||||
|
- [Bootstrap](https://getbootstrap.com/)
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
This project is licensed under the least restrictive terms of its dependencies, viz. MIT License.
|
||||||
66
wiki/USAGE.md
Normal file
66
wiki/USAGE.md
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
# BSToast5
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
This is the usage guide for **BSToast5**, version **0.1.0.001**.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## `Create(options)`
|
||||||
|
|
||||||
|
Creates a toast on the page. The default position is the **top-right**.
|
||||||
|
|
||||||
|
### Options
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
{
|
||||||
|
Icon: null,
|
||||||
|
Title: "",
|
||||||
|
Time: "",
|
||||||
|
Message: "",
|
||||||
|
Animation: true,
|
||||||
|
AutoHide: true,
|
||||||
|
Delay: 2000,
|
||||||
|
Position: "top:0; right:0; margin:20px;"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|------|------|-------------|
|
||||||
|
| `Icon` | `html` | HTML for the top-left image. |
|
||||||
|
| `Title` | `string` | Label displayed at the top of the toast. |
|
||||||
|
| `Time` | `string` | Text displayed at the top-right of the toast, typically the time. |
|
||||||
|
| `Message` | `string` | Text body of the toast. |
|
||||||
|
| `Animation` | `bool` | Whether the toast opens with an animation. |
|
||||||
|
| `AutoHide` | `bool` | Whether the toast automatically closes after a delay. |
|
||||||
|
| `Delay` | `int` | Delay before automatically closing the toast, in milliseconds. |
|
||||||
|
| `Position` | `css` | CSS class or CSS positioning used for the toast container. |
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
BSToast5.Create({
|
||||||
|
Icon: null,
|
||||||
|
Title: "Burnt Bread",
|
||||||
|
Time: "Some time ago",
|
||||||
|
Message: "Oh noes! I'm toast!",
|
||||||
|
Animation: true,
|
||||||
|
AutoHide: true,
|
||||||
|
Delay: 2500,
|
||||||
|
Position: "top-0 end-0 p-3"
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## `Clear()`
|
||||||
|
|
||||||
|
Closes all toasts currently displayed on the page.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
BSToast5.Clear();
|
||||||
|
```
|
||||||
BIN
wiki/screenshot-1-h240.png
Normal file
BIN
wiki/screenshot-1-h240.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.7 KiB |
BIN
wiki/screenshot-1.png
Normal file
BIN
wiki/screenshot-1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
Loading…
Reference in New Issue
Block a user