This commit is contained in:
2026-01-04 22:42:19 +00:00
parent abed903b06
commit febf480b60
22 changed files with 2665 additions and 321 deletions

39
html/index.html Normal file
View File

@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>opencdn</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
height: 100%;
background: #09090b;
}
</style>
</head>
<body>
<div id="app"></div>
<script type="module" src="./bundle.js"></script>
<script>
window.addEventListener('DOMContentLoaded', () => {
const appContainer = document.getElementById('app');
const config = window.__OPENCDN_CONFIG__ || {};
const path = window.location.pathname;
let element;
if (path.startsWith('/peek')) {
element = document.createElement('opencdn-peekpage');
element.allowedPackages = config.allowedPackages || [];
} else {
element = document.createElement('opencdn-mainpage');
element.version = config.version || '1.0.0';
element.mode = config.mode || 'prod';
element.allowedPackages = config.allowedPackages || [];
}
appContainer.appendChild(element);
});
</script>
</body>
</html>