Skip to content
Snippets Groups Projects
Commit 994fe58b authored by Eloi Perdereau's avatar Eloi Perdereau
Browse files

add mailchimp script to default layout head

parent b233a7ef
Branches
Tags
No related merge requests found
......@@ -55,3 +55,4 @@
});
}
</script>
......@@ -12,6 +12,7 @@
<head>
{% include head.html %}
{% include head/custom.html %}
<script id="mcjs">!function(c,h,i,m,p){m=c.createElement(h),p=c.getElementsByTagName(h)[0],m.async=1,m.src=i,p.parentNode.insertBefore(m,p)}(document,"script","https://chimpstatic.com/mcjs-connected/js/users/dde8bfc315d8dddb954801cda/55de9db113fb08c0f5887f632.js");</script>
</head>
<body class="layout--{{ page.layout | default: layout.layout }}{% if page.classes or layout.classes %}{{ page.classes | default: layout.classes | join: ' ' | prepend: ' ' }}{% endif %}">
......
......@@ -10,6 +10,17 @@
<body>
<script>
window.netlifyIdentity.setLocale("fr");
window.netlifyIdentity.on("init", user => {
console.log("netlify init! ###################### " + user.email);
if (user && user.email == "jardin.contact@luminy.org")
window.netlifyIdentity.logout().then( (err) => {
console.log(user.email + " déconnecté!");
document.location.href = "/";
});
if (!user) {
}
});
</script>
<!-- Include the script that builds the page and powers Netlify CMS -->
<script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment