GRM / index.html
Lakonik's picture
Add demo
7be19c0
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!-- Meta tags for social media banners, these should be filled in appropriatly as they are your "business card" -->
<!-- Replace the content tag with appropriate information -->
<meta property="og:title" content="GRM Live Demo"/>
<meta name="twitter:title" content="GRM Live Demo">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>GRM Live Demo</title>
<link rel="icon" type="image/x-icon" href="static/images/favicon.ico">
<style>
#maintenanceMessage, #loadingMessage {
display: none;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: white;
color: black;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
}
</style>
<script>
let iframeLoadedFlag = false;
function iframeLoaded() {
iframeLoadedFlag = true;
document.getElementById('maintenanceMessage').style.display = 'none';
document.getElementById('loadingMessage').style.display = 'none';
}
// Check after a certain time if the iframe has loaded
setTimeout(() => {
if (!iframeLoadedFlag) {
// If the iframe hasn't flagged as loaded, assume it's down and show the message
document.getElementById('maintenanceMessage').style.display = 'flex';
document.getElementById('siteIframe').style.display = 'none';
document.getElementById('loadingMessage').style.display = 'none';
}
}, 10000); // 10 seconds; adjust as necessary
</script>
</head>
<body style="margin:0;padding:0px;overflow:hidden">
<iframe id="siteIframe"
src="https://grm.hanshengchen.com"
frameborder="0"
style="overflow:hidden;height:100vh;width:100%;"
onload="iframeLoaded()">
</iframe>
<div id="loadingMessage">
<p>Loading...</p>
</div>
<div id="maintenanceMessage" style="display: none">
<p>The site is currently under maintenance. Please check back later.</p>
</div>
</body>
</html>