1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2024-11-25 05:30:18 +01:00
hugo-theme-bootstrap4-blog/layouts/partials/cookie-consent.html
Alan Orth 0e381ab120
Start using SRI hashes for CSS/JS assets
Uses Hugo's site data mechanism to load pre-generated asset hashes.
2017-01-11 10:42:49 +02:00

27 lines
880 B
HTML

<link href="{{ .Site.BaseURL }}css/cookieconsent.min.css" rel="stylesheet" type="text/css" integrity="{{ .Site.Data.sri.cookieconsentcss }}" crossorigin="anonymous">
<script src="{{ .Site.BaseURL }}js/cookieconsent.min.js" integrity="{{ .Site.Data.sri.cookieconsentjs }}" crossorigin="anonymous" async></script>
<script>
window.addEventListener("load", function(){
window.cookieconsent.initialise({
"palette": {
"popup": {
"background": "#428bca",
"text": "#ffffff"
},
"button": {
"background": "#f71559"
}
},
"content": {
"message": '{{ i18n "cookieMessage" }}',
"dismiss": '{{ i18n "cookieDismiss" }}',
"link": '{{ i18n "cookieLink" }}',
"href": "{{ .Site.Params.cookie_consent_info_url | absURL}}"
},
"position": "bottom-right"
})});
</script>
{{- /* vim: set ts=2 sw=2 et: */}}