Skip to content

Commit ef330d6

Browse files
committed
This reverts commit a720748, reversing changes made to 4443c8c.
1 parent a720748 commit ef330d6

7 files changed

Lines changed: 75 additions & 458 deletions

File tree

feedback-loader.js

Lines changed: 0 additions & 147 deletions
This file was deleted.

feedback.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

index.html

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<div class="header-left">
1515
<button id="menu-toggle" class="menu-toggle"></button>
1616

17-
<a href="#" class="brand" aria-label="OLI Torus Launchpad (home)">
17+
<a href="/" class="brand" aria-label="OLI Torus Launchpad (home)">
1818
<img src="assets/images/logo.png" alt="" class="brand-logo" aria-hidden="true" />
1919
<span class="brand-oli">OLI</span>
2020
<span class="brand-torus">Torus</span>
@@ -33,13 +33,12 @@
3333
<line x1="21" y1="21" x2="16.65" y2="16.65"></line>
3434
</svg>
3535
</a>
36-
<button
37-
class="feedback-btn"
38-
aria-label="Feedback"
39-
onclick="openFeedback()">
36+
<a href="https://forms.gle/3ta7TqVyWjRdgTmx9"
37+
target="_blank"
38+
class="feedback-btn"
39+
aria-label="Feedback">
4040
<img src="assets/images/feedback.png" alt="Feedback" class="feedback-icon" />
41-
</button>
42-
41+
</a>
4342

4443
<button class="home-btn" aria-label="Home" data-page="pages/introduction/logging-in.html">
4544
<img src="assets/images/home.png" alt="Home" class="home-icon" />
@@ -254,15 +253,9 @@
254253
</main>
255254
</div>
256255

257-
<script src="main.js"></script>
258-
<script src="feedback-loader.js" defer></script>
259-
260-
<div id="feedbackOverlay" hidden></div>
261-
<div id="feedbackModal" hidden></div>
262-
263-
<div id="searchOverlay" hidden></div>
264-
<div id="searchModal" hidden></div>
265-
<script src="search-wrapper-loader.js" defer></script>
266-
256+
<script src="main.js"></script>
257+
<div id="searchOverlay" hidden></div>
258+
<div id="searchModal" hidden></div>
259+
<script src="search-wrapper-loader.js" defer></script>
267260
</body>
268261
</html>

main.js

Lines changed: 18 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,29 @@ console.log('main.js loaded');
44

55

66
(function () {
7-
// --- DOM helpers ---
7+
// --- small DOM helpers ---
88
const $all = (sel, root = document) => Array.from(root.querySelectorAll(sel));
99
const $ = (sel, root = document) => root.querySelector(sel);
1010

11-
11+
// =============================================================
1212
// Load welcome page by default on first visit
13+
// =============================================================
1314
window.addEventListener("DOMContentLoaded", () => {
1415
const content = document.querySelector(".content");
15-
if (!content) return;
16-
17-
const params = new URLSearchParams(window.location.search);
18-
const pageFromUrl = params.get("page");
19-
20-
if (pageFromUrl) {
21-
loadPage(pageFromUrl);
22-
23-
const li = document.querySelector(`.submenu li[data-page="${pageFromUrl}"]`);
24-
if (li) {
25-
document
26-
.querySelectorAll(".submenu li.selected")
27-
.forEach(el => el.classList.remove("selected"));
28-
li.classList.add("selected");
29-
}
30-
31-
return;
16+
if (content) {
17+
fetch("pages/introduction/welcome.html")
18+
.then(r => r.text())
19+
.then(html => {
20+
content.innerHTML = html;
21+
// Optionally highlight the matching menu item
22+
const li = document.querySelector('.submenu li[data-page="pages/welcome.html"]');
23+
if (li) {
24+
document.querySelectorAll(".submenu li.selected").forEach(el => el.classList.remove("selected"));
25+
li.classList.add("selected");
26+
}
27+
})
28+
.catch(err => console.error("Error loading welcome page:", err));
3229
}
33-
34-
// fallback only when no ?page=
35-
fetch("pages/introduction/welcome.html")
36-
.then(r => r.text())
37-
.then(html => {
38-
content.innerHTML = html;
39-
})
40-
.catch(err => console.error("Error loading welcome page:", err));
4130
});
4231

4332

@@ -60,18 +49,14 @@ window.addEventListener("DOMContentLoaded", () => {
6049
document.addEventListener('click', function (event) {
6150
const target = event.target.closest('[data-page]');
6251
if (!target) return;
63-
if (target.querySelector('a[href]')) return;
6452
setActiveMenuItem(target);
6553

6654
// Prevent full page reload
6755
event.preventDefault();
6856

6957
const page = target.getAttribute('data-page');
7058
if (!page) return;
71-
72-
history.pushState({ page }, '', `?page=${encodeURIComponent(page)}`);
73-
74-
59+
7560
// Load the HTML into the main content area
7661
fetch(page)
7762
.then(response => response.text())
@@ -206,7 +191,6 @@ document.addEventListener('click', function (event) {
206191
const homeBtn = document.querySelector('.home-btn');
207192
if (homeBtn) {
208193
homeBtn.addEventListener('click', () => {
209-
selectMenuItem(homeBtn);
210194
const li = document.querySelector(`.submenu li[data-page="${HOME_TARGET_PAGE}"]`);
211195
if (!li) return console.warn('Home target not found:', HOME_TARGET_PAGE);
212196

@@ -334,4 +318,5 @@ document.addEventListener('click', (e) => {
334318
setTimeout(() => li.classList.remove('spotlight'), 1100);
335319
});
336320

321+
337322
})();

pages/set-up-your-course/create-a-new-project.html

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,50 @@
33
<head>
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
67
<link rel="stylesheet" href="./style.css" />
78
<link rel="icon" href="data:,">
9+
10+
<style>
11+
.enhanced-video {
12+
padding: 24px 0 32px;
13+
margin-bottom: 32px;
14+
border-radius: 12px;
15+
}
16+
17+
.title-bar {
18+
font-size: 1.3rem;
19+
font-weight: 600;
20+
padding: 12px 20px;
21+
margin-bottom: 16px;
22+
}
23+
</style>
824
</head>
25+
926
<body>
1027

11-
<div class="video-container">
28+
<div class="video-container enhanced-video">
29+
30+
<div class="title-bar">
31+
Create a New Project
32+
</div>
33+
1234
<video
1335
controls
1436
preload="metadata"
1537
playsinline
16-
style="width:100%;height:auto;display:block;background:#000;border-radius:12px;border:1px solid var(--border);box-shadow:var(--shadow);"
17-
>
18-
<!-- UPDATE THIS: video file -->
38+
style="
39+
width:100%;
40+
height:auto;
41+
display:block;
42+
background:#000;
43+
border-radius:12px;
44+
border:1px solid var(--border);
45+
box-shadow:var(--shadow);
46+
"
47+
>
1948
<source src="./assets/videos/set-up-your-course/create-a-new-project.mp4" type="video/mp4" />
2049

21-
<!-- UPDATE THIS: captions file -->
2250
<track
2351
src="./assets/captions/set-up-your-course/create-a-new-project.vtt"
2452
kind="subtitles"
@@ -30,17 +58,6 @@
3058
Your browser does not support the video tag.
3159
</video>
3260

33-
<!-- UPDATE THIS: video title -->
34-
<div class="title-bar">
35-
<span class="video-title">Create a New Project</span>
36-
37-
<span class="version-badge">
38-
(Placeholder)This video applies to Torus <strong>0.32.3</strong> and newer <!-- UPDATE THIS: version number -->
39-
</span>
40-
</div>
41-
42-
</div>
43-
4461
</div>
4562

4663
</body>

0 commit comments

Comments
 (0)