diablo2-web/play.html

306 lines
8.0 KiB
HTML

<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Diablo II: Lord of Destruction · Online Client (play.html)</title>
<script>
window.__d2SkipAutoBoot = true;
</script>
<style>
@font-face {
font-family: "D2Exocet";
src: url("/ui/fonts/D2Exocet.ttf") format("truetype");
font-weight: 100 900;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: "D2Formal436";
src: url("/ui/fonts/D2Formal436.ttf") format("truetype");
font-weight: 100 900;
font-style: normal;
font-display: swap;
}
:root {
color-scheme: dark;
--font-display: "D2Exocet", "Cinzel", "Times New Roman", "Liberation Serif", "Noto Serif", "Songti SC", "Noto Serif SC", serif;
--font-body: "D2Formal436", "Times New Roman", "Liberation Serif", "Noto Serif", "Songti SC", "Noto Serif SC", serif;
}
* {
box-sizing: border-box;
}
html,
body {
margin: 0;
width: 100%;
height: 100vh;
background: #050505;
color: #e8dcc8;
font: 13px/1.45 var(--font-body);
overflow: hidden;
user-select: none;
display: flex;
flex-direction: column;
}
#d2-toolbar-container {
flex: 0 0 auto;
z-index: 50;
}
#play-workspace {
flex: 1 1 auto;
min-height: 0;
display: flex;
flex-direction: row;
align-items: stretch;
justify-content: center;
overflow: hidden;
position: relative;
}
#play-stage-wrapper {
flex: 1 1 auto;
min-width: 0;
min-height: 0;
display: flex;
align-items: center;
justify-content: center;
background: radial-gradient(circle at center, #14110d 0%, #040404 75%);
position: relative;
overflow: hidden;
}
#play-stage {
position: relative;
width: 800px;
height: 600px;
background: #000;
box-shadow: 0 0 42px rgba(0, 0, 0, 0.95), 0 0 0 1px #2e251b;
overflow: hidden;
}
#bnet-shell {
position: absolute;
inset: 0;
z-index: 15;
display: flex;
align-items: center;
justify-content: center;
background: #000;
}
#bnet-canvas {
width: 100%;
height: 100%;
display: block;
image-rendering: pixelated;
}
#view {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
display: block;
background: #080706;
z-index: 5;
}
#d2-hud-canvas {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
display: block;
z-index: 10;
pointer-events: none;
image-rendering: pixelated;
}
#play-disconnect-banner {
position: absolute;
top: 14px;
left: 50%;
transform: translateX(-50%);
z-index: 30;
background: rgba(42, 12, 12, 0.94);
border: 1px solid #c94a4a;
color: #ffd6d6;
padding: 6px 14px;
border-radius: 4px;
font-size: 12px;
letter-spacing: 0.03em;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
}
#play-disconnect-banner[hidden] {
display: none !important;
}
#d2-boot-loading {
position: absolute;
inset: 0;
z-index: 28;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: radial-gradient(circle at center, #18120c 0%, #050403 78%);
color: #e8dcc8;
padding: 24px;
}
#d2-boot-loading[hidden] {
display: none !important;
}
.d2-boot-panel {
width: 480px;
max-width: 92%;
background: rgba(12, 9, 6, 0.94);
border: 1px solid #8c6f39;
box-shadow: 0 0 32px rgba(0, 0, 0, 0.95), inset 0 0 14px rgba(140, 111, 57, 0.16);
padding: 22px 26px 20px;
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
}
.d2-boot-title {
font-family: var(--font-display);
font-size: 18px;
font-weight: 700;
letter-spacing: 0.08em;
color: #d8b868;
text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
text-align: center;
}
.d2-boot-subtitle {
font-family: var(--font-body);
font-size: 12px;
letter-spacing: 0.06em;
color: #b7a588;
text-align: center;
}
#d2-boot-progress-bar {
width: 100%;
height: 22px;
background: #070504;
border: 1px solid #9c7c42;
box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.95);
position: relative;
overflow: hidden;
}
#d2-boot-progress-fill {
width: 0%;
height: 100%;
background: linear-gradient(90deg, #56100c 0%, #9b2217 55%, #d68a28 100%);
box-shadow: 0 0 12px rgba(214, 138, 40, 0.45);
transition: width 60ms linear;
}
#d2-boot-progress-percent {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
font-family: var(--font-display);
font-size: 12px;
font-weight: 700;
letter-spacing: 0.06em;
color: #f6ebd4;
text-shadow: 0 1px 3px #000, 0 0 6px #000;
pointer-events: none;
}
.d2-boot-meta {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
font-family: var(--font-body);
font-size: 12px;
color: #ccb996;
min-height: 18px;
overflow: hidden;
}
.d2-boot-file-label {
color: #9e8863;
flex: 0 0 auto;
}
#d2-boot-progress-file {
color: #f0dfb8;
font-family: monospace;
font-size: 12px;
max-width: 290px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
#d2-boot-progress-count {
color: #8f7b58;
font-size: 11px;
flex: 0 0 auto;
}
#d2-inspector-container {
flex: 0 0 auto;
max-height: 100%;
overflow-y: auto;
z-index: 40;
background: #0e0c0a;
border-left: 1px solid #2b2319;
}
</style>
</head>
<body>
<div id="d2-toolbar-container"></div>
<div id="play-workspace">
<div id="play-stage-wrapper">
<div id="play-stage">
<div id="d2-boot-loading">
<div class="d2-boot-panel">
<div class="d2-boot-title">DIABLO II: LORD OF DESTRUCTION</div>
<div class="d2-boot-subtitle">正在下载游戏资源 · LOADING RESOURCES</div>
<div
id="d2-boot-progress-bar"
role="progressbar"
aria-valuemin="0"
aria-valuemax="100"
aria-valuenow="0"
>
<div id="d2-boot-progress-fill" style="width: 0%"></div>
<div id="d2-boot-progress-percent">0%</div>
</div>
<div class="d2-boot-meta">
<span class="d2-boot-file-label">正在下载:</span>
<span id="d2-boot-progress-file">initializing...</span>
<span id="d2-boot-progress-count">(0/0)</span>
</div>
</div>
</div>
<div id="bnet-shell">
<canvas id="bnet-canvas" width="800" height="600"></canvas>
</div>
<canvas id="view" width="800" height="600"></canvas>
<canvas id="d2-hud-canvas" width="800" height="600"></canvas>
<div id="play-disconnect-banner" hidden></div>
</div>
</div>
<div id="d2-inspector-container"></div>
</div>
<script type="module" src="/src/client/main.ts"></script>
</body>
</html>