Browse Source

updatew silktide to v.1.0.8+ (17dd73ceb304)

fixes T4.

themage
theMage 4 years ago
parent
commit
fad74269ec

+ 18 - 0
Changelog.md

@ -0,0 +1,18 @@
1
= Changelog
2
3
== version 0.4.1
4
* update silktide cookie consent to 1.0.8+ (17dd73ceb304)
5
6
== version 0.4
7
* fix reference to a different plugin
8
9
== version 0.3
10
* always use the local version of the themes
11
12
== version 0.2
13
* remove some debug
14
15
== version 0.1
16
* Initial version
17
18

+ 15 - 3
README.pod

@ -1,6 +1,11 @@
1
=head1 WP Cookie Consent
1
= WP Cookie Consent
2 2
3
=head2 Why?
3
== Development
4
5
* [Source Code](http://magick-source.net/diffusion/COOKIECONS/)
6
* [Issues](http://magick-source.net/project/view/5/)
7
8
== Why? 
4 9
5 10
Because legislators are quite often ignorant about the themes they
6 11
create laws on, and this is not different.
@ -11,4 +16,11 @@ media (facebook, twitter, etc) widgets or that advertising will
11 16
use cookies, almost every website is now required by law to have
12 17
a message saying that it uses cookies.
13 18
14
=cude
19
== About Silktide
20
21
This plugin is a mostly a wrapper around SilkTide's Cookie Consent.
22
the complete code for their original javascript code can be downloaded
23
from [github](https://github.com/silktide/cookieconsent2).
24
25
26

+ 2 - 2
eu-cookie-consent.php

@ -3,14 +3,14 @@
3 3
Plugin Name: eu-cookie-consent
4 4
Plugin URI: http://magick-source.net/for-wordpress/eu-cookie-consent
5 5
Description: Show a message warning users that the site uses cookies
6
Version: 0.3
6
Version: 0.3.1
7 7
Author: theMage
8 8
Author URI: http://magick-source.net/u/themage
9 9
Text Domain: eu-cookie-consent
10 10
License: http://www.gnu.org/licenses/gpl-2.0.en.html
11 11
*/
12 12
13
define( 'EU_COOKIECONSENT_VERSION', 0.4);
13
define( 'EU_COOKIECONSENT_VERSION', '0.3.1');
14 14
15 15
global $cookie_options_defaults;
16 16
$cookie_options_defaults = array(

+ 7 - 3
readme.txt

@ -3,7 +3,7 @@ Contributors: theMage
3 3
Tags: cookie, consent, EU Law
4 4
Requires at least: 4.0
5 5
Tested up to: 4.3
6
Stable tag: 0.4
6
Stable tag: 0.4.1
7 7
License: GPLv2 or later
8 8
License URI: http://www.gnu.org/licenses/gpl-2.0.html
9 9
@ -15,10 +15,14 @@ Consent into wordpress, including a setting page to choose the theme to
15 15
use and the remaining configurations.
16 16
17 17
= Developement =
18
[http://magick-source.net/for-wordpress/wp-cookie-consent](http://magick-source.net/for-wordpress/wp-cookie-consent)
18
* [Code Source](http://magick-source.net/diffusion/COOKIECONS/)
19
* [Issues](http://magick-source.net/project/view/5/)
19 20
20 21
== Changelog ==
21
= Versino 0.4 =
22
= Version 0.4.1 =
23
* update silktide cookie consent to 1.0.8+ (17dd73ceb304)
24
25
= Version 0.4 =
22 26
* fix reference to a different plugin
23 27
24 28
= Version 0.3 =

+ 1 - 1
silktide/README.md

@ -28,7 +28,7 @@ gulp build
28 28
```
29 29
30 30
## License
31
Code released under the [GPLv3 License](http://www.gnu.org/copyleft/gpl.html).
31
Code released under the [MIT licence](http://opensource.org/licenses/MIT).
32 32
33 33
## Credits
34 34

+ 0 - 23
silktide/bower.json

@ -1,23 +0,0 @@
1
{
2
  "name": "cookieconsent2",
3
  "version": "1.0.0",
4
  "homepage": "https://github.com/silktide/cookieconsent2",
5
  "authors": [
6
    "silktide"
7
  ],
8
  "description": "Silktide's cookie consent plugin v2",
9
  "main": "cookieconsent.js",
10
  "keywords": [
11
    "cookieconsent",
12
    "cookie",
13
    "law"
14
  ],
15
  "license": "GPLv3",
16
  "ignore": [
17
    "**/.*",
18
    "node_modules",
19
    "bower_components",
20
    "test",
21
    "tests"
22
  ]
23
}

BIN
silktide/cookie-consent-logo.png


+ 8 - 5
silktide/cookieconsent.js

@ -16,11 +16,13 @@
16 16
  // Name of cookie to be set when dismissed
17 17
  var DISMISSED_COOKIE = 'cookieconsent_dismissed';
18 18
19
  // The path to built in themes (s3 bucket)
20
  var THEME_BUCKET_PATH = '//s3.amazonaws.com/cc.silktide.com/';
19
  // The path to built in themes
20
  // Note: Directly linking to a version on the CDN like this is horrible, but it's less horrible than people downloading the code
21
  // then discovering that their CSS bucket disappeared
22
  var THEME_BUCKET_PATH = '//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/1.0.10/';
21 23
22 24
  // No point going further if they've already dismissed.
23
  if (document.cookie.indexOf(DISMISSED_COOKIE) > -1) {
25
  if (document.cookie.indexOf(DISMISSED_COOKIE) > -1 || (window.navigator && window.navigator.CookiesOK)) {
24 26
    return;
25 27
  }
26 28
@ -153,7 +155,7 @@
153 155
    var insertReplacements = function (htmlStr, scope) {
154 156
      return htmlStr.replace(/\{\{(.*?)\}\}/g, function (_match, sub) {
155 157
        var tokens = sub.split('||');
156
        var value;
158
        var value, token;
157 159
        while (token = tokens.shift()) {
158 160
          token = token.trim();
159 161
@ -231,6 +233,7 @@
231 233
      dismiss: 'Got it!',
232 234
      learnMore: 'More info',
233 235
      link: null,
236
      target: '_self',
234 237
      container: null, // selector
235 238
      theme: 'light-floating',
236 239
      domain: null, // default to current domain.
@ -241,7 +244,7 @@
241 244
        '<div class="cc_banner cc_container cc_container--open">',
242 245
        '<a href="#null" data-cc-event="click:dismiss" target="_blank" class="cc_btn cc_btn_accept_all">{{options.dismiss}}</a>',
243 246
244
        '<p class="cc_message">{{options.message}} <a data-cc-if="options.link" class="cc_more_info" href="{{options.link || "#null"}}">{{options.learnMore}}</a></p>',
247
        '<p class="cc_message">{{options.message}} <a data-cc-if="options.link" target="{{ options.target }}" class="cc_more_info" href="{{options.link || "#null"}}">{{options.learnMore}}</a></p>',
245 248
246 249
        '<a class="cc_logo" target="_blank" href="http://silktide.com/cookieconsent">Cookie Consent plugin for the EU cookie law</a>',
247 250
        '</div>',

+ 1 - 1
silktide/example.remote.html

@ -21,5 +21,5 @@
21 21
        theme: 'dark-top'
22 22
    }
23 23
</script>
24
<script type="text/javascript" src="//s3.amazonaws.com/cc.silktide.com/cookieconsent.latest.min.js"></script>
24
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/1.0.9/cookieconsent.min.js"></script>
25 25
</html>

+ 0 - 32
silktide/gulpfile.js

@ -1,32 +0,0 @@
1
var gulp = require('gulp');
2
var sass = require('gulp-sass');
3
var uglify = require('gulp-uglify');
4
var rename = require("gulp-rename");
5
var yargs = require("yargs");
6
7
gulp.task('sass', function () {
8
  gulp.src('./styles/*.scss')
9
    .pipe(sass({outputStyle: 'compressed'}))
10
    .pipe(gulp.dest('./build'));
11
});
12
13
gulp.task('minify', function () {
14
  var minifyPipe =
15
    gulp.src('./cookieconsent.js')
16
    .pipe(uglify())
17
    .pipe(rename('cookieconsent.latest.min.js'))
18
    .pipe(gulp.dest('./build'));
19
20
  if (yargs.argv.tag!==undefined) {
21
    minifyPipe
22
      .pipe(rename('cookieconsent.'+yargs.argv.tag+'.min.js'))
23
      .pipe(gulp.dest('./build'));
24
  }
25
});
26
27
gulp.task('copy-images', function () {
28
  gulp.src('theme-previews/*.png')
29
    .pipe(gulp.dest('./build'));
30
});
31
32
gulp.task('build', ['sass', 'minify', 'copy-images']);

+ 21 - 0
silktide/licence

@ -0,0 +1,21 @@
1
The MIT License (MIT)
2
3
Copyright (c) 2015 Silktide Ltd
4
5
Permission is hereby granted, free of charge, to any person obtaining a copy
6
of this software and associated documentation files (the "Software"), to deal
7
in the Software without restriction, including without limitation the rights
8
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
copies of the Software, and to permit persons to whom the Software is
10
furnished to do so, subject to the following conditions:
11
12
The above copyright notice and this permission notice shall be included in
13
all copies or substantial portions of the Software.
14
15
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
THE SOFTWARE.

+ 7 - 4
silktide/package.json

@ -1,13 +1,16 @@
1 1
{
2 2
  "name": "cookieconsent2",
3
  "version": "0.9.9",
3
  "version": "1.0.9",
4 4
  "description": "Silktide's cookie consent tool.",
5 5
  "main": "cookieconsent.js",
6 6
  "devDependencies": {
7
    "gulp": "^3.8.10",
7
    "del": "^2.0.2",
8
    "gulp": "^3.9.0",
8 9
    "gulp-rename": "^1.2.0",
10
    "gulp-replace": "^0.5.4",
9 11
    "gulp-sass": "^1.3.2",
10
    "gulp-uglify": "^1.1.0"
12
    "gulp-uglify": "^1.1.0",
13
    "run-sequence": "^1.1.4"
11 14
  },
12 15
  "homepage": "http://silktide.com/tools/cookieconsent",
13 16
  "scripts": {
@ -18,7 +21,7 @@
18 21
    "url": "https://github.com/silktide/cookieconsent2.git"
19 22
  },
20 23
  "author": "Silktide Ltd.",
21
  "license": "GPLv3",
24
  "license": "MIT",
22 25
  "dependencies": {
23 26
    "yargs": "^3.9.1"
24 27
  }

+ 0 - 12
silktide/sass.rb

@ -1,12 +0,0 @@
1
## config file for compass
2
# compile files with:
3
# compass compile -c sass.rb
4
5
require 'compass/import-once/activate'
6
7
http_path = "/"
8
css_dir = "styles"
9
sass_dir = "sass"
10
11
output_style = :nested
12
line_comments = false

+ 4 - 1
silktide/sass/_variables.scss

@ -5,4 +5,7 @@ $screen-lg-min: 1200px;
5 5
6 6
$screen-sm-max: 767px;
7 7
$screen-md-max: 991px;
8
$screen-lg-max: 1199px;
8
$screen-lg-max: 1199px;
9
10
$plugin-height: 66px !default;
11
$logo: url(https://s3-eu-west-1.amazonaws.com/assets.cookieconsent.silktide.com/cookie-consent-logo.png);

+ 2 - 2
silktide/sass/basic-layouts/_base.scss

@ -33,7 +33,7 @@
33 33
        width:100px;
34 34
        height:22px;
35 35
        background-size: cover;
36
        background-image: url(../cookie-consent-logo.png);
36
        background-image: $logo;
37 37
        opacity:0.9;
38 38
        transition: opacity 200ms;
39 39
    }
@ -95,4 +95,4 @@
95 95
    .cc_container {
96 96
        display:none;
97 97
    }
98
}
98
}

+ 1 - 1
silktide/sass/basic-layouts/_top.scss

@ -8,7 +8,7 @@ $body-top-offset: -15px;
8 8
$body-side-offset: -10px;
9 9
10 10
.cc_banner-wrapper {
11
    height:66px;
11
    height:$plugin-height;
12 12
}
13 13
14 14
.cc_container {

+ 3 - 1
silktide/styles/dark-bottom.css

@ -21,7 +21,7 @@
21 21
  width: 100px;
22 22
  height: 22px;
23 23
  background-size: cover;
24
  background-image: url(../cookie-consent-logo.png);
24
  background-image: url(https://s3-eu-west-1.amazonaws.com/assets.cookieconsent.silktide.com/cookie-consent-logo.png);
25 25
  opacity: 0.9;
26 26
  transition: opacity 200ms; }
27 27
.cc_container .cc_logo:hover,
@ -145,3 +145,5 @@
145 145
  -o-animation-duration: 0.8s;
146 146
  -webkit-animation-name: slideUp;
147 147
  animation-name: slideUp; }
148
149
/*# sourceMappingURL=dark-bottom.css.map */

+ 3 - 1
silktide/styles/dark-floating-tada.css

@ -21,7 +21,7 @@
21 21
  width: 100px;
22 22
  height: 22px;
23 23
  background-size: cover;
24
  background-image: url(../cookie-consent-logo.png);
24
  background-image: url(https://s3-eu-west-1.amazonaws.com/assets.cookieconsent.silktide.com/cookie-consent-logo.png);
25 25
  opacity: 0.9;
26 26
  transition: opacity 200ms; }
27 27
.cc_container .cc_logo:hover,
@ -176,3 +176,5 @@
176 176
  -moz-animation-name: tada;
177 177
  -o-animation-name: tada;
178 178
  animation-name: tada; }
179
180
/*# sourceMappingURL=dark-floating-tada.css.map */

+ 3 - 1
silktide/styles/dark-floating.css

@ -21,7 +21,7 @@
21 21
  width: 100px;
22 22
  height: 22px;
23 23
  background-size: cover;
24
  background-image: url(../cookie-consent-logo.png);
24
  background-image: url(https://s3-eu-west-1.amazonaws.com/assets.cookieconsent.silktide.com/cookie-consent-logo.png);
25 25
  opacity: 0.9;
26 26
  transition: opacity 200ms; }
27 27
.cc_container .cc_logo:hover,
@ -148,3 +148,5 @@
148 148
  animation-fill-mode: both;
149 149
  -webkit-animation-name: fadeInRight;
150 150
  animation-name: fadeInRight; }
151
152
/*# sourceMappingURL=dark-floating.css.map */

+ 3 - 1
silktide/styles/dark-inline.css

@ -21,7 +21,7 @@
21 21
  width: 100px;
22 22
  height: 22px;
23 23
  background-size: cover;
24
  background-image: url(../cookie-consent-logo.png);
24
  background-image: url(https://s3-eu-west-1.amazonaws.com/assets.cookieconsent.silktide.com/cookie-consent-logo.png);
25 25
  opacity: 0.9;
26 26
  transition: opacity 200ms; }
27 27
.cc_container .cc_logo:hover,
@ -100,3 +100,5 @@
100 100
  .cc_container a:hover,
101 101
  .cc_container a:active {
102 102
    color: #b2f7ff; }
103
104
/*# sourceMappingURL=dark-inline.css.map */

+ 3 - 1
silktide/styles/dark-top.css

@ -21,7 +21,7 @@
21 21
  width: 100px;
22 22
  height: 22px;
23 23
  background-size: cover;
24
  background-image: url(../cookie-consent-logo.png);
24
  background-image: url(https://s3-eu-west-1.amazonaws.com/assets.cookieconsent.silktide.com/cookie-consent-logo.png);
25 25
  opacity: 0.9;
26 26
  transition: opacity 200ms; }
27 27
.cc_container .cc_logo:hover,
@ -143,3 +143,5 @@
143 143
  animation-duration: 0.8s;
144 144
  -webkit-animation-name: growDown;
145 145
  animation-name: growDown; }
146
147
/*# sourceMappingURL=dark-top.css.map */

+ 3 - 1
silktide/styles/light-bottom.css

@ -21,7 +21,7 @@
21 21
  width: 100px;
22 22
  height: 22px;
23 23
  background-size: cover;
24
  background-image: url(../cookie-consent-logo.png);
24
  background-image: url(https://s3-eu-west-1.amazonaws.com/assets.cookieconsent.silktide.com/cookie-consent-logo.png);
25 25
  opacity: 0.9;
26 26
  transition: opacity 200ms; }
27 27
.cc_container .cc_logo:hover,
@ -146,3 +146,5 @@
146 146
  -o-animation-duration: 0.8s;
147 147
  -webkit-animation-name: slideUp;
148 148
  animation-name: slideUp; }
149
150
/*# sourceMappingURL=light-bottom.css.map */

+ 3 - 1
silktide/styles/light-floating.css

@ -21,7 +21,7 @@
21 21
  width: 100px;
22 22
  height: 22px;
23 23
  background-size: cover;
24
  background-image: url(../cookie-consent-logo.png);
24
  background-image: url(https://s3-eu-west-1.amazonaws.com/assets.cookieconsent.silktide.com/cookie-consent-logo.png);
25 25
  opacity: 0.9;
26 26
  transition: opacity 200ms; }
27 27
.cc_container .cc_logo:hover,
@ -154,3 +154,5 @@
154 154
  .cc_container {
155 155
    border-radius: 5px;
156 156
    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.2); } }
157
158
/*# sourceMappingURL=light-floating.css.map */

+ 3 - 1
silktide/styles/light-top.css

@ -21,7 +21,7 @@
21 21
  width: 100px;
22 22
  height: 22px;
23 23
  background-size: cover;
24
  background-image: url(../cookie-consent-logo.png);
24
  background-image: url(https://s3-eu-west-1.amazonaws.com/assets.cookieconsent.silktide.com/cookie-consent-logo.png);
25 25
  opacity: 0.9;
26 26
  transition: opacity 200ms; }
27 27
.cc_container .cc_logo:hover,
@ -144,3 +144,5 @@
144 144
  animation-duration: 0.8s;
145 145
  -webkit-animation-name: growDown;
146 146
  animation-name: growDown; }
147
148
/*# sourceMappingURL=light-top.css.map */