From 5ea818b75f3c7fe3d13494104ecb45520c387dce Mon Sep 17 00:00:00 2001 From: Samuel Date: Wed, 25 Sep 2024 15:13:40 -0400 Subject: [PATCH 1/2] Update README.md Improve README with detailed usage instructions and API documentation --- README.md | 100 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 96 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9bb9018..5f9aaf6 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,104 @@ PleaseWait.js =========== A simple library to show your users a beautiful splash page while your application loads. -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 ! From dd4d253895a75706726df994456172c537d90927 Mon Sep 17 00:00:00 2001 From: Samuel Date: Wed, 25 Sep 2024 15:16:30 -0400 Subject: [PATCH 2/2] Update README.md Readded Documentation link --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 5f9aaf6..34c669e 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ PleaseWait.js =========== A simple library to show your users a beautiful splash page while your application loads. +Documentation and Demo +--------------------- +Documentation and demo can be found [here](http://pathgather.github.io/please-wait/). + ## Table of Contents - [Installation](#installation) - [Usage](#usage)