Skip to content
Snippets Groups Projects
Commit d1ec0721 authored by Tianyi Liang's avatar Tianyi Liang
Browse files

refactor: new attribution form

parent 405a6e8a
No related branches found
No related tags found
No related merge requests found
......@@ -29,18 +29,20 @@
<div class="row mt-4">
<script type="text/javascript">
// Listen to size change and update form height
window.addEventListener('message', function (e) {
const {type, data} = JSON.parse(e.data);
if (type === 'igem-attribution-form') {
const element = document.getElementById('igem-attribution-form')
element.style.height = data + 50 +'px'
window.addEventListener("message", function (e) {
if (e.origin === "https://teams.igem.org") {
const {type, data} = JSON.parse(e.data);
if (type === "igem-attribution-form") {
const element = document.getElementById("igem-attribution-form");
element.style.height = `${data + 50}px`;
}
}
});
</script>
<iframe
style='width: 100%'
id="igem-attribution-form"
src="https://attributions.igem.org?team=Example&year=2024"
src="https://teams.igem.org/TeamID/attributions">
>
</iframe>
<!-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -->
......
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