-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcollege-work.html
102 lines (97 loc) · 3.07 KB
/
college-work.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>College work</title>
<style>
#popup {
display: none;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
border: 1px solid #000;
background-color: white;
padding: 20px;
z-index: 100;
/* added styles */
max-width: 90vw;
max-height: 90vh;
overflow-y: auto;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}
#overlay {
display: none;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
z-index: 50;
}
/* added styles for close button */
#close-button {
background-color: #333;
color: white;
border: none;
padding: 10px 20px;
border-radius: 4px;
font-size: 16px;
cursor: pointer;
transition: background-color 0.3s ease-in-out;
}
#close-button:hover {
background-color: #555;
}
/* added styles for scrollbar */
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
background-color: #f1f1f1;
}
::-webkit-scrollbar-thumb {
background-color: #888;
border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
background-color: #555;
}
</style>
</head>
<body>
<iframe id="background" src="index.html" style="width:100%; height:100vh; border:none;"></iframe>
<div id="overlay"></div>
<div id="popup">
<div id="popup-content"></div>
<button id="close-button" style="display: block; margin-top: 10px;">Close</button>
</div>
<script>
const popup = document.getElementById('popup');
const overlay = document.getElementById('overlay');
const closeButton = document.getElementById('close-button');
function openPopup() {
popup.style.display = 'block';
overlay.style.display = 'block';
fetch('College/index.html')
.then(response => response.text())
.then(html => {
const popupContent = document.getElementById('popup-content');
popupContent.innerHTML = html;
})
.catch(error => console.log(error));
}
function closePopup() {
popup.style.display = 'none';
overlay.style.display = 'none';
}
closeButton.addEventListener('click', closePopup);
overlay.addEventListener('click', closePopup);
window.addEventListener('DOMContentLoaded', () => {
setTimeout(openPopup, 1000); // This will open the popup 1 second after the page loads
});
</script>
</body>
</html>