Simulateur revenus #34

Open
deborah.jean wants to merge 10 commits from simulateur_revenus into master
2 changed files with 22 additions and 2 deletions
Showing only changes of commit 73ccac49d7 - Show all commits
+21 -1
View File
@@ -9,4 +9,24 @@
</article>
{% include "partials/components/contact-form.njk" %}
</main>
{% endblock %}
<script>
const iframeContainer = document.querySelector('.simulateur .iframe-container');
const iframe = document.getElementById('simulateurFrame');
const iframeContent = document.getElementById('simulateurFrame').contentWindow;
function setIframeHeight() {
iframe.style.height = iframeContent.document.body.scrollHeight + 'px';
iframeContainer.style.minHeight = iframeContent.document.body.scrollHeight + 'px';
iframeContainer.style.paddingTop = '0';
}
iframe.addEventListener('load', () => {
setIframeHeight();
setTimeout(function() {
setIframeHeight(); // permet de reajuster apres chargement complet au besoin
}, 2000);
});
</script>
{% endblock %}
+1 -1
View File
@@ -2,7 +2,7 @@
width: 100%;
height: 100%;
position: relative;
padding-top: 90vh;
padding-top: 100%;
iframe {
position: absolute;