-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
207 lines (162 loc) · 5.35 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>LithoLab: Learn Photolithography</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/110/three.min.js"></script>
<link rel="stylesheet" href="assets/styles.css">
<style>
body { margin: 0px !important; }
canvas {width: 132px;height: 132px !important;
}
</style>
<style>
body {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-color: #4d4d4d;
}
.header {
width: 100%;
padding: 50px;
background: linear-gradient(to bottom, #000000, #2e2e2e);
display: flex;
justify-content: left;
align-items: center;
border-collapse: separate;
background-color: #333;
color: white;
text-align: center;
padding: 1rem !important;
height: 70px !important;padding: 1rem 0rem !important;
}
.header h1 {
color: white;
font-size: 24px;
font-weight: bold;
}
h1 {
text-align: center;
}
.content-text {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
}
.lesson-buttons {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
margin-left: 20px;
padding: 2px;
font-size: 16px;
}
.lesson-buttons3 {
flex-direction: row;
flex-wrap: wrap;
justify-content: flex-start;
padding: 2px;
font-size: 16px;
background: #4700ee;
}
.title-bar {
background-color: #FF0000 !important;
}
.rows {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
.cols {
display: flex;
flex-direction: column;
}
button {
width: 150px;
font-family: 'Gilroy', sans-serif;
font-weight: 600;
border: none;
font-size: 16px;
background: lightgray;
margin: 5px;
}
</style>
</head>
<body>
<div class="header">
<img onclick="openLesson('_home')" style="width: 70px;height: 70px;margin-left: 15px;" src="./assets/images/sqlogo.png">
<div class="cols">
<div class="rows">
<button class="lesson-buttons" onclick="openLesson('Lesson 1')">Lesson 1</button>
<button class="lesson-buttons" onclick="openLesson('Lesson 2')">Lesson 2</button>
<button class="lesson-buttons" onclick="openLesson('Lesson 3')">Lesson 3</button>
<button class="lesson-buttons" onclick="openLesson('Lesson 4')">Lesson 4</button>
<button class="lesson-buttons" onclick="openLesson('Lesson 5')">Lesson 5</button>
<button class="lesson-buttons" onclick="openLesson('Lesson 6')">Lesson 6</button>
<button class="lesson-buttons" onclick="openLesson('Lesson 7')">Lesson 7</button>
<button class="lesson-buttons" onclick="openLesson('Lesson 8')">Lesson 8</button>
<button class="lesson-buttons" onclick="openLesson('Lesson 9')">Lesson 9</button>
<button class="lesson-buttons" onclick="openLesson('Lesson 10')">Lesson 10</button>
</div>
</div>
</div>
<div class="content" style="
padding: 0px 16%;
">
<div class="content-text">
</div>
<div id="lessonContent"></div>
<div id="animationContainer" style="width: 132px;height: 132px;" ></div>
<script>
// Set up the scene and camera
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(75, 600 / 400, 0.1, 1000);
// Create a rotating cube and add it to the scene
const geometry = new THREE.BoxGeometry();
const material = new THREE.MeshBasicMaterial({ color: 0x00ff00 });
const cube = new THREE.Mesh(geometry, material);
scene.add(cube);
// Position the camera
camera.position.z = 5;
// Create a CSS3DRenderer
const renderer = new THREE.CSS3DRenderer();
renderer.setSize(600, 400);
document.getElementById("animation-canvas").appendChild(renderer.domElement);
// Create an animation loop
const animate = () => {
requestAnimationFrame(animate);
// Rotate the cube
cube.rotation.x += 0.01;
cube.rotation.y += 0.01;
// Render using CSS3DRenderer
renderer.render(scene, camera);
};
animate();
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/110/three.min.js"></script>
<script>
function openLesson(lessonName) {
const lessonFrame = document.getElementById('lessonFrame');
const lessonFileName = lessonName.toLowerCase().replace(/ /g, '') + '.html';
lessonFrame.src = 'lessons/' + lessonFileName;
}
function openLesson(lessonName) {
const lessonContentDiv = document.getElementById('lessonContent');
const lessonFileName = lessonName.toLowerCase().replace(/ /g, '') + '.html';
fetch('lessons/' + lessonFileName)
.then(response => response.text())
.then(html => {
lessonContentDiv.innerHTML = html;
})
.catch(error => {
console.error('Error fetching lesson content:', error);
});
}
</script>
<script> openLesson('_Home')</script>
</body>
</html>