1
0
Fork 0

Add iframe

This commit is contained in:
Mo 2022-10-29 00:39:28 +02:00
parent 0107074654
commit e274a0631b

View file

@ -7,7 +7,7 @@
<br> <br>
<div class="row pb-3"> <div class="row pb-4">
<div class="col d-flex align-content-center flex-wrap" style="min-width: 300px;"> <div class="col d-flex align-content-center flex-wrap" style="min-width: 300px;">
{% set dir = page.path | trim_start_matches(pat="/") %} {% set dir = page.path | trim_start_matches(pat="/") %}
{% set image_path = dir ~ config.extra.appointment_image_filename %} {% set image_path = dir ~ config.extra.appointment_image_filename %}
@ -24,4 +24,16 @@
</div> </div>
</div> </div>
</div> </div>
<iframe id="iframe" src="/contact-form" width="100%" title="Kontakt-Formular"></iframe>
{% endblock content %} {% endblock content %}
{% block scripts %}
<script>
let iframe = document.querySelector("#iframe");
iframe.addEventListener('load', function() {
iframe.style.height = iframe.contentDocument.body.scrollHeight + 50 + 'px';
});
</script>
{% endblock %}