Skip to content

Commit

Permalink
Add cookie bar
Browse files Browse the repository at this point in the history
Fixes #92
  • Loading branch information
eronisko committed Apr 23, 2019
1 parent 10b0713 commit 0f94f12
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
//= require jquery
//= require activestorage
//= require turbolinks
//= require cookie_bar
//= require_tree .

$(document).on('turbolinks:load', function () {
Expand Down
18 changes: 18 additions & 0 deletions app/assets/javascripts/cookie_bar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
$(document).on('turbolinks:load', function () {
window.cookieconsent.initialise({
"palette": {
"popup": {
"background": "#06070b"
},
"button": {
"background": "#3a67e8"
}
},
"theme": "classic",
"content": {
"message": "Tento web používa súbory cookie na poskytovanie služieb a analýzu webu. Používaním tohto webu vyjadrujete svoj súhlas s používaním súborov cookie.",
"dismiss": "OK"
},
"showLink": false
})
});
2 changes: 2 additions & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
<meta name="description" content="<%= content_for(:description) %>">
<% end %>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= stylesheet_link_tag '//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.css' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag '//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.js' %>
</head>

<body class="govuk-template__body">
Expand Down

0 comments on commit 0f94f12

Please sign in to comment.