mirror of
https://github.com/alanorth/hugo-theme-bootstrap4-blog.git
synced 2024-12-19 17:12: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)
|
# Cookie consent (may be required for your site in the European Union)
|
||||||
# Set the "more info" URL in this parameter. You have to
|
# Set the "more info" URL in this parameter. You have to
|
||||||
# provide a document page for this URL - see the example website
|
# provide a document page for this URL if you don't use an external URL -
|
||||||
# To avoid a menu entry for this information page add it to
|
# see the example website
|
||||||
# content/info instead of content/page or content.
|
|
||||||
# cookie_consent_info_url = "/cookie-information/"
|
# cookie_consent_info_url = "/cookie-information/"
|
||||||
|
|
||||||
[params.sidebar]
|
[params.sidebar]
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<nav class="nav blog-nav">
|
<nav class="nav blog-nav">
|
||||||
<a class="nav-link {{ if .IsHome }}active{{ end }}" href="{{ .Site.BaseURL | absLangURL }}">{{ i18n "home" }}</a>
|
<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>
|
<a class="nav-link" href="{{ .Permalink }}">{{ .Title }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</nav>
|
</nav>
|
||||||
|
@ -1,5 +1,19 @@
|
|||||||
<script type="text/javascript">
|
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.2/cookieconsent.min.css" />
|
||||||
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 }};
|
<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>
|
||||||
|
|
||||||
<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