diff --git a/_includes/scripts.html b/_includes/scripts.html index 63dbe63d5c023cb9cb7c97c004317571c430e1aa..9179a8ef4dbe9c12f145464d1e4565f2461ea233 100644 --- a/_includes/scripts.html +++ b/_includes/scripts.html @@ -55,3 +55,4 @@ }); } </script> + diff --git a/_layouts/default.html b/_layouts/default.html index 34c4e3f7c98f2cb4507181923b982b035b563578..b86a5a48fcfa849fdc4534d5110ada36a28c94b8 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -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 %}"> diff --git a/lepuget/index.html b/lepuget/index.html index e0a21303cdd3d70dc6376be2856d435ed37ca4cb..2e93a6c710902d6a7e551c6b3433c89e68d9d001 100644 --- a/lepuget/index.html +++ b/lepuget/index.html @@ -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>