sibu 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,12 +10,48 @@
10
10
  <%= stylesheet_link_tag (conf[:custom_styles] ? @site.style_url : @site.site_template.path), media: "all" %>
11
11
  <%= javascript_include_tag @site.site_template.path %>
12
12
  <% unless @site.analytics_id.blank? %>
13
- <script async src="https://www.googletagmanager.com/gtag/js?id=<%= @site.analytics_id %>"></script>
14
- <script>
15
- window.dataLayer = window.dataLayer || [];
16
- function gtag(){dataLayer.push(arguments);}
17
- gtag('js', new Date());
18
- gtag('config', '<%= @site.analytics_id %>');
13
+ <%= stylesheet_link_tag 'tarteaucitron/tarteaucitron' %>
14
+ <%= javascript_include_tag 'tarteaucitron/tarteaucitron' %>
15
+ <script type="text/javascript">
16
+ var defaultOpts = {
17
+ "privacyUrl": "", /* Privacy policy url */
18
+ "hashtag": "#tarteaucitron", /* Open the panel with this hashtag */
19
+ "cookieName": "tarteaucitron", /* Cookie name */
20
+ "orientation": "bottom", /* Banner position (top - bottom) */
21
+ "showAlertSmall": false, /* Show the small banner on bottom right */
22
+ "cookieslist": true, /* Show the cookie list */
23
+ "adblocker": false, /* Show a Warning if an adblocker is detected */
24
+ "AcceptAllCta": true, /* Show the accept all button when highPrivacy on */
25
+ "highPrivacy": false, /* Disable auto consent */
26
+ "handleBrowserDNTRequest": false, /* If Do Not Track == 1, disallow all */
27
+ "removeCredit": false, /* Remove credit link */
28
+ "moreInfoLink": true, /* Show more info link */
29
+ "useExternalCss": true, /* If false, the tarteaucitron.css file will be loaded */
30
+ "readmoreLink": "/cookiespolicy" /* Change the default readmore link */
31
+ };
32
+ if (typeof tarteaucitronOpts === 'undefined') {
33
+ var tarteaucitronOpts = defaultOpts;
34
+ } else {
35
+ tarteaucitronOpts["hashtag"] = "#tarteaucitron";
36
+ tarteaucitronOpts["cookieName"] = "tarteaucitron";
37
+ tarteaucitronOpts["orientation"] = tarteaucitronOpts["orientation"] || "top";
38
+ tarteaucitronOpts["showAlertSmall"] = !(tarteaucitronOpts["showAlertSmall"] === false);
39
+ tarteaucitronOpts["cookieslist"] = !(tarteaucitronOpts["cookieslist"] === false);
40
+ tarteaucitronOpts["adblocker"] = tarteaucitronOpts["adblocker"] === true;
41
+ tarteaucitronOpts["AcceptAllCta"] = tarteaucitronOpts["AcceptAllCta"] === true;
42
+ tarteaucitronOpts["highPrivacy"] = !(tarteaucitronOpts["AcceptAllCta"] === false);
43
+ tarteaucitronOpts["handleBrowserDNTRequest"] = !(tarteaucitronOpts["handleBrowserDNTRequest"] === false);
44
+ tarteaucitronOpts["removeCredit"] = !(tarteaucitronOpts["removeCredit"] === false);
45
+ tarteaucitronOpts["moreInfoLink"] = tarteaucitronOpts["moreInfoLink"] === true;
46
+ tarteaucitronOpts["useExternalCss"] = !(tarteaucitronOpts["useExternalCss"] === false);
47
+ tarteaucitronOpts["cookieDomain"] = "<%= @site.domain %>";
48
+ }
49
+ tarteaucitron.init(tarteaucitronOpts);
50
+ </script>
51
+ <script type="text/javascript">
52
+ tarteaucitron.user.analyticsUa = '<%= @site.analytics_id %>';
53
+ tarteaucitron.user.analyticsMore = function () { };
54
+ (tarteaucitron.job = tarteaucitron.job || []).push('analytics');
19
55
  </script>
20
56
  <% end %>
21
57
  <% end %>
@@ -0,0 +1 @@
1
+ Rails.application.config.assets.precompile += %w( tarteaucitron/tarteaucitron.css tarteaucitron/tarteaucitron.js )
@@ -1,5 +1,8 @@
1
1
  Sibu::Engine.routes.draw do
2
2
 
3
+ scope format: true, constraints: { format: /jpg|png|gif|svg/ } do
4
+ get '/*missed', to: proc { [404, {}, ['']] }
5
+ end
3
6
  get '/', to: 'pages#show', constraints: lambda {|req| req.host != Rails.application.config.sibu[:host]}
4
7
  get '*path', to: 'pages#show', constraints: lambda {|req| req.host != Rails.application.config.sibu[:host]}
5
8
 
@@ -1,3 +1,3 @@
1
1
  module Sibu
2
- VERSION = '0.9.1'
2
+ VERSION = '0.9.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sibu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean-Baptiste Vilain
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-29 00:00:00.000000000 Z
11
+ date: 2019-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -130,11 +130,26 @@ files:
130
130
  - app/assets/javascripts/sibu/common.js
131
131
  - app/assets/javascripts/sibu/sibu.js.erb
132
132
  - app/assets/javascripts/tabs/van11y-accessible-tab-panel-aria.js
133
+ - app/assets/javascripts/tarteaucitron/advertising.js
134
+ - app/assets/javascripts/tarteaucitron/lang/tarteaucitron.cs.js
135
+ - app/assets/javascripts/tarteaucitron/lang/tarteaucitron.de.js
136
+ - app/assets/javascripts/tarteaucitron/lang/tarteaucitron.el.js
137
+ - app/assets/javascripts/tarteaucitron/lang/tarteaucitron.en.js
138
+ - app/assets/javascripts/tarteaucitron/lang/tarteaucitron.es.js
139
+ - app/assets/javascripts/tarteaucitron/lang/tarteaucitron.fr.js
140
+ - app/assets/javascripts/tarteaucitron/lang/tarteaucitron.it.js
141
+ - app/assets/javascripts/tarteaucitron/lang/tarteaucitron.nl.js
142
+ - app/assets/javascripts/tarteaucitron/lang/tarteaucitron.pl.js
143
+ - app/assets/javascripts/tarteaucitron/lang/tarteaucitron.pt.js
144
+ - app/assets/javascripts/tarteaucitron/lang/tarteaucitron.ru.js
145
+ - app/assets/javascripts/tarteaucitron/tarteaucitron.js.erb
146
+ - app/assets/javascripts/tarteaucitron/tarteaucitron.services.js
133
147
  - app/assets/stylesheets/cropper/cropper.css
134
148
  - app/assets/stylesheets/quill/quill.snow.css
135
149
  - app/assets/stylesheets/sibu/defaults.scss
136
150
  - app/assets/stylesheets/sibu/icons.scss
137
151
  - app/assets/stylesheets/sibu/sibu.css
152
+ - app/assets/stylesheets/tarteaucitron/tarteaucitron.css
138
153
  - app/controllers/sibu/application_controller.rb
139
154
  - app/controllers/sibu/documents_controller.rb
140
155
  - app/controllers/sibu/images_controller.rb
@@ -207,6 +222,7 @@ files:
207
222
  - app/views/sibu/sites/new.html.erb
208
223
  - app/views/sibu/sites/show.html.erb
209
224
  - app/views/sibu/sites/update.html.erb
225
+ - config/initializers/assets.rb
210
226
  - config/initializers/constants.rb
211
227
  - config/initializers/shrine.rb
212
228
  - config/routes.rb