-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsimple.module.html
More file actions
41 lines (38 loc) · 1.63 KB
/
simple.module.html
File metadata and controls
41 lines (38 loc) · 1.63 KB
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
<!DOCTYPE html>
<!--
Credits: JS code is human-written.
Examples and documentation generated with LLM assistance (Gemini & JetBrains Junie using gemini-3-flash-preview).
-->
<html lang="en">
<head>
<meta charset="UTF-8">
<title>TutorialScreen - Modular Load</title>
<link rel="stylesheet" href="../assets/page-style.css">
</head>
<body>
<header id="hero" class="hero-block">
<a href="../index.html" style="color: white; text-decoration: none; position: absolute; top: 20px; left: 20px; font-weight: bold;">← Back to Examples</a>
<h1>ES Module Demo</h1>
<button id="startTour">Start Modular Tour</button>
</header>
<div class="container">
<nav id="sidebar" class="sidemenu">
<ul><li>Modular Item</li></ul>
</nav>
<main id="main-content" class="content-block">
<p>This page uses <code>type="module"</code> and the <code>import</code> statement.</p>
</main>
</div>
<script type="module">
import { TutorialScreen } from '../../dist/tutorial.ts.esm.js';
const demoTutorial = [
{ name: 'ESM Load', content: 'Imported via ES Modules. Clean and scoped!', target: '#hero' }, // Element ID or CSS selector to highlight
{ name: 'Targeting', content: 'Modules handle targeting just as well.', target: '#sidebar' } // Element ID or CSS selector to highlight
];
document.getElementById('startTour').addEventListener('click', () => {
TutorialScreen.setCSSLink('../../styles/tutorial.css');
TutorialScreen.startTutorial(demoTutorial);
});
</script>
</body>
</html>