Accueil › Intégrer la question du jour sur votre site

Intégrer la question du jour sur votre site

Collez ce code sur votre page. Le widget se met à jour chaque jour sans maintenance de votre côté.

Largeur minimale recommandée : 320 px.

Code à intégrer

<div class="o32-qdj-embed" style="max-width:100%">
<iframe id="o32-qdj" src="https://objectif32.com/widget/question-du-jour/" width="100%" height="700" loading="lazy" title="Question civique du jour : Objectif 32" style="display:block;width:100%;border:0;overflow:hidden;transition:height 150ms ease-out"></iframe>
</div>
<script>
(function(){
  var iframe=document.getElementById("o32-qdj");
  if(!iframe)return;
  window.addEventListener('message',function(e){
    if(e.origin!=="https://objectif32.com")return;
    if(e.source!==iframe.contentWindow)return;
    var d=e.data;
    if(!d||d.type!=="o32-qdj-height")return;
    var h=Number(d.h);
    if(!Number.isFinite(h))return;
    h=Math.min(1600,Math.max(300,Math.round(h)));
    iframe.style.height=h+'px';
  });
})();
</script>

Aperçu