{"id":15024351,"url":"https://github.com/wruczek/bootstrap-cookie-alert","last_synced_at":"2025-04-04T12:10:06.802Z","repository":{"id":27415467,"uuid":"100151948","full_name":"Wruczek/Bootstrap-Cookie-Alert","owner":"Wruczek","description":"A simple, good looking cookie alert built for Bootstrap 3/4. No dependencies required.","archived":false,"fork":false,"pushed_at":"2023-06-21T15:02:39.000Z","size":49,"stargazers_count":241,"open_issues_count":7,"forks_count":47,"subscribers_count":12,"default_branch":"gh-pages","last_synced_at":"2025-04-04T12:10:01.356Z","etag":null,"topics":["bootstrap","cookie-alert","lightweight","small"],"latest_commit_sha":null,"homepage":"https://wruczek.github.io/Bootstrap-Cookie-Alert/demo-bs5.html","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Wruczek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-13T03:40:39.000Z","updated_at":"2025-03-16T20:01:15.000Z","dependencies_parsed_at":"2024-06-18T22:44:02.464Z","dependency_job_id":"a2585bde-531e-4de1-8f34-fe66e13f4361","html_url":"https://github.com/Wruczek/Bootstrap-Cookie-Alert","commit_stats":{"total_commits":35,"total_committers":5,"mean_commits":7.0,"dds":"0.11428571428571432","last_synced_commit":"07d66b18573782236ab899b7e23de1932d338d9e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wruczek%2FBootstrap-Cookie-Alert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wruczek%2FBootstrap-Cookie-Alert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wruczek%2FBootstrap-Cookie-Alert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wruczek%2FBootstrap-Cookie-Alert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Wruczek","download_url":"https://codeload.github.com/Wruczek/Bootstrap-Cookie-Alert/tar.gz/refs/heads/gh-pages","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247174456,"owners_count":20896078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap","cookie-alert","lightweight","small"],"created_at":"2024-09-24T20:00:09.987Z","updated_at":"2025-04-04T12:10:06.784Z","avatar_url":"https://github.com/Wruczek.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bootstrap-Cookie-Alert\nA simple cookie alert for Bootstrap 5 and 4. No dependencies required.\u003cbr\u003e\n\n[**Demo with Bootstrap 5**](https://wruczek.github.io/Bootstrap-Cookie-Alert/demo-bs5)\n\u0026bull;\n[**Demo with Bootstrap 4**](https://wruczek.github.io/Bootstrap-Cookie-Alert/demo-bs4)\n\nI unfortunately don't remember the source of the cubes pattern :(\nIf someone know, please email me or create an issue. I would love to credit the author.\n\n## npm package\n`npm i bootstrap-cookie-alert`\n\n## How to use\n#### 1. In the `head` of your document, include `cookiealert.css` **after Bootstrap**.\n```html\n\u003clink rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/gh/Wruczek/Bootstrap-Cookie-Alert@gh-pages/cookiealert.css\"\u003e\n```\n\n#### 2. Add the html markup:\n```html\n\u003c!-- START Bootstrap-Cookie-Alert --\u003e\n\u003cdiv class=\"alert text-center cookiealert\" role=\"alert\"\u003e\n    \u003cb\u003eDo you like cookies?\u003c/b\u003e \u0026#x1F36A; We use cookies to ensure you get the best experience on our website. \u003ca href=\"https://cookiesandyou.com/\" target=\"_blank\"\u003eLearn more\u003c/a\u003e\n\n    \u003cbutton type=\"button\" class=\"btn btn-primary btn-sm acceptcookies\"\u003e\n        I agree\n    \u003c/button\u003e\n\u003c/div\u003e\n\u003c!-- END Bootstrap-Cookie-Alert --\u003e\n```\n\n#### 3. Include the JavaScript after the html markup\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/gh/Wruczek/Bootstrap-Cookie-Alert@gh-pages/cookiealert.js\"\u003e\u003c/script\u003e\n```\n\n### Take a look at [`demo-bs5.html`](https://github.com/Wruczek/Bootstrap-Cookie-Alert/blob/gh-pages/demo-bs5.html) for a working example\n\n\n### Accept event\nIf you need to, you can listen for the `cookieAlertAccept` event to get notified when the user accepts the cookies.\n\n```js\nwindow.addEventListener(\"cookieAlertAccept\", function() {\n    alert(\"cookies accepted\")\n})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwruczek%2Fbootstrap-cookie-alert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwruczek%2Fbootstrap-cookie-alert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwruczek%2Fbootstrap-cookie-alert/lists"}