diff --git a/wiki/pages/attributions.html b/wiki/pages/attributions.html index 626ee2f49b1f5c0d0ef4966dc8f7b71f5dcefdf6..d679c6325cab1598e372b57b425fea6d00309bf5 100644 --- a/wiki/pages/attributions.html +++ b/wiki/pages/attributions.html @@ -1,4 +1,3 @@ - <!DOCTYPE html> <html lang="en"> <head> @@ -12,21 +11,26 @@ line-height: 1.6; margin: 0; padding: 0; + display: flex; + justify-content: center; + align-items: center; + min-height: 100vh; } .content { padding: 20px; - max-width: 1500px; - margin: 0 auto; + max-width: 100%; + width: 100%; + box-sizing: border-box; } h2 { scroll-margin-top: 60px; } .row.mt-4 { - margin-right: 180px; - margin-left: 140px; + margin: 0 auto; + max-width: 1140px; } .sidebar { - height: 300px; + height: auto; } .grid-container { display: flex; @@ -48,6 +52,16 @@ padding-left: 20px; margin-bottom: 0; } + .progress-container { + position: fixed; + top: 20px; + right: 20px; + } + #igem-attribution-form { + width: 100%; + height: 80vh; + border: none; + } </style> </head> <body> @@ -56,41 +70,33 @@ {% block title %}Attributions{% endblock %} {% 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="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"> - <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'; - }; - window.addEventListener('message', function(event) { - if (event.data.type === 'resize') { - iframe.style.height = event.data.height + 'px'; - } - }, false); - } - - window.onload = adjustIframeHeight; - </script> - <iframe - style="width: 100%" - id="igem-attribution-form" - src="https://teams.igem.org/wiki/Tsinghua/attributions" - > - </iframe> + <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> -</div> + <script> + function adjustIframeHeight() { + var iframe = document.getElementById('igem-attribution-form'); + iframe.style.height = window.innerHeight * 0.8 + 'px'; + } + + window.onload = adjustIframeHeight; + window.onresize = adjustIframeHeight; + </script> </body> -</html> -{% endblock %} \ No newline at end of file +</html> \ No newline at end of file