0.0
No commit activity in last 3 years
No release in over 3 years
A simple gem to display cookies consent ! If you don't disable cookies, we assume you are ok with app's cookies policy.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 4.2.0
 Project Readme

Simple Cookies

A simple gem to display cookies consent !

Installation

Simple Cookies is distributed as a gem, which is how it should be used in your app.

Include the gem in your Gemfile:

gem 'simple_cookies'

Install assets file in application.js:

//= require simple_cookies

And in application.css:

*= require simple-cookies

Or, if you have application.scss:

@import "simple-cookies";

Usage

In your view add

<%= render 'simple_cookies/consent', appname: "App name", path: nil, klass: 'top' %>

Default style

Simple Cookies comes with some customization. Here are css class :

full : make simple-cookies box full width of browser. Default is 375px.

top || bottom : position the box at the top or bottom of the window.

content-centered : center content inside the box. Default content is left align.

CSS class and customization

You can customize the box by overriding css.

"Simple cookies" contains 4 elements :

div#simple-cookies
  h1
  p
  a.simple-cookies-accept