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