2026-01-04 22:42:19 +00:00
|
|
|
<!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>
|
2026-01-10 13:51:41 +00:00
|
|
|
<script type="module" src="/bundle.js"></script>
|
2026-01-04 22:42:19 +00:00
|
|
|
<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>
|