Skip to content

gyzo/Bootstrap-Cookie-Alert

 
 

Repository files navigation

Bootstrap-Cookie-Alert

A simple, good looking cookie alert build for Bootstrap 4. No depedency.

Demo

I unfortunately dont remeber the source of the cubes pattern :( If someone know, please email me or create an issue. I would love to credit the author.

How to use

1. In the head of your document, include cookiealert.css after Bootstrap.

<link rel="stylesheet" href="cookiealert.css">

2. Add the html markup:

<!-- COOKIES -->
<div class="alert alert-dismissible text-center cookiealert" role="alert">
    <div class="cookiealert-container">
        <b>Do you like cookies?</b> &#x1F36A; We use cookies to ensure you get the best experience on our website. <a href="http://cookiesandyou.com/" target="_blank">Learn more</a>

        <button type="button" class="btn btn-primary btn-sm acceptcookies" aria-label="Close">
            I agree
        </button>
    </div>
</div>
<!-- /COOKIES -->

3. Include the JavaScript after the html markup

<script src="cookiealert-standalone.js"></script>

Take a look at demo.html for a working example

About

A simple, good looking cookie alert built for Bootstrap 4. No dependencies needed.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 45.7%
  • JavaScript 40.1%
  • CSS 14.2%