feat(chatwoot): Ajoute le script Chatwoot pour le support client en direct.

🎨 style(home.twig): Supprime commentaire inutile sur les dimensions des images.
♻️ refactor(base.twig): Déplace le script Chatwoot dans app.js pour centralisation.
This commit is contained in:
Serreau Jovann
2025-11-21 21:26:16 +01:00
parent 339093e679
commit bcb43769ce
3 changed files with 21 additions and 16 deletions

View File

@@ -429,6 +429,26 @@ document.addEventListener('DOMContentLoaded', ()=>{
// Gère le bandeau de cookies (bottom-right)
handleCookieBanner()
(function(d, t) {
var BASE_URL = "https://app.chatwoot.com";
var g = d.createElement(t),
s = d.getElementsByTagName(t)[0];
// Set the script source and make it async
g.src = BASE_URL + "/packs/js/sdk.js";
g.async = true;
// Insert the script element before the first existing script tag
s.parentNode.insertBefore(g, s);
// Initialize Chatwoot once the SDK script has loaded
g.onload = function() {
window.chatwootSDK.run({
websiteToken: '8SXvcdoWJVA77hug4mT5JhAP',
baseUrl: BASE_URL
})
}
})(document, "script");
Sentry.init({
dsn: "https://129785624e32fc0d4d7d8002a03b77b7@o4509563601092608.ingest.de.sentry.io/4510392640340048",
// Setting this option to true will send default PII data to Sentry.

View File

@@ -483,21 +483,7 @@
</div>
</footer>
<script>
(function(d,t) {
var BASE_URL="https://app.chatwoot.com";
var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src=BASE_URL+"/packs/js/sdk.js";
g.async = true;
s.parentNode.insertBefore(g,s);
g.onload=function(){
window.chatwootSDK.run({
websiteToken: '8SXvcdoWJVA77hug4mT5JhAP',
baseUrl: BASE_URL
})
}
})(document,"script");
</script>
</body>

View File

@@ -139,7 +139,6 @@
{# MODIFICATION 1 : Utilisation du nouveau filtre 'avatar_partner' #}
src="{{ partner.image | imagine_filter('avatar_partner') }}"
alt="{{ partner.name }}"
{# Conserver les dimensions intrinsèques pour éviter le CLS, même si l'image est redimensionnée #}
width="64"
height="64"
onerror="this.style.display='none'; this.nextElementSibling.style.display='block';"