Skip to content
Snippets Groups Projects
Commit 7e26df2e authored by HouTeng Chan's avatar HouTeng Chan
Browse files

Update file attributions.html

parent 006cb538
No related branches found
No related tags found
No related merge requests found
......@@ -56,8 +56,8 @@
}
#igem-attribution-form {
width: 100%;
height: 80vh; /* Adjust the height as needed */
border: none;
min-height: 500px; /* Set a minimum height */
}
</style>
</head>
......@@ -77,9 +77,6 @@
<div class="row mt-4">
<div class="col-lg-12">
<script type="text/javascript">
// iframe height listener script
</script>
<iframe
id="igem-attribution-form"
src="https://teams.igem.org/wiki/Tsinghua/attributions"
......@@ -88,6 +85,25 @@
</div>
</div>
</div>
<script type="text/javascript">
function adjustIframeHeight() {
var iframe = document.getElementById('igem-attribution-form');
iframe.onload = function() {
iframe.style.height = iframe.contentWindow.document.body.scrollHeight + 'px';
};
// Listen for changes in iframe content
window.addEventListener('message', function(event) {
if (event.data.type === 'resize') {
iframe.style.height = event.data.height + 'px';
}
}, false);
}
// Execute when the page is fully loaded
window.onload = adjustIframeHeight;
</script>
</body>
</html>
{% endblock %}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment