完成实验环境并且启用懒加载
This commit is contained in:
parent
5333cea014
commit
2d6b5c75a7
|
@ -65,7 +65,7 @@
|
|||
width: 100%;
|
||||
height: 100%;
|
||||
border: none;
|
||||
background-color: white;
|
||||
background-color: rgb(34, 34, 34);
|
||||
box-shadow: -5px 0 5px rgba(0, 0, 0, 0.2);
|
||||
z-index: 1000;
|
||||
overflow-y: auto;
|
||||
|
@ -75,6 +75,7 @@
|
|||
}
|
||||
|
||||
.popup-window iframe {
|
||||
background-color: rgb(34, 34, 34);
|
||||
width: 500px;
|
||||
height: 100vh;
|
||||
/* Use viewport height to fill the height of the window */
|
||||
|
@ -85,6 +86,14 @@
|
|||
right: calc(-100% + 500px);
|
||||
/* Slide the window into view */
|
||||
}
|
||||
|
||||
#pFrame {
|
||||
background-color: rgb(34, 34, 34);
|
||||
width: 500px;
|
||||
height: 100vh;
|
||||
/* Use viewport height to fill the height of the window */
|
||||
border: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
@ -280,7 +289,7 @@
|
|||
</nav>
|
||||
</div>
|
||||
<div id="popup-window" class="popup-window">
|
||||
<iframe src="https://nj1.mossfrp.cn:52719/" frameborder="0"></iframe>
|
||||
<iframe src="about:blank" id="pFrame" frameborder="0"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -394,15 +403,26 @@
|
|||
</script>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
<!-- study env -->
|
||||
<!-- https://nj1.mossfrp.cn:52719/ -->
|
||||
<script>
|
||||
var link = "https://nj1.mossfrp.cn:52719/";
|
||||
document.getElementById('popup-btn').addEventListener('click', function () {
|
||||
var popupWindow = document.getElementById('popup-window');
|
||||
if (popupWindow.classList.contains('show')) {
|
||||
popupWindow.classList.remove('show');
|
||||
if (window.screen.width >= 700) {
|
||||
var popupWindow = document.getElementById('popup-window');
|
||||
if (popupWindow.classList.contains('show')) {
|
||||
popupWindow.classList.remove('show');
|
||||
} else {
|
||||
popupWindow.classList.add('show');
|
||||
if (document.getElementById("pFrame").src === "about:blank")
|
||||
document.getElementById("pFrame").src = link
|
||||
}
|
||||
} else {
|
||||
popupWindow.classList.add('show');
|
||||
window.open(link, "_blank");
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</div>
|
||||
|
|
Reference in New Issue