Update index.html

The fuq is still happenin with it
This commit is contained in:
Jakub Růžička 2025-05-20 20:21:35 +02:00 committed by GitHub
parent df7424d0f1
commit 617b916ed0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -15,7 +15,18 @@
<link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="style.css">
<!-- Material Web Components (MWC) --> <!-- CRITICAL FIX: Import Map for resolving bare module specifiers like "tslib" -->
<script type="importmap">
{
"imports": {
"tslib": "https://cdn.jsdelivr.net/npm/tslib@2.6.2/tslib.es6.min.js",
"@material/web/": "https://cdn.jsdelivr.net/npm/@material/web@1.4.1/"
}
}
</script>
<!-- Material Web Components (MWC) - Using a more recent version -->
<!-- This MUST come AFTER the importmap -->
<script type="module" src="https://cdn.jsdelivr.net/npm/@material/web@1.4.1/all.js"></script> <script type="module" src="https://cdn.jsdelivr.net/npm/@material/web@1.4.1/all.js"></script>
<style> <style>
@ -41,7 +52,7 @@
<header> <header>
<h1 id="appTitle">MNotes</h1> <h1 id="appTitle">MNotes</h1>
<md-icon-button id="themeToggleBtn" aria-label="Toggle theme"> <md-icon-button id="themeToggleBtn" aria-label="Toggle theme">
<md-icon>dark_mode</md-icon> <!-- Will be correctly rendered by MWC --> <md-icon>dark_mode</md-icon>
</md-icon-button> </md-icon-button>
</header> </header>
@ -50,7 +61,7 @@
</div> </div>
<md-fab aria-label="Add Note" id="addNoteFab" variant="primary"> <md-fab aria-label="Add Note" id="addNoteFab" variant="primary">
<md-icon slot="icon">add</md-icon> <!-- Will be correctly rendered by MWC --> <md-icon slot="icon">add</md-icon>
</md-fab> </md-fab>
</div> </div>
@ -67,6 +78,6 @@
</div> </div>
</md-dialog> </md-dialog>
<script src="script.js"></script> <!-- script.js will handle MWC readiness --> <script src="script.js"></script>
</body> </body>
</html> </html>