mirror of
https://github.com/alanorth/hugo-theme-bootstrap4-blog.git
synced 2024-12-19 09:02:18 +01:00
use cookie consent version 3
This commit is contained in:
parent
ae441647a8
commit
0a11ce6c40
@ -45,9 +45,8 @@ paginate = 5
|
||||
|
||||
# Cookie consent (may be required for your site in the European Union)
|
||||
# Set the "more info" URL in this parameter. You have to
|
||||
# provide a document page for this URL - see the example website
|
||||
# To avoid a menu entry for this information page add it to
|
||||
# content/info instead of content/page or content.
|
||||
# provide a document page for this URL if you don't use an external URL -
|
||||
# see the example website
|
||||
# cookie_consent_info_url = "/cookie-information/"
|
||||
|
||||
[params.sidebar]
|
||||
|
@ -28,7 +28,7 @@
|
||||
<div class="container">
|
||||
<nav class="nav blog-nav">
|
||||
<a class="nav-link {{ if .IsHome }}active{{ end }}" href="{{ .Site.BaseURL | absLangURL }}">{{ i18n "home" }}</a>
|
||||
{{ range where .Site.Pages "Type" "==" "page" }}
|
||||
{{ range where .Site.Pages "Type" "!=" "post" }}
|
||||
<a class="nav-link" href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
{{ end }}
|
||||
</nav>
|
||||
|
@ -1,5 +1,19 @@
|
||||
<script type="text/javascript">
|
||||
window.cookieconsent_options = {{ dict "message" "This website uses cookies." "dismiss" "Got it!" "learnMore" "More info" "link" (.Site.Params.cookie_consent_info_url | absURL) "theme" "dark-top" | jsonify | safeJS }};
|
||||
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.2/cookieconsent.min.css" />
|
||||
<script async src="https://cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.2/cookieconsent.min.js"></script>
|
||||
<script>
|
||||
window.addEventListener("load", function(){
|
||||
window.cookieconsent.initialise({
|
||||
"palette": {
|
||||
"popup": {
|
||||
"background": "#edeff5",
|
||||
"text": "#838391"
|
||||
},
|
||||
"button": {
|
||||
"background": "#4b81e8"
|
||||
}
|
||||
},
|
||||
"theme": "classic",
|
||||
"position": "top",
|
||||
"content": {{ dict "message" "This website uses cookies." "href" (.Site.Params.cookie_consent_info_url | absURL) | jsonify | safeJS }}
|
||||
})});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/1.0.10/cookieconsent.min.js"></script>
|
||||
|
Loading…
Reference in New Issue
Block a user