mirror of
https://github.com/mathuo/dockview
synced 2025-03-12 17:02:04 +00:00
125 lines
3.8 KiB
HTML
125 lines
3.8 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<title>{{title}}</title>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<link rel="icon" href="/img/dockview_logo.ico" data-rh="true" />
|
|
<link
|
|
rel="stylesheet"
|
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200"
|
|
/>
|
|
<style media="only screen">
|
|
html,
|
|
body,
|
|
#root {
|
|
height: 100%;
|
|
width: 100%;
|
|
margin: 0;
|
|
box-sizing: border-box;
|
|
-webkit-overflow-scrolling: touch;
|
|
font-family: ui-sans-serif, system-ui, -apple-system,
|
|
BlinkMacSystemFont, Segoe UI, Roboto;
|
|
}
|
|
|
|
#header {
|
|
height: 25px;
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
align-items: center;
|
|
}
|
|
|
|
#header-btn {
|
|
height: 22px;
|
|
}
|
|
|
|
#gh-logo {
|
|
height: 22px;
|
|
width: 22px;
|
|
}
|
|
|
|
#app {
|
|
height: calc(100% - 25px);
|
|
}
|
|
|
|
html {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
padding: 0;
|
|
overflow: auto;
|
|
}
|
|
|
|
body {
|
|
padding: 8px;
|
|
overflow: auto;
|
|
}
|
|
</style>
|
|
<script type="systemjs-importmap">
|
|
{
|
|
"imports": {
|
|
{{importPaths}}
|
|
}
|
|
}
|
|
</script>
|
|
<script src="https://cdn.jsdelivr.net/npm/systemjs@6.8.0/dist/system.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/systemjs-babel@0.3.2/dist/systemjs-babel.js"></script>
|
|
<script>
|
|
async function importCSSStyleSheet(uri) {
|
|
const link = document.createElement('link');
|
|
link.rel = 'stylesheet';
|
|
link.href = uri;
|
|
document.head.appendChild(link);
|
|
}
|
|
|
|
System.onload = function (err, id, deps, isErrSource) {
|
|
console.log(id);
|
|
if (id.endsWith('.css') && !err) {
|
|
importCSSStyleSheet(id);
|
|
}
|
|
};
|
|
</script>
|
|
</head>
|
|
|
|
<body>
|
|
<div id="root">
|
|
<div id="header">
|
|
<a target="_blank" rel="noopener noreferrer" href="{{githubLink}}">
|
|
<button id="header-btn">
|
|
View Source
|
|
</button>
|
|
</a>
|
|
<img id="gh-logo" src="https://github.githubassets.com/assets/GitHub-Mark-ea2971cee799.png"/>
|
|
</div>
|
|
<div id="app"></div>
|
|
</div>
|
|
<script type="systemjs-module" src="import:{{app}}"></script>
|
|
<object
|
|
id="loading-spinner"
|
|
style="
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%) scale(0.75);
|
|
"
|
|
type="image/svg+xml"
|
|
data="https://dockview.dev/img/dockview_logo.svg"
|
|
aria-label="loading"
|
|
></object>
|
|
<script id="loading-script">
|
|
(function () {
|
|
const cleanupLoading = () => {
|
|
if (document.querySelector('.dv-dockview')) {
|
|
document.querySelector('#loading-spinner').remove();
|
|
document.querySelector('#loading-script').remove();
|
|
} else {
|
|
requestAnimationFrame(() => cleanupLoading());
|
|
}
|
|
};
|
|
|
|
cleanupLoading();
|
|
})();
|
|
</script>
|
|
</body>
|
|
</html>
|