Select Git revision
landing-page.md
-
Konrad Völkel authoredKonrad Völkel authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
semSearch.html 1.68 KiB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>HHU Search Helper</title>
<style>
body {
overflow: hidden;
}
</style>
</head>
<body>
<iframe id="chatIframe" src="chatbox.html" style="position: relative; width: 100%; border: none;" title="HHU Search Helper"></iframe>
<iframe id="resultsIframe" src="results.html" style="position: sticky; left: 15px; min-height: 300px; transition: opacity 1s ease-in-out, transform 1s ease-in-out; background-color: #f0f0f0; width: 95%; overflow: hidden; padding: 10px; border-radius: 5px; border: none; display: none; overflow: hidden;"></iframe>
<script>
/** make iframes grow with iframes inside it */
function adjustIframeSize() {
const chatIframe = document.getElementById('chatIframe');
const resultsIframe = document.getElementById('resultsIframe');
let totalHeight = 0;
if (chatIframe.offsetHeight) {
totalHeight += chatIframe.offsetHeight;
}
if (resultsIframe.style.display !== 'none' && resultsIframe.offsetHeight) {
totalHeight += resultsIframe.offsetHeight;
}
if (window.frameElement) {
window.frameElement.style.height = totalHeight + 'px';
}
}
document.getElementById('chatIframe').addEventListener('load', adjustIframeSize);
document.getElementById('resultsIframe').addEventListener('load', adjustIframeSize);
const observer = new MutationObserver(adjustIframeSize);
observer.observe(document.body, { childList: true, subtree: true, attributes: true });
</script>
</body>
</html>