-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
227 lines (198 loc) · 6.77 KB
/
index.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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Cell Division</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Fredoka:[email protected]&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Fredoka', sans-serif;
margin: 0;
padding: 0;
background-color: #00A86B;
color: #FFFFFF;
}
nav {
background-color: #FF7F00;
padding: 10px;
}
nav ul {
list-style-type: none;
padding: 0;
display: flex;
justify-content: space-around;
margin: 0;
}
nav li {
flex-grow: 1;
}
nav a {
color: #FFFFFF;
text-decoration: none;
cursor: pointer;
display: block;
padding: 10px 20px;
text-align: center;
transition: background-color 0.3s ease;
}
nav a:hover {
background-color: #FFC300;
color: #000000;
}
.content {
padding: 20px;
max-width: 1200px;
margin: 0 auto;
}
h1 {
color: #FFC300;
text-align: center;
}
.home-content {
display: flex;
align-items: center;
}
.side-image {
width: 300px;
margin-right: 20px;
}
.gallery-item {
background-color: #0066CC;
padding: 20px;
margin-bottom: 20px;
text-align: center;
cursor: pointer;
transition: transform 0.3s ease;
}
.gallery-item:hover {
transform: scale(1.02);
}
.gallery-item img {
width: 100%;
max-width: 600px;
height: auto;
margin-bottom: 15px;
}
#obj-viewer {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.8);
display: none;
flex-direction: column;
align-items: center;
justify-content: center;
}
#back-button {
position: absolute;
top: 20px;
left: 20px;
padding: 10px;
background-color: #FFC300;
color: #000000;
border: none;
cursor: pointer;
transition: background-color 0.3s ease;
}
#back-button:hover {
background-color: #FF7F00;
}
#obj-container {
width: 90%;
height: 90%;
}
.page {
display: none;
}
.page.active {
display: block;
}
.mindmap-container {
display: flex;
justify-content: center;
align-items: center;
height: calc(100vh - 100px);
}
.mindmap-container iframe {
width: 90vw;
height: 80vh;
max-width: 1200px;
max-height: 800px;
}
</style>
</head>
<body>
<nav>
<ul>
<li><a onclick="showPage('home')">Home</a></li>
<li><a onclick="showPage('mindmap')">Mind Map</a></li>
<li><a onclick="showPage('gallery')">Gallery</a></li>
</ul>
</nav>
<div id="home" class="page active">
<div class="content">
<h1>Welcome to My Website</h1>
<div class="home-content">
<img src="iMage0.jpg" alt="me" class="side-image">
<p style="font-size:20px;">
<b>Name</b>: Lim Xin Ying <br>
<b>Nickname</b>: Candy <br>
<b>Class</b>: 1K6<br>
Hi there! here is my bio homework. Hope you like it! <br>
On the second page, you can see my mind map. <br>
On the third page, you can see my 3D model. <br>
I think that it is a cool edition to my website :D
</p>
</div>
</div>
</div>
<div id="mindmap" class="page">
<div class="content">
<h1>Mind Map</h1>
<div class="mindmap-container">
<iframe src="https://miro.com/app/live-embed/uXjVLZKyZCQ=/?moveToViewport=-211,-293,884,420&embedId=418355643113" frameborder="0" scrolling="no" allow="fullscreen; clipboard-read; clipboard-write" allowfullscreen></iframe>
</div>
</div>
</div>
<div id="gallery" class="page">
<div class="content">
<h1>Gallery</h1>
<div id="gallery-container"></div>
</div>
</div>
<script>
const galleryItems = [
{ image: 'iMage1.PNG', text: 'Crossing over during meiosis. This one in particular takes more time to load.', embedLink: 'https://f3d.to/v/68ibWY' },
{ image: 'iMage2.PNG', text: 'Animal cell cytokenisis, how cells are divided.', embedLink: 'https://f3d.to/v/xrN8wf' },
{ image: 'iMage3.PNG', text: 'Metaphase of mitosis. This one is a bit cacat, its my first attempt.', embedLink: 'https://f3d.to/v/yzmaFA' },
{ image: 'iMage4.PNG', text: 'About chromosome and some other things about it.', embedLink: 'https://f3d.to/v/jnDxJj' },
];
const galleryContainer = document.getElementById('gallery-container');
function showPage(pageId) {
document.querySelectorAll('.page').forEach(page => page.classList.remove('active'));
document.getElementById(pageId).classList.add('active');
}
function createGallery() {
galleryItems.forEach((item, index) => {
const galleryItem = document.createElement('div');
galleryItem.className = 'gallery-item';
galleryItem.innerHTML = `
<img src="${item.image}" alt="${item.text}">
<p>${item.text}</p>
`;
galleryItem.addEventListener('click', () => openModelViewer(index));
galleryContainer.appendChild(galleryItem);
});
}
function openModelViewer(index) {
window.open(galleryItems[index].embedLink, '_blank');
}
createGallery();
</script>
</body>
</html>