118 lines
3.4 KiB
HTML
118 lines
3.4 KiB
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>Clash of Cultures</title>
|
|
<style>
|
|
html,
|
|
body {
|
|
margin: 0;
|
|
height: 100%;
|
|
background: #f7f3e8;
|
|
}
|
|
body { display: flex; flex-direction: column; }
|
|
#preview-bar {
|
|
min-height: 35px;
|
|
flex-wrap: wrap;
|
|
background: #233d35;
|
|
color: #d8decb;
|
|
font: 10px system-ui;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 14px;
|
|
padding: 0 16px;
|
|
box-sizing: border-box;
|
|
}
|
|
#preview-bar strong {
|
|
font-weight: 500;
|
|
letter-spacing: 0.3px;
|
|
}
|
|
#preview-bar button,
|
|
#preview-bar select,
|
|
#preview-bar a {
|
|
font: 10px system-ui;
|
|
background: #ffffff12;
|
|
color: #e4e8d9;
|
|
border: 1px solid #ffffff20;
|
|
padding: 3px 8px;
|
|
border-radius: 3px;
|
|
cursor: pointer;
|
|
text-decoration: none;
|
|
}
|
|
#preview-bar label {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
cursor: pointer;
|
|
}
|
|
/* The host bar stays dark in both viewer themes. Give native controls
|
|
opaque colors so OS popup/field defaults cannot wash out the labels. */
|
|
#preview-bar select,
|
|
#preview-bar select option {
|
|
color-scheme: dark;
|
|
color: #e4e8d9;
|
|
background-color: #233d35;
|
|
}
|
|
#preview-bar #status {
|
|
margin-left: auto;
|
|
font-size: 9px;
|
|
opacity: 0.7;
|
|
}
|
|
iframe {
|
|
display: block;
|
|
width: 100%;
|
|
flex: 1;
|
|
min-height: 0;
|
|
border: 0;
|
|
}
|
|
#host-error {
|
|
position: fixed;
|
|
top: 45px;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
background: #fff0de;
|
|
color: #a44f2e;
|
|
z-index: 10;
|
|
padding: 12px;
|
|
font: 12px system-ui;
|
|
border: 1px solid #ca9d66;
|
|
border-radius: 5px;
|
|
}
|
|
#host-error:empty {
|
|
display: none;
|
|
}
|
|
@media (max-width: 650px) {
|
|
#preview-bar {
|
|
gap: 7px;
|
|
padding: 0 8px;
|
|
}
|
|
#preview-bar strong {
|
|
font-size: 9px;
|
|
}
|
|
#status {
|
|
display: none;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="preview-bar">
|
|
<strong>Local engine match</strong
|
|
><select id="seat" aria-label="Preview player">
|
|
<option value="auto">Hotseat</option>
|
|
<option value="0">Player 1</option>
|
|
<option value="1">Player 2</option>
|
|
<option value="spectator">Spectator</option></select
|
|
><button id="reset">New game</button><button id="theme">Theme</button
|
|
>
|
|
<a href="/sounds.html" target="_blank" rel="noopener">Test sounds</a>
|
|
<select id="scenario" aria-label="Test scenario"><option value="">Test a choice…</option></select><button id="restart-scenario" disabled>Restart test</button>
|
|
<span id="status">Connecting to local game…</span>
|
|
</div>
|
|
<div id="scenario-note" style="display:none;position:absolute;bottom:0;left:0;z-index:20;background:#233d35;color:#e4e8d9;padding:5px 10px;font:11px system-ui;max-width:100%;box-sizing:border-box"></div>
|
|
<div id="host-error" role="alert"></div>
|
|
<iframe title="Clash of Cultures" src="/viewer.html"></iframe>
|
|
<script type="module" src="/src/local-host.ts"></script>
|
|
</body>
|
|
</html>
|