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

Update file attributions.html

parent a92dc11d
No related branches found
No related tags found
No related merge requests found
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
...@@ -11,21 +12,18 @@ ...@@ -11,21 +12,18 @@
line-height: 1.6; line-height: 1.6;
margin: 0; margin: 0;
padding: 0; padding: 0;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
} }
.content { .content {
width: 66.67%; /* 2/3 of the screen width */ padding: 20px;
max-width: 1000px; /* Adjust as needed */ max-width: 1500px;
margin: 0 auto; margin: 0 auto;
} }
h2 { h2 {
scroll-margin-top: 60px; scroll-margin-top: 60px;
} }
.row.mt-4 { .row.mt-4 {
margin: 0; /* Remove left and right margins */ margin-right: 200px;
margin-left: 200px;
} }
.sidebar { .sidebar {
height: 300px; height: 300px;
...@@ -50,60 +48,51 @@ ...@@ -50,60 +48,51 @@
padding-left: 20px; padding-left: 20px;
margin-bottom: 0; margin-bottom: 0;
} }
.progress-container {
text-align: center;
margin-bottom: 20px;
}
#igem-attribution-form {
width: 100%;
border: none;
min-height: 500px; /* Set a minimum height */
}
</style> </style>
</head> </head>
<body> <body>
{% extends "layout.html" %} {% extends "layout.html" %}
{% block title %}Attributions{% endblock %} {% block title %}Attributions{% endblock %}
{% block page_content %} {% block page_content %}
<div class="content">
<div class="progress-container">
<svg class="progress-bar-circle" width="60" height="60">
<circle class="progress-circle" cx="30" cy="30" r="25" stroke-width="5" fill="transparent"></circle>
</svg>
<div class="progress-text">0%</div>
</div>
<div class="row mt-4">
<div class="col-lg-12">
<iframe
id="igem-attribution-form"
src="https://teams.igem.org/wiki/Tsinghua/attributions"
>
</iframe>
</div>
</div>
</div>
<script type="text/javascript"> <div class="progress-container">
function adjustIframeHeight() { <svg class="progress-bar-circle" width="60" height="60">
var iframe = document.getElementById('igem-attribution-form'); <circle class="progress-circle" cx="30" cy="30" r="25" stroke-width="5" fill="transparent"></circle>
iframe.onload = function() { </svg>
iframe.style.height = iframe.contentWindow.document.body.scrollHeight + 'px'; <div class="progress-text">0%</div>
}; </div>
// Listen for changes in iframe content <div class="row mt-4">
window.addEventListener('message', function(event) { <div class="col-lg-12">
if (event.data.type === 'resize') { <script type="text/javascript">
iframe.style.height = event.data.height + 'px'; 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);
} }
}, false);
} window.onload = adjustIframeHeight;
</script>
<iframe
style="width: 100%"
id="igem-attribution-form"
src="https://teams.igem.org/wiki/Tsinghua/attributions"
>
</iframe>
</div>
</div>
</div>
// Execute when the page is fully loaded
window.onload = adjustIframeHeight;
</script>
</body> </body>
</html> </html>
{% endblock %} {% 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