609

Product support

Visit this product's website for support.

  • Added on Nov 30, 2017
  • Current version: 1.0.7
  • Platform Compatibility
    v3.x not tested
    v2.x not tested
    v1.x use latest
  • Created by
  • Public repository

Categories

OctoberCMS plugin for cookie notice required by EU Cookie Directive.

If you like the product please give a thumbs up!

Requirements

  • Ajax Framework must be included in your layout/page in order to handle form requests.

Optional

  • Translate plugin, if you want to include multilingual contents.

Settings

This plugin creates a Settings menu item, found by navigating to Settings > Cookies > Cookie Notice. This page allows the setting of cookie notice content, button text and cookie duration in days.

If Translate is enabled, content and button text are translatable.

Authors

License

The MIT License (MIT)

Copyright (c) 2017 GrofGraf

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Usage

All you need to do is to import the cookieNotice component to a page layout and add {% component %} tag somewhere in the body.

description = "layout"
[cookieNotice]
loadCSS = 1
==
<!DOCTYPE html>
<html>
  <head>
    ...
  </head>
  <body>
    {% component 'cookieNotice' %}
    ...
  </body>
</html>

There is one optional parameter loadCSS. It is not recommended for production to have loadCSS enabled unless your server supports HTTP/2 protocol. A better approach would be, to copy required CSS into your main CSS file, to reduce a number of server requests.

CSS file looks like this:

.cookie-notice{
  position:fixed;
  width:100%;
  background-color:rgba(0,0,0,.8);
  font-weight:200;
  color:#ffffff;
  bottom:0;
  transform: translate(0, -10rem);
  z-index:10000;
  animation:cookie-notice-slide-in 1s ease-out forwards;
}
.cookie-notice > div{
  display:flex!important;
  justify-content: flex-end!important;
  align-items: center!important;
  padding-top:1em;
  padding-bottom:1em;
}
.cookie-notice > div > div {
  padding-right:1em;
  margin-right:auto;
}
.cookie-notice button{
  background:transparent;
  border:solid 1px #ffffff;
  border-radius:0;
  color:#ffffff;
  padding:8px 15px;
}
.cookie-notice button:hover{
  background-color:rgba(255,255,255,0.4);
  color:#ffffff;
}
@keyframes cookie-notice-slide-in{
  0% {
    transform: translateY(10rem);
  }
  100%{
    transform:none;
  }
}
1.0.7

Fixed permissions

Dec 13, 2017

1.0.6

Registered permissions

Dec 13, 2017

1.0.5

Component cookieNotice required

Dec 06, 2017

1.0.4

Fixed component namespace

Dec 06, 2017

1.0.3

Added default values for empty content

Dec 06, 2017

1.0.2

Added cookie expiration date

Dec 04, 2017

1.0.1

First version of CookieNotice

Nov 30, 2017

Upgrade to version 1.05

Component tag {% component 'cookieNotice' %} must be included somewhere in the layout body to display cookie consent banner.

description = "layout"
[cookieNotice]
loadCSS = 1
==
<!DOCTYPE html>
<html>
  <head>
    ...
  </head>
  <body>
    {% component 'cookieNotice' %}
    ...
  </body>
</html>