Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wruczek/bootstrap-cookie-alert
A simple, good looking cookie alert built for Bootstrap 3/4. No dependencies required.
https://github.com/wruczek/bootstrap-cookie-alert
bootstrap cookie-alert lightweight small
Last synced: 8 minutes ago
JSON representation
A simple, good looking cookie alert built for Bootstrap 3/4. No dependencies required.
- Host: GitHub
- URL: https://github.com/wruczek/bootstrap-cookie-alert
- Owner: Wruczek
- License: mit
- Created: 2017-08-13T03:40:39.000Z (over 7 years ago)
- Default Branch: gh-pages
- Last Pushed: 2023-06-21T15:02:39.000Z (over 1 year ago)
- Last Synced: 2024-11-13T02:03:19.094Z (8 minutes ago)
- Topics: bootstrap, cookie-alert, lightweight, small
- Language: HTML
- Homepage: https://wruczek.github.io/Bootstrap-Cookie-Alert/demo-bs5.html
- Size: 47.9 KB
- Stars: 240
- Watchers: 13
- Forks: 50
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bootstrap-Cookie-Alert
A simple cookie alert for Bootstrap 5 and 4. No dependencies required.[**Demo with Bootstrap 5**](https://wruczek.github.io/Bootstrap-Cookie-Alert/demo-bs5)
•
[**Demo with Bootstrap 4**](https://wruczek.github.io/Bootstrap-Cookie-Alert/demo-bs4)I unfortunately don't remember the source of the cubes pattern :(
If someone know, please email me or create an issue. I would love to credit the author.## npm package
`npm i bootstrap-cookie-alert`## How to use
#### 1. In the `head` of your document, include `cookiealert.css` **after Bootstrap**.
```html```
#### 2. Add the html markup:
```html```
#### 3. Include the JavaScript after the html markup
```html```
### Take a look at [`demo-bs5.html`](https://github.com/Wruczek/Bootstrap-Cookie-Alert/blob/gh-pages/demo-bs5.html) for a working example
### Accept event
If you need to, you can listen for the `cookieAlertAccept` event to get notified when the user accepts the cookies.```js
window.addEventListener("cookieAlertAccept", function() {
alert("cookies accepted")
})
```