mirror of
https://github.com/alanorth/hugo-theme-bootstrap4-blog.git
synced 2025-07-01 20:07:25 +02:00
use cookie consent version 3
This commit is contained in:
@ -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>
|
||||
|
Reference in New Issue
Block a user