feat(website): implement SPA route handling and remove 404.html

This commit is contained in:
Simon
2026-02-27 20:07:46 +08:00
parent 68d68182e2
commit ce2258fe16
3 changed files with 39 additions and 46 deletions

View File

@@ -46,15 +46,6 @@
</head>
<body>
<div id="root"></div>
<script>
// Restore SPA path from 404.html redirect (GitHub Pages)
;(function () {
var p = new URLSearchParams(window.location.search).get('p')
if (p) {
window.history.replaceState(null, '', window.location.pathname + p + window.location.hash)
}
})()
</script>
<script type="module" src="./src/main.tsx"></script>
<script>
// Dynamically update html lang attribute based on i18n detection