Newer
Older
rpg / v2 / apps / game / index.html
<!doctype html>
<html lang="ru">
<head>
    <meta charset="utf-8" />
    <title>Пепельные луга — v2</title>
    <style>
        html, body { margin: 0; height: 100%; background: #17171d; }
        body { display: grid; place-items: center; }
        /* бэкинг-стор 960×540, CSS-масштаб ×1 (пиксель-арт на 2× уже читается) */
        canvas {
            width: 960px;
            height: 540px;
            image-rendering: pixelated;
            image-rendering: crisp-edges;
        }
        /* Подсказка перехода/взаимодействия у точки */
        #hint {
            position: fixed;
            top: 12px;
            left: 50%;
            transform: translateX(-50%);
            padding: 6px 14px;
            background: rgba(23, 23, 29, 0.85);
            color: #d99a32;
            font: 16px/1.4 monospace;
            border: 1px solid #44454e;
            border-radius: 4px;
            white-space: nowrap;
        }
        /* Фейд перехода областей: чёрный слой поверх всего */
        #fade {
            position: fixed;
            inset: 0;
            background: #000;
            opacity: 0;
            pointer-events: none;
        }
        /* Трекер квестов: первая активная стадия, левый верхний угол */
        #quest {
            position: fixed;
            top: 12px;
            left: 12px;
            padding: 8px 12px;
            background: rgba(23, 23, 29, 0.85);
            color: #d99a32;
            font: 15px/1.5 monospace;
            border: 1px solid #44454e;
            border-radius: 4px;
            white-space: pre;
        }
        /* Сумка: под трекером */
        #inv {
            position: fixed;
            top: 56px;
            left: 12px;
            padding: 8px 12px;
            background: rgba(23, 23, 29, 0.85);
            color: #c9c9d2;
            font: 15px/1.5 monospace;
            border: 1px solid #44454e;
            border-radius: 4px;
            white-space: pre;
        }
        #inv .title { color: #626c4c; }
        #inv .item { color: #d99a32; }
        /* Тосты: столбик всплывашек по центру сверху */
        #toasts {
            position: fixed;
            top: 52px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            flex-direction: column;
            gap: 4px;
            align-items: center;
            pointer-events: none;
        }
        #toasts div {
            padding: 5px 12px;
            background: rgba(23, 23, 29, 0.85);
            color: #d99a32;
            font: 15px monospace;
            border: 1px solid #44454e;
            border-radius: 4px;
            white-space: nowrap;
        }
        /* Диалог: панель внизу экрана, реплика + варианты (кнопки) */
        #dialog {
            position: fixed;
            bottom: 24px;
            left: 50%;
            transform: translateX(-50%);
            width: 640px;
            max-width: 92vw;
            padding: 12px 16px;
            background: rgba(23, 23, 29, 0.92);
            color: #c9c9d2;
            font: 16px/1.5 monospace;
            border: 1px solid #44454e;
            border-radius: 6px;
        }
        #dialog .speaker { color: #d99a32; font-weight: bold; }
        #dialog .choices { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
        #dialog .choices button {
            text-align: left;
            padding: 4px 10px;
            background: #23232c;
            color: #c9c9d2;
            border: 1px solid #44454e;
            border-radius: 3px;
            font: inherit;
            cursor: pointer;
        }
        #dialog .choices button:hover { border-color: #d99a32; color: #fff; }
        #dialog .continue { margin-top: 8px; color: #626c4c; font-size: 13px; }
    </style>
</head>
<body>
    <canvas id="scene"></canvas>
    <div id="fade"></div>
    <div id="hint" hidden></div>
    <div id="quest" hidden></div>
    <div id="inv" hidden></div>
    <div id="toasts"></div>
    <div id="dialog" hidden></div>
    <script type="module" src="/src/main.ts"></script>
</body>
</html>