diff --git a/README.md b/README.md index 9bb9018..34c669e 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,104 @@ Documentation and Demo --------------------- Documentation and demo can be found [here](http://pathgather.github.io/please-wait/). +## Table of Contents +- [Installation](#installation) +- [Usage](#usage) +- [API](#api) +- [Customization](#customization) +- [Browser Compatibility](#browser-compatibility) +- [Contributing](#contributing) +- [Changelog](#changelog) + +## Installation + +You can install PleaseWait.js using npm: + +```bash +npm install please-wait +``` + +## Usage + +After installing the package, you can import and use it in your JavaScript file: + +```javascript +import pleaseWait from 'please-wait'; + +const loading_screen = pleaseWait({ + logo: "path/to/your/logo.png", + backgroundColor: '#f46d3b', + loadingHtml: "

A loading message.

" +}); + +// Later, when your application is ready: +loading_screen.finish(); +``` + +## API + +- `pleaseWait(options)`: Initialize the loading screen +- `loading_screen.finish()`: Hide the loading screen +- `loading_screen.updateOption(option, value)`: Update a single option +- `loading_screen.updateOptions(options)`: Update multiple options + +## Customization + +PleaseWait.js offers several customization options: + +- `backgroundColor`: Set the background color of the loading screen +- `logo`: Path to your logo image +- `loadingHtml`: Custom HTML for the loading message +- `template`: Custom HTML template for the entire loading screen + +Example: + +```javascript +pleaseWait({ + logo: "images/logo.png", + backgroundColor: '#000000', + loadingHtml: "
", + template: ` +
+
+
+

+ +

+
+
+
+
+ ` +}); +``` + +## Browser Compatibility + +PleaseWait.js is compatible with modern browsers including: + +- Chrome (latest) +- Firefox (latest) +- Safari (latest) +- Edge (latest) + +## Contributing + +We welcome contributions to PleaseWait.js! Please follow these steps: + +1. Fork the repository +2. Create a new branch: `git checkout -b feature-branch-name` +3. Make your changes and commit them: `git commit -m 'Add some feature'` +4. Push to the branch: `git push origin feature-branch-name` +5. Submit a pull request + +## Changelog + +### v0.0.5 +- Initial public release + About Pathgather --------------------- Pathgather is an NYC-based startup building a platform that dramatically accelerates learning for enterprises by bringing employees, training content, and existing enterprise systems into one engaging platform. -Every Friday, we work on open-source software (our own or other projects). Want to join our always growing team? Peruse our [current opportunities](http://www.pathgather.com/jobs/) or reach out to us at ! \ No newline at end of file +Every Friday, we work on open-source software (our own or other projects). Want to join our always growing team? Peruse our [current opportunities](http://www.pathgather.com/jobs/) or reach out to us at !