commit b86e8a9effbcdb93e05cd21ebd1435af06fff600 Author: Kopkins Date: Mon Nov 2 04:08:02 2026 +0300 Initial MANGABOM website diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..414748c --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +* +!Dockerfile +!dist/ +!dist/** +!deploy/ +!deploy/** diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d7b4ee1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,21 @@ +# Local preview state and visual checks +/.qa/ +/.local-server*.log +/.local-server.json + +# Exported project archives +/*.zip + +# Local configuration +.env +.env.* +!.env.example +!.env.sample + +# Editor, OS and Python cache files +.vscode/ +.idea/ +__pycache__/ +*.py[cod] +Thumbs.db +.DS_Store diff --git a/DEPLOY.md b/DEPLOY.md new file mode 100644 index 0000000..fedeb8f --- /dev/null +++ b/DEPLOY.md @@ -0,0 +1,74 @@ +# Перенос MANGABOM на свой сервер + +Для текущего OMV (192.168.0.181), автоматического обновления библиотеки и публичного адреса без домена используй [SERVER.md](SERVER.md) и compose.server.yaml. Ниже сохранены способы обычной статической публикации. + +Это самостоятельный статический сайт. Для размещения не нужны Node.js, npm, Python, база данных или ChatGPT. Все картинки, шрифты, стили и JavaScript включены в архив. Доступ через ChatGPT на своём сервере не требуется. + +## Самый простой вариант: существующий веб-сервер + +1. Распакуй архив. +2. Скопируй **содержимое `dist/`** в корень сайта своего домена. Именно содержимое, а не всю папку проекта: `index.html` должен оказаться в document root. +3. Настрой обычную раздачу статических файлов через Nginx, Apache, Caddy либо панель хостинга. +4. Открой домен и проверь `serials.html`, `login.html` и `schedule.html` напрямую. + +Страницы используют относительные ссылки. Можно размещать сайт как в корне домена, так и в отдельном каталоге. Для файлов с расширением `.html` не нужно SPA-перенаправление на главную. Отсутствующий файл должен возвращать 404. + +## Docker + Nginx / Nginx Proxy Manager + +В папке с `compose.yaml` выполни: + +```bash +docker compose up -d --build +``` + +Контейнер раздаёт сайт на `127.0.0.1:8080`. Эта привязка намеренно доступна только с самого сервера. Настрой существующий reverse proxy на этот адрес и включи HTTPS для домена. + +Если Nginx Proxy Manager работает в другом контейнере, `127.0.0.1` внутри него относится к нему самому. Подключи оба контейнера к общей Docker-сети и направь Proxy Host на `mangabom:80`, либо используй доступный из NPM адрес хоста. Не меняй привязку на публичную без необходимости. + +Конфигурация Nginx находится в `deploy/nginx.conf`. Для обычной установки без Docker замени `root /usr/share/nginx/html` на путь к своей папке `dist` и укажи свой домен в `server_name`. + +## Локальный просмотр + +Из корня проекта, если установлен Python: + +```bash +python3 -m http.server 8080 --directory dist +``` + +Открой `http://localhost:8080`. Не проверяй работу localStorage через `file://`: нужен HTTP/HTTPS. + +## Что хранится у читателя + +Избранное, демо-профиль, голос, настройки и черновик обращения лежат в localStorage с префиксом `mangabom.`. При смене домена старые данные браузера автоматически не переносятся. На другом устройстве будет отдельное состояние. + +## Что не является подключённым сервисом + +- Вход — локальный демо-режим, не настоящая авторизация. +- Поддержка не принимает платежи; подписка не оформляется. +- Обратная связь сохраняет черновик, но не отправляет его. +- Голосование не передаёт голоса на сервер и не считает общий рейтинг. +- Читалка работает на статических изображениях. Перед публикацией обнови `dist/manga/library.json` командой `update-library.cmd`. Аккаунты и синхронизация прогресса между устройствами пока не подключены. +- Юридические страницы — проекты для согласования, а не готовые документы сервиса. + +Для серверной авторизации, синхронизации, платежей, отправки обращений и общего голосования потребуется отдельный backend. Для читалки backend не нужен. + +## Изменение исходников + +Готовые файлы можно редактировать непосредственно в `dist/`. Для генерации страниц из шаблона используй: + +```bash +python3 -m venv .venv +. .venv/bin/activate +pip install -r requirements-dev.txt +python scripts/build-product.py +``` + +Шаблон главной — `scripts/product-home-template.html`; данные сериалов и содержимое внутренних страниц — `scripts/build-product.py`. Стили — `dist/styles.css`, поведение — `dist/app.js`. + +**Важно:** генерация перезаписывает HTML-страницы. Изменения текстов и разметки вноси в шаблон и генератор, если планируешь повторно их запускать. CSS и JavaScript генератор не перезаписывает. `scripts/build-pages.py` и `scripts/home-template.html` сохранены как прежняя версия заглушек; для текущей версии не запускай этот генератор. + +## После переноса + +Проверь все пункты `REVIEW.md`. Ссылки в переданном чек-листе сделаны относительными и ведут к локальным файлам `dist/`. + +Не размещай в публичном document root папки `scripts/`, исходные шаблоны и файлы конфигурации. Публикуется только `dist/`. diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9aa3553 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM nginx:alpine +COPY deploy/nginx.conf /etc/nginx/conf.d/default.conf +COPY dist/ /usr/share/nginx/html/ +EXPOSE 80 diff --git a/IMAGES.md b/IMAGES.md new file mode 100644 index 0000000..92e8098 --- /dev/null +++ b/IMAGES.md @@ -0,0 +1,32 @@ +# Картинки сайта + +Картинки, которые можно менять вручную + +HOME.webp — большое изображение на главной. +ISSUE_001.webp — обложка выпуска №001 на всех страницах. +LORD_OF_CHEAP_LUNCH.webp — Повелитель дешёвого обеда. +LAST_PORT.webp — Нулевой причал. +LAST_VERANDA.webp — Последняя веранда. +DREAM_REALTOR.webp — Риелтор грёз. +SECOND_TOUCH.webp — Второе касание. +WHILE_THE_HOUSE_IS_WARM.png — Пока в доме тепло (заглушка арта, можно заменить). +DRY_SIDE.png — Сухая сторона (заглушка арта, можно заменить). +BAR_BAR.png — БАР-БАР (заглушка арта, можно заменить). + +Вместо .webp можно использовать .png, .jpg, .jpeg или .avif. Основа имени должна оставаться той же. Если меняешь формат, удали предыдущий файл: при наличии нескольких форматов сначала выбирается WebP, затем PNG, JPG, JPEG, AVIF. Для Linux важен регистр имени; основа ЗАГЛАВНЫМИ буквами. + +Для замены сохрани новую картинку с тем же именем, затем обнови страницу браузера. Для добавления обложки скопируй сюда файл с нужным именем. Для удаления обложки удали её файл: вместо сломанного изображения появится текстовая обложка. Никакой HTML, JSON или команды обновления библиотеки менять не нужно. + +Обложки сериалов используются в каталоге, на страницах сериалов и в карточках главной. HOME — отдельное изображение главного баннера. + +Страницы глав лежат отдельно: dist/manga/ИМЯ_МАНГИ/chapter-001/01.png ... 16.png. Их структура не меняется. + +Шрифты и технические текстуры оформления находятся в dist/assets/, их не нужно трогать для замены обложек. + +## Как подготовить новые изображения + +[Техническая карта](docs/image-spec/TECHNICAL_MAP.md): единый исходник 3:2 для галереи, каталога и страницы сериала, размеры, безопасные зоны, экспорт и готовые задания для художника или генератора. + +Схемы для наложения на исходник: [обложки сериалов](docs/image-spec/SERIES_SAFE_ZONES.svg) и [главный баннер HOME](docs/image-spec/HOME_COMPOSITION.svg). Направляющие не включать в финальную картинку. + +Заглушки имеют размер 1920 × 1280 px (3:2). Чтобы поставить свой арт, замени PNG-файл с тем же именем. Один файл используется во всех карточках сериала. Если используешь другой формат, удали PNG-заглушку, чтобы не оставлять два файла с одинаковой основой имени. diff --git a/LOCAL.md b/LOCAL.md new file mode 100644 index 0000000..69c46d3 --- /dev/null +++ b/LOCAL.md @@ -0,0 +1,23 @@ +# Локальный запуск MANGABOM на Windows + +Файлы проекта распакованы рядом с исходным архивом. Публичная папка сайта — dist/. + +1. Запусти start-local.cmd. +2. Открой http://localhost:8080/ в браузере. +3. Для остановки запусти stop-local.cmd. + +Сервер работает в фоне через встроенный PowerShell/.NET; Python, Node.js и Docker не требуются. После перезагрузки компьютера запусти start-local.cmd снова. Автозапуск не устанавливается. + +Адрес доступен только на этом компьютере. Для телефона или другого устройства локальной сети потребуется отдельная настройка. + +Изменения файлов в dist/ видны после обновления страницы. Публикуется только dist/: архив, исходники и конфигурация через сервер не выдаются. Отсутствующие файлы возвращают 404. + +Другой порт из PowerShell: + + powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\scripts\local-server.ps1 -Action Start -Port 8081 + +Остановка относится только к процессу MANGABOM, указанному в .local-server.json. Логи запуска: .local-server-output.log и .local-server-error.log. + +Исходные ограничения сайта сохраняются: читалка, серверные аккаунты, платежи и отправка обращений ещё не реализованы. Данные демо-функций остаются в браузере. + +Добавление страниц глав и режимы чтения описаны в MANGA.md. После копирования изображений обнови страницу сериала или читалки: локальный сервер автоматически обновит библиотеку. Ручной update-library.cmd нужен перед переносом на статический хостинг. diff --git a/MANGA.md b/MANGA.md new file mode 100644 index 0000000..7af3f84 --- /dev/null +++ b/MANGA.md @@ -0,0 +1,88 @@ +# Страницы манги и читалка + +Сайт: http://localhost:8080/ + +## Добавление главы + +1. Открой папку сериала в dist/manga/. +2. Внутри используй папки chapter-001, chapter-002 и т. д. +3. Положи в папку главы 16 одиночных изображений с номерами 1–16 в порядке чтения. Например, 01.png, 02.png, ... 16.png. Имена 010.png ... 016.png тоже допустимы. Развороты склеивать не нужно. +4. Обнови страницу сериала или читалки. Локальный сервер автоматически перечитает папки и обновит библиотеку. Перезапуск и ручная индексация на localhost не нужны. + +Пример: + + dist/manga/ + LORD_OF_CHEAP_LUNCH/ + series.json + chapter-001/ + 01.png + ... + 16.png + chapter-002/ + 01.jpg + ... + 16.jpg + LAST_PORT/ + series.json + chapter-001/ + ... + +Поддерживаются JPG, JPEG, PNG, WebP и AVIF. Регистр расширения не важен. Можно смешивать форматы. Номер может иметь ведущие нули: 1.jpg, 01.jpg, 001.jpg. Но один номер должен встречаться только один раз. Имена page-01.jpg не подходят. + +Глава открывается при наличии ровно 16 непустых изображений с номерами от 1 до 16. Пропуск, дубликат, лишний номер или неправильно названное изображение оставляют главу в состоянии «Скоро». Причину можно увидеть через update-library.cmd или в .local-server-output.log. Изображения индексатор не меняет. При повреждённом файле читалка покажет ошибку и кнопку повторной загрузки. + +## Папки сериалов + +- LORD_OF_CHEAP_LUNCH — Повелитель дешёвого обеда +- LAST_PORT — Нулевой причал +- LAST_VERANDA — Последняя веранда +- DREAM_REALTOR — Риелтор грёз +- SECOND_TOUCH — Второе касание +- WHILE_THE_HOUSE_IS_WARM — Пока в доме тепло +- DRY_SIDE — Сухая сторона +- BAR_BAR — БАР-БАР + +Папки манги называются английскими ЗАГЛАВНЫМИ буквами, цифрами и нижними подчёркиваниями, как LAST_PORT. Стабильный id внутри series.json у существующих сериалов менять не нужно: он сохраняет прежние ссылки и прогресс чтения. + + {"id":"food","title":"Повелитель дешёвого обеда"} + +Читалка принимает как старый id, так и новое имя папки: + + http://localhost:8080/reader.html?series=LORD_OF_CHEAP_LUNCH&chapter=chapter-001 + +Старая ссылка series=food тоже работает. Для своего названия главы положи рядом с изображениями chapter.json: + + {"title":"Глава 01 — Начало истории"} + +Новую папку главы индексатор добавит в список автоматически. Для совершенно новой манги нужен series.json, а карточка в основном каталоге добавляется отдельно в scripts/build-product.py. + +## Обновление библиотеки + +На локальном сервере библиотека автоматически обновляется при HTTP-запросе manga/library.json — при открытии или обновлении страницы сериала и читалки. Это работает на сетевом диске без файловых наблюдателей. Неизменившийся каталог повторно не записывается. + +Для публикации на другом обычном статическом хостинге сначала запусти update-library.cmd, затем перенеси всю папку dist/, включая manga/. На таком хостинге PowerShell-индексатор сам по себе не запускается. + +## Управление + +- Постранично: одна страница или разворот справа налево. Первая страница отдельно, затем пары 02–03, 04–05 и т. д. +- Лентой: все страницы сверху вниз. На небольшом экране этот режим выбран по умолчанию до первого выбора читателя. +- Клавиша ← — дальше, → — назад. Home и End — начало и конец главы. +- В постраничном режиме поддерживаются свайпы. При масштабе выше 100% свайп не перехватывается, чтобы можно было перемещать изображение. +- Масштаб 70–150%, выбор страницы, переход между опубликованными главами и полный экран в поддерживаемых браузерах. +- Тема переключается в футере сайта и читалки. Закреплённой кнопки внизу нет. Цвета изображений манги не меняются. +- Прогресс отдельно для каждой главы, тема и настройки сохраняются в текущем браузере. Параметр page в ссылке открывает указанную страницу. + +## Файлы и проверки + +- dist/reader.html, reader.js, reader.css — читалка. +- dist/theme.js, theme.css — общая тема сайта. +- dist/library.js — список глав на странице сериала. +- scripts/index-manga.ps1 — индексатор папок. +- dist/manga/library.json — автоматически сформированный каталог; вручную не редактировать. +- scripts/reader-template.html — исходник разметки читалки для генератора сайта. + +Проверки: + + powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\scripts\test-reader.ps1 + +Для JavaScript-проверок нужен Node.js или установленный VS Code. Для работы самого сайта они не требуются. Тестовый контент создаётся во временной папке и не попадает в библиотеку читателей. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..af70f75 --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +# MANGABOM + +Статический адаптивный интерфейс журнала: главная и 28 внутренних страниц. Читалка поддерживает одиночные страницы, развороты справа налево и вертикальную ленту. Тема оформления и прогресс сохраняются в браузере. + +`dist/` публикуется без сборки. `app.js` выполняет поиск и фильтры каталога, избранное, локальное голосование, календарный фильтр, демо-вход, настройки, сохранение черновика и предпросмотр поддержки. Данные хранятся с префиксом `mangabom.` в localStorage. Серверных аккаунтов, отправки форм и оплаты нет. Читалка загружает JSON-каталог и изображения с того же сервера. + +Генератор текущих страниц: `python scripts/build-product.py`. Исходный шаблон шапки/футера/главной — `scripts/product-home-template.html`, данные сериалов и тексты — в генераторе. `scripts/build-pages.py` относится к прежней версии заглушек, не нужен для текущей публикации. + +Проверочный список всех страниц и ограничений — REVIEW.md. + + +## Читалка и контент + +Страницы: `dist/manga//chapter-001/01.jpg` — `16.jpg`. Поддерживаются JPG, JPEG, PNG, WebP и AVIF. На localhost после копирования обнови страницу сериала или читалки: библиотека обновляется автоматически. Перед переносом на статический хостинг запускай `update-library.cmd`. Имена папок манги имеют формат `LORD_OF_CHEAP_LUNCH`, `LAST_PORT`. Подробности: [MANGA.md](MANGA.md). + +Локальный сервер: `start-local.cmd`, остановка: `stop-local.cmd`. + + +## Публикация с сервера OMV + +Запуск непосредственно с OMV и публичная HTTPS-ссылка без домена: [SERVER.md](SERVER.md). Используется отдельный compose.server.yaml; панель OMV не изменяется. + + +## Обложки и главная + +Все сменяемые изображения находятся в dist/images/: HOME — баннер главной, ISSUE_001 — обложка выпуска, имена сериалов — их обложки. Можно использовать WebP, PNG, JPG, JPEG или AVIF. Добавление, замена или удаление файла видны после обновления страницы; команды сборки не нужны. Подробности: [IMAGES.md](IMAGES.md). + +## Поддержка и общий хедер + +Единая страница — support.html: три тарифа, общий выбор месяца/года со скидкой 17% и разовая поддержка ниже. subscription.html перенаправляет на неё. Оплата пока не подключена. Общий исходник хедера: scripts/partials/header.html. Генератор и шаблон читалки используют одинаковую шапку. + + +Плавный переход иллюстрации под текст главной и анимации чтения: dist/reading-effects.css. Изображение плавно отдаляется при наведении на весь блок на главной, в каталоге и на странице сериала; дублирующих кнопок чтения в карточках нет; настройка уменьшения анимации их отключает. Размытая подложка автоматически использует тот же HOME-файл из dist/images/. diff --git a/REVIEW.md b/REVIEW.md new file mode 100644 index 0000000..4ccef2f --- /dev/null +++ b/REVIEW.md @@ -0,0 +1,74 @@ +# Проверка MANGABOM + +29 оформленных страниц. Добавлена читалка: см. проверки в MANGA.md. + +- [ ] **1. [Главная](dist/index.html)** — Проверь четвёртую карточку «Ещё 4 сериала», её переход в каталог, календарь с шестью точками, шапку и футер. + +- [ ] **2. [Каталог](dist/serials.html)** — Восемь сериалов. Поиск по названию, фильтр жанра, пустой результат, избранное и переходы к сериям. + +- [ ] **3. [Повелитель дешёвого обеда](dist/series-food.html)** — Описание, персонажи, добавление в избранное и список двух глав. + +- [ ] **4. [Нулевой причал](dist/series-port.html)** — Описание, персонажи, избранное и список двух глав. + +- [ ] **5. [Последняя веранда](dist/series-veranda.html)** — Описание, персонажи, избранное и список двух глав. + +- [ ] **6. [Риелтор грёз](dist/series-realtor.html)** — Описание, персонажи, избранное и одна глава. + +- [ ] **7. [Второе касание](dist/series-volley.html)** — Сериал убран только с главной, но присутствует в каталоге; описание и одна глава. + +- [ ] **8. [Пока в доме тепло](dist/series-warm.html)** — Типографическая обложка, описание, персонажи и две главы. + +- [ ] **9. [Сухая сторона](dist/series-dry.html)** — Типографическая обложка, описание, персонажи и две главы. + +- [ ] **10. [БАР-БАР](dist/series-bar.html)** — Типографическая обложка, описание, персонажи и одна глава. + +- [ ] **11. [Выпуски](dist/issues.html)** — Карточка №001, обложка, 8 сериалов / 13 глав, переход к содержанию. + +- [ ] **12. [Содержание №001](dist/issue-001.html)** — Восемь строк с жанрами и количеством глав; каждая ведёт к правильному сериалу. + +- [ ] **13. [Новости](dist/news.html)** — Две редакционные заметки с отдельными страницами. + +- [ ] **14. [Новость: цифровой формат](dist/news-digital.html)** — Полный текст заметки и возврат ко всем новостям. + +- [ ] **15. [Новость: чтение справа налево](dist/news-reading.html)** — Полный текст заметки и возврат к новостям. + +- [ ] **16. [Расписание](dist/schedule.html)** — Январь 2026 соответствует макету: 20, 22 и 24 числа. Выбор даты фильтрует анонсы; «Все даты» сбрасывает фильтр. + +- [ ] **17. [Голосование](dist/vote.html)** — Выбери сериал, сохрани, перезагрузи страницу, измени выбор. Сохраняется только локально, общие результаты не выдуманы. + +- [ ] **18. [Вход](dist/login.html)** — Демо-вход с необязательным именем, без пароля. Переход в кабинет. + +- [ ] **19. [Кабинет](dist/account.html)** — Имя, избранное, удаление из избранного, настройки анимации и компактных карточек, выход. + +- [ ] **20. [Поддержка](dist/support.html)** — Три тарифа, общий переключатель месяца/года со скидкой 17%, разовая поддержка ниже и копирование ссылки. Реального платежа нет. + +- [ ] **21. [Старая ссылка подписки](dist/subscription.html)** — Перенаправляет на единую страницу поддержки. Отдельной страницы подписки больше нет. + +- [ ] **22. [О проекте](dist/about.html)** — Описание формата, состава журнала и использования ИИ; ссылка в каталог. + +- [ ] **23. [Редакция](dist/editorial.html)** — Три этапа работы над выпуском и переход к обратной связи. + +- [ ] **24. [Обратная связь](dist/contact.html)** — Тема, сообщение, проверка обязательного текста и сохранение черновика. После перезагрузки черновик остаётся. Отправки нет. + +- [ ] **25. [Как читать мангу](dist/reading-guide.html)** — Схема кадров 1 → 2 → 3 справа налево и четыре объяснения. + +- [ ] **26. [Вопросы и ответы](dist/faq.html)** — Раскрывающиеся ответы о текущих возможностях и ограничениях. + +- [ ] **27. [Условия использования](dist/terms.html)** — Структурированный редакционный проект. Не выдаётся за согласованные условия продаж. + +- [ ] **28. [Конфиденциальность](dist/privacy.html)** — Точное описание локальных данных и кнопка их очистки. После очистки избранное, голос, профиль, настройки и черновик исчезают. + +- [ ] **29. [Авторские права](dist/copyright.html)** — Редакционный проект раздела о материалах и запросах на использование; без выдуманных правообладателей. + +## Общие проверки + +- [ ] На компьютере (1366×768 и 1024×650) главная помещается до футера. Футер открывается прокруткой. +- [ ] На телефонах (320 и 390 px) нет горизонтального скролла, карточки и формы не обрезаны. +- [ ] Обычный текст не выделяется и не реагирует на наведение. Интерактивные элементы меняют цвет, клавиатурный фокус виден. +- [ ] Логотип ведёт на главную, меню — в соответствующие разделы, кнопка входа находится слева от поддержки. +- [ ] Все восемь сериалов доступны из каталога; кнопки глав открывают читалку. Главы без 16 страниц показывают состояние ожидания. +- [ ] В трёх сериях без исходных иллюстраций используются типографические обложки, а не случайные изображения. + +## Что требует отдельного подключения + +Настоящая авторизация, серверное хранение и синхронизация, приём платежей, отправка обращений и общая система голосования не реализованы. Суммы поддержки — демонстрационные, деньги не списываются. Юридические страницы являются редакционными проектами, требуют данных владельца и согласования. Январские даты и номера будущих глав сохранены из макета, не являются актуальным обещанием публикаций. Читалка готова; для чтения нужны изображения страниц. diff --git a/SERVER.md b/SERVER.md new file mode 100644 index 0000000..d7a95b5 --- /dev/null +++ b/SERVER.md @@ -0,0 +1,63 @@ +# Публикация с сервера OMV без собственного домена + +## Подготовлено + +- compose.server.yaml — отдельный стек для сервера: Nginx, индексатор библиотеки и публичный туннель. +- deploy/nginx-server.conf — раздаёт только dist/, не открывает архив, исходники или панель OMV. +- deploy/library-server.cjs — перечитывает папки глав по запросу, без записи в файлы и без ручной индексации. +- start-server.sh — проверяет Docker/Compose, запускает контейнеры и выводит публичный URL. + +Сервер: 192.168.0.181, SSH-пользователь: dizyaka. Docker с Compose должен быть установлен и запущен на OMV. Если пользователь не имеет доступа к Docker, скрипт попробует sudo; пароль вводится только в терминале сервера. + +## Запуск + +Подключись с Windows: + + ssh dizyaka@192.168.0.181 + +В SSH-терминале выполни одну команду: + + project_dir=$(find /srv -maxdepth 8 -type f -path '*/MangaBom/compose.server.yaml' -print -quit 2>/dev/null); if [ -n "$project_dir" ]; then sh "$project_dir/start-server.sh" --public; else echo 'Папка MangaBom не найдена в /srv. Перейди в неё вручную и выполни: sh start-server.sh --public'; fi + +Если известен путь к папке проекта, можно сразу выполнить: + + cd /путь/к/MangaBom + sh start-server.sh --public + +Скрипт выведет строку PUBLIC SITE: https://...trycloudflare.com — этот адрес можно отправлять читателям. В локальной сети сайт будет доступен по адресу http://192.168.0.181:8080/. + +Панель управления OMV на порту 80 не изменяется. Публичный туннель направлен только на контейнер сайта. Перенаправлять порты роутера для туннеля не нужно. + +## Адрес без домена + +Cloudflare Quick Tunnel создаёт временный публичный HTTPS-адрес без аккаунта и своего домена. Адрес меняется при перезапуске контейнера туннеля; гарантии постоянной доступности у Quick Tunnel нет. Это подходит для начала и проверки сайта. Для постоянного адреса позже потребуется отдельная настройка: домен с постоянным туннелем либо внешний IP и сетевой доступ. + +Официальная документация: https://developers.cloudflare.com/tunnel/get-started/quick-tunnels/ + +## Обновление файлов + +Контейнер читает ту же папку dist/ с OMV через bind mount только для чтения. Правки HTML/CSS/JS и новые страницы манги становятся доступны после обновления страницы браузера. Папки манги и 16 изображений каждой главы индексируются на самом сервере. Windows-компьютер и localhost:8080 больше не требуются для работы серверной версии. + +## Управление из папки проекта + +Показать адрес туннеля и ошибки: + + docker compose -f compose.server.yaml --profile public logs --tail=100 public + +Состояние контейнеров: + + docker compose -f compose.server.yaml --profile public ps + +Остановить публичный доступ, оставив сайт доступным в локальной сети: + + docker compose -f compose.server.yaml --profile public stop public + +Остановить весь серверный стек: + + docker compose -f compose.server.yaml --profile public down + +При необходимости добавляй sudo перед docker. Файлы манги при остановке стека не удаляются. Контейнеры имеют restart: unless-stopped и возвращаются после перезапуска Docker/OMV, если не были остановлены вручную. Адрес Quick Tunnel после перезапуска может измениться; актуальный адрес смотри в логах. + +## Проверка после запуска + +Открой выданный публичный URL с телефона через мобильную сеть. Проверь главную, каталог, первую главу Повелителя дешёвого обеда и переключатель темы в футере. Если контейнеры не запускаются, пришли вывод команды запуска или docker compose -f compose.server.yaml --profile public logs --tail=100. Пароли и ключи присылать не нужно. \ No newline at end of file diff --git a/SHA256SUMS.txt b/SHA256SUMS.txt new file mode 100644 index 0000000..8a88b2b --- /dev/null +++ b/SHA256SUMS.txt @@ -0,0 +1,145 @@ +f32a5b81e14207b47956f01c58096a2837614924917b1c27c315336eaa62aab2 .dockerignore +547185f8ec80a7bba95b06f4410d2eb6e01c4e3123df073b6be0caa5002dffbc compose.server.yaml +1f93001efcbd5706713e0a65aeb3d98b0d4f733f609f101b0432a3eee7a31634 compose.yaml +5d0a5bd6955717c546716e6886a2ce9199500d2d831948f6b841112a2f989463 DEPLOY.md +47f863e0b2782fd5dcd9bd6b153bf6deb4b37cfc0ad8ceecaca8cf720c2cfa0f deploy/library-server.cjs +db22379a5203b0b42ee5d43f70101727515b2dce90be526e3eddbb2b2833aec6 deploy/nginx.conf +752238cd043927d603c1137aa5fff6c3d6b229d1620588ec86ca6c973c3d4462 deploy/nginx-server.conf +3f50642f529698e3f4830403e5c86f79ca3698bdee1f1f62b2528308c48db8cb dist/about.html +7d427decd2d6cadb1d90eccb68d57df47b09de9017e88e07ee7e8c072dba19a2 dist/account.html +2a69bf44448abd98d583a363be05a2167c3ecb84cb013c408ac419b80182d5f8 dist/app.js +a5ad3f06658ecd92705c3499cf000ff5b0c0c6f49641f7b3a6531dcee4bdb4c0 dist/assets/fonts/bangers-normal-400.ttf +630dd5a307c0657b094d324e069b390edf90182fe5003639e06c02a0e5769af7 dist/assets/fonts/Bangers-OFL.txt +6e9a9b89d59b43acfa0ac71925ccd6f38b3d9cc1ace37c03854fa8f6586aa323 dist/assets/fonts/roboto-condensed-italic-800.ttf +98ad7a10030002c8bebeab7edb2ff60adfdafa56455aab4b25b4c3e64ecd0201 dist/assets/fonts/roboto-condensed-italic-900.ttf +ef9d48725ff2bd72cd569ca50555fb781f99cf8f3a88a3bb3c8a4c85fd574458 dist/assets/fonts/roboto-condensed-normal-400.ttf +72a060cf1aa155f2a91b967545ca800e0fe7e2ddc0d50e23f141cb096e18c9d5 dist/assets/fonts/roboto-condensed-normal-600.ttf +35140bfdde80295fbcd04dad086f51688abca96cb8c87529daf781c4462b6e33 dist/assets/fonts/roboto-condensed-normal-700.ttf +24b5b8b48c629756289df167dfb7ce83488492ce6705a2f9612b4680d202eaa2 dist/assets/fonts/roboto-condensed-normal-800.ttf +95729fc1ce53fbd5ea47811c9df92c176762868c09a0f3366c76028ce2a06895 dist/assets/fonts/roboto-condensed-normal-900.ttf +0e4cc6ece88573545be2ed25835363662a6182ba4a4c1b5c8feda52add30e8a6 dist/assets/fonts/RobotoCondensed-OFL.txt +e71bd87c780d49c67454c36b33c4e0ab6a88e8e44c93870fca14eb6705723183 dist/assets/textures/brush-texture.webp +70df2b483d424a74f50ad91aa3302cf42bdc0012361e99c1a96ed604e87a054c dist/assets/textures/paper.webp +ea6657fddb8a60ef2ffdff17198741e9a84859fd7f0b0bf755c2869f386f71a9 dist/contact.html +813982c141706b963363f585a0c45894a735bcd4757797ef411593d765443fda dist/copyright.html +c5a38037508658916fbdf2d8e1d9d6223a3f67c2c479621ad43cb1c04e6edb45 dist/editorial.html +f802592135e95d9f49ce61e57599a92e13585e731e3cdfd3397d88713015e821 dist/faq.html +fa63b4289015286fe843bf06f9082c772c9c58e9168c14865638e165ed346111 dist/fonts.css +54fa54659dd2221211dade83b582c6bf6ad93cc478061d65871afff98c5d82c5 dist/images.css +d7f12d764aefb2c8edb687f2cc249e84fe99bf78c843472d73a2f0e78482140c dist/images.js +8d7a55aa53e27bb2458a7044b02024a656fc94eb9348bfd59b44f490c3adcd36 dist/images/DREAM_REALTOR.webp +11b04c32a078c61a6d9dd74fcf717ba734eb7f56d73953b15a234f1b4a2e6dee dist/images/HOME.webp +8f7e5174471079182500d27cd5b1189c33a60600eecca23f8fc5296cbdadacb8 dist/images/ISSUE_001.webp +e30103393d3ecb26a578e86a27da19ace51885067f4d9df3a30730589d9d9cc6 dist/images/LAST_PORT.webp +ae844bb498a086cfdd4374af4a63f939d667203942e228524e95d6dbcf46c526 dist/images/LAST_VERANDA.webp +11b04c32a078c61a6d9dd74fcf717ba734eb7f56d73953b15a234f1b4a2e6dee dist/images/LORD_OF_CHEAP_LUNCH.webp +94b1ea825ec2f22767b2230be46506a70b416bbe3b1d1304e404aa6dd939823b dist/images/README.txt +37c74e3e8e9da606cfa91f0e86f6a6e3f836c5406ecc24ef909f43655f1c4286 dist/images/SECOND_TOUCH.webp +a01be5246a8aa17bd3ce97e0d702f60ea0c5b7b27d9ecb53579f633696f45866 dist/index.html +bce2d1836e7a12fdf87bf8f2b603243104fd942dfc8821e236c7f5d849c11a78 dist/issue-001.html +e1f19dc9948aa08ddc102f8acc0e0f29d8453897bbabfc18998cef3b7a2c43dc dist/issues.html +c0ace6dd8516891e508e6d5a0bac5e5cd8e3eb0057ff718e9e4171bde8281364 dist/library.js +9fce64676ce23320bccb9b3491ccef9b90506b890475985b524c2f5cd1afe70c dist/login.html +d41feaf84fd0bbcb2a7b3d943de57fde8fb5b6cda90f6ea0a25465553cf6b2ff dist/manga/BAR_BAR/chapter-001/README.txt +54a0ef9b8b87431e0aefc5319904fcd438a8e9592d71591c00107ec1ffbffa83 dist/manga/BAR_BAR/series.json +d41feaf84fd0bbcb2a7b3d943de57fde8fb5b6cda90f6ea0a25465553cf6b2ff dist/manga/DREAM_REALTOR/chapter-001/README.txt +92e67859a1b0b74e06fc2ddb733bcecb378f7e355e90adbe31aab4f269c63d3a dist/manga/DREAM_REALTOR/series.json +d41feaf84fd0bbcb2a7b3d943de57fde8fb5b6cda90f6ea0a25465553cf6b2ff dist/manga/DRY_SIDE/chapter-001/README.txt +d41feaf84fd0bbcb2a7b3d943de57fde8fb5b6cda90f6ea0a25465553cf6b2ff dist/manga/DRY_SIDE/chapter-002/README.txt +2e828d34a00e4b5272d477c289eedd722c589ab9f1a5299270ff92b609e0b94a dist/manga/DRY_SIDE/series.json +d41feaf84fd0bbcb2a7b3d943de57fde8fb5b6cda90f6ea0a25465553cf6b2ff dist/manga/LAST_PORT/chapter-001/README.txt +d41feaf84fd0bbcb2a7b3d943de57fde8fb5b6cda90f6ea0a25465553cf6b2ff dist/manga/LAST_PORT/chapter-002/README.txt +c73e8fc4d459772f45b216d7e56bf33814d060ab9ec2f812ac8de0ea96bd7332 dist/manga/LAST_PORT/series.json +d41feaf84fd0bbcb2a7b3d943de57fde8fb5b6cda90f6ea0a25465553cf6b2ff dist/manga/LAST_VERANDA/chapter-001/README.txt +d41feaf84fd0bbcb2a7b3d943de57fde8fb5b6cda90f6ea0a25465553cf6b2ff dist/manga/LAST_VERANDA/chapter-002/README.txt +c2fe506535f34a4055f2a68505b30a9c9bbcf83f7edb069ef47a16aa8dc3a4fb dist/manga/LAST_VERANDA/series.json +2c05b4e6722c048174fbc8748753c6d06f0cd31385f3d5439db3f65541284309 dist/manga/library.json +a948feca4b0b15d5ded001c573de5a8893f8bf2300d1809c371907ab015c0712 dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/01.png +6ff52398145c3194b508fb7ea6d92d43b2b20885cf97b7bf90ea06998845171f dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/010.png +8f52bec6316f8c2c1c08c6d1a4a8ab00b773f8256ea471392ff27a2e99b4b17e dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/011.png +9a282235ba96ee00dcfe7beb2d3772a9a34529cbc31702148e453d473eec0988 dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/012.png +ea0b23c72e8cc2809a25e7680a2122b3f71d76da9e8de8f20ff7520e1a7ddf62 dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/013.png +45c6410aca09dd8d806153eec5e0511537f80fb2dcf4f2342b6d56a112b4a37c dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/014.png +fecc85a0934654acda0d9e3c43bfa3d19c4fdb529aa63b6fcbd9c0e609af680a dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/015.png +6212621f3697fdf8b260be7ae35cf54b72b1f203f9f9fddc767afaf68df0bfb4 dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/016.png +413ea2fe77d63e83a1ac0ab6fcdf0c1f01062909e09f4acf19bff1537d02dc56 dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/02.png +e69966fb647c70473c9931556a1dde836275ffadc86dff88e3f7a149c6384af5 dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/03.png +4d5da092756313d6a77898fe04823f1c506bab53bbd8c38448d654f7a202247b dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/04.png +d5248c79028a5127c21b9bdb864ad4554d9b54b4e9dd0265f7cd179fe478595e dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/05.png +e074f54340697edf2ffeaf23a27669bc54b9ad30567df685347a5fbdc42dfeb5 dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/06.png +e776ee8e73703bd5b7239907f1ad68e6b115be847164e9ce7c7e7f4dcd1e14f6 dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/07.png +d9d81a23c75d961d0acc2dfd02d1957a5fc2746fe8a9847d57c925f0a10a9aec dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/08.png +7d648c6a1a4f7625e8c6e86e6a83639f0fc8d700606f16e2c36723a2daaf0fd7 dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/09.png +d41feaf84fd0bbcb2a7b3d943de57fde8fb5b6cda90f6ea0a25465553cf6b2ff dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/README.txt +d41feaf84fd0bbcb2a7b3d943de57fde8fb5b6cda90f6ea0a25465553cf6b2ff dist/manga/LORD_OF_CHEAP_LUNCH/chapter-002/README.txt +9a37c18da7439068a76ac7e9dc0c0ef86413d9709001b2c1ab316667690cb495 dist/manga/LORD_OF_CHEAP_LUNCH/series.json +d41feaf84fd0bbcb2a7b3d943de57fde8fb5b6cda90f6ea0a25465553cf6b2ff dist/manga/SECOND_TOUCH/chapter-001/README.txt +6e9972af51d58a360950791a64c3cb2bfbd8bc1682fe7fd331e1535e3f628d1d dist/manga/SECOND_TOUCH/series.json +d41feaf84fd0bbcb2a7b3d943de57fde8fb5b6cda90f6ea0a25465553cf6b2ff dist/manga/WHILE_THE_HOUSE_IS_WARM/chapter-001/README.txt +d41feaf84fd0bbcb2a7b3d943de57fde8fb5b6cda90f6ea0a25465553cf6b2ff dist/manga/WHILE_THE_HOUSE_IS_WARM/chapter-002/README.txt +42afda999a8e7102ada22a63c1ecaab02d973d59bb7b2db3d47aebbca39c1135 dist/manga/WHILE_THE_HOUSE_IS_WARM/series.json +8c56dbba371ba7493048539b626e6c6da03b6816eb3ad8f37443bbb9ef7238ab dist/navigation.css +00f28fac67683be2efaa2e85b3d9e42f582b99b3146022620fc28d392f9ff12e dist/news.html +78d01c3ffa599705b2497fdf6fb43d9152e28ea91391a679bd8ee452ecbf61ac dist/news-digital.html +25bd14eaf5de4445b9fcba0bc6026b5ee1c39462aa1cd610d0fb242a552175c7 dist/news-reading.html +9a78fb26f2b77b4388fcba7c73dbb8af7f41045cc023fd9e00638716c0da7a93 dist/privacy.html +820dba9ee71c8ee8b12d6bd713d64fe306a86a3ccccb00a60c1dd26e6df87cb1 dist/reader.css +9366d971640226ea66d377d154162f887a7983322f7e6a8bd8898cbc5a2ff40f dist/reader.html +cec008b4308dc8c991c397bff362970de6647cbd54252dc32c27f0645c6bdbce dist/reader.js +def413d13ed56176ca35253513fa6711df12bb8dd8395bc8c82a14684878c112 dist/reading-effects.css +b4dd5bd2904ac44e6e0f708a9d1e8345ad3262dce61815b9b623859ca717195e dist/reading-guide.html +8dda19be4550b84a9406c70c91489ee1a7ea04e3480b334643a2808c002ab647 dist/schedule.html +5e8aa1d88ac8a881059bdfee47caaf512a618f5f66b349eca61649a5040680ba dist/serials.html +076bf2e1d65e6ddb057c4a6066dcf69b7a0821f92e872571bbb634a47cbe0e8a dist/series-bar.html +b8da07b3f7568bb35ac74ed452d3c7c53c50d49b0f3cce5abbe93fa33a81a49f dist/series-data.json +bac366755306712f932d22ad5058083dc03375d12dedee3ec26974d88a55d4e6 dist/series-dry.html +9944a6e1504c26f66afcd5490a75416a0f4987c0c1796e765e00aed61e6c39da dist/series-food.html +9dceecbf1c76e1cd376ad12f991369d4d514676f2e98f451e57d838f0e15b02a dist/series-port.html +651521871682a2b851b40be882c71c680e1897597ecab41fca5ac79bcc9e4b56 dist/series-realtor.html +809edce516da880ee3bb8c6663f6170f693ee1fbb8c2b31eebf7fd5bbbdb5c38 dist/series-veranda.html +5f1989f3f4c2574ffa6d11fc83696607683cde96e00e2d8c389d69b3d2c163ff dist/series-volley.html +ce1c60bfec1dc5d71f2aca1c4a79bace3817b07ff1c8396ef1364500d88da5ae dist/series-warm.html +924117c58161e63ad31ca1e7d33806fd1e698c125fa6e2883807fa1347143a01 dist/styles.css +7615995ada9fed3229021d67706fcf71e21bd719f603805cef9ae07506b41842 dist/subscription.html +0f29a0330de1b92e0e63527862a691053f3adbbc99082beb7834932741b7aa53 dist/support.css +0c97a6ea0ec037cee7eb0b87fb6970991d17b1cd7bfb2f24dad967071a1f22c7 dist/support.html +3460a844604a72ab1e8d03cfae2cc5156a9c62a3b74aff4c7d646b692bf83c9b dist/support.js +34d604822e5edce547879ad57608f302559c276504df879f4a7a1f7790645927 dist/terms.html +1204764d957960cf18c65408403050de27e5a547bdc86812db2fc04748ed12c6 dist/theme.css +d714f3e5e1fdfd0f46e6137e905d034cc82aaceea6005834feee5d926f5bb3c9 dist/theme.js +9446d9f8f5a5b448627548e928b19f059e5a41c0e0b20b8dbf970ba8930488f5 dist/vote.html +b2433348bb99cfa7f7ec6393ff02fb6b1e20e2eea935fc744f8cabe2674468a1 Dockerfile +d85e52d1b2cca164adf2cd9a36af36cda4e5729c2d9909bd8c45b1022ba4eabe docs/image-spec/crop-measurements.json +b04025d6eb9fc3dcc527a8111f6620af19bf32f3563b7a42aa955bb374b651d2 docs/image-spec/HOME_COMPOSITION.svg +884230b7c08b8fc60b5bd22e8eb683109b7da80e44e32326dac37130cbf390b6 docs/image-spec/SERIES_SAFE_ZONES.svg +a1f5b67567b2f920ee4c92628c72fdba0fde8b5b71e77cbda0ab8242cb1d5fd4 docs/image-spec/slot-measurements.json +a5e4a72e2a8d48772f1912933f030b26bdb98117b94205281a60548e0c33c8f4 docs/image-spec/TECHNICAL_MAP.md +ac0995353a75810987b63ecc9260fadbe7985520ed5f64714b31f8b7cc215d77 IMAGES.md +550de68e578d7f571a08b9c62174744696d1aeb3375033f2a3a8ed3126bbe2a4 LOCAL.md +d33110070f31ebdac859099a46d8210ffaa0d98b698e62c29b54c507f0c75bce MANGA.md +da34f6b97465e7597a224235486481ea2fcc5c986a0f1da4772fc6fffe6db8c7 README.md +e9ad6b8ad343a83ea8da444b4ec8d089d3ed4c5afcebf87c3f14c4ae5ea5668e requirements-dev.txt +2e588929c50c5d734c70094c35fd2640499e43867e43e3faa44edce2231dc065 REVIEW.md +2a2983147ac83d37d0ccdbb227a9e8808570f4b701c463f52843163d26689ce8 scripts/build-pages.py +161f62ee1bcbf4c078b51c1b7109adecf2a97d3e56609afb56818f3d69089e86 scripts/build-product.py +5ff34050039c51a6bdcfcc56db41709b74831c32214cece4d5d7d11fddbe8c77 scripts/calculate-image-spec.cjs +74902f4aacb2cc87da9b4b6e956a55cbdbbc450e08665853b36e9bfa5063c284 scripts/check-layout.ps1 +6d9c39a4ccbb2c82c0211e69c9e79ab33ec4b8c913c1913c3e6142641a8391c5 scripts/home-template.html +11b3eb913638ce7e3d75c8f63ffee73eb3557070299f20226c1893527ec4a17a scripts/index-manga.ps1 +08b20c09f5f19b1da9ce0e0b734ca51d6f5de83c566219f506421d719ec4f20c scripts/layout-probe.html +1a9fe67c6fe66154fc959520fd5de14a3532bf69f922e9adaecb4ecbefc29e91 scripts/local-server.ps1 +669adaa885896655fa1627cbfd46a3d992ac0a4045eee4002bb8eb8522184709 scripts/partials/header.html +5247729738f1e05203c596734495ef5547d9a24c913929ce2a2dfb6c008d9c42 scripts/product-home-template.html +9366d971640226ea66d377d154162f887a7983322f7e6a8bd8898cbc5a2ff40f scripts/reader-template.html +09a7d641bf1987c674de280b25a0a771c1c7174db477337f12ebc0d1f752493d scripts/support-content.html +ab3a5cc8f0de5d89aa93236ba472a3fcde07f3104f9844c6928b98815e0e4e4c scripts/test-build.py +d000180d14f1506f8f37836abfd924c2457c85780608c25858ec9ac0e461eb27 scripts/test-images.ps1 +c169eb0883c21bc3c9ea8d7b8540be63a726b9804b011b493bbe3332505d04eb scripts/test-reader.cjs +f4d10dd668c11de805bbedbfaf46d16df50792fb659ab2a8f22819ef6b97025a scripts/test-reader.ps1 +5d9fbca17b4d8021f626ddc67f5760e34a280b98ac231e09b4ba2dae01b4483f scripts/test-server.cjs +c8c933fabe40e5321af5f4dafb4198bd076127bd28381e508657ab5aa632a1b8 scripts/test-support.cjs +ac07ccb009c201f5e4b1df640d08868a39d22e23b071b3f1a9b2a3c3321ebdc0 SERVER.md +97f2500aff65c7edbf78d850f1c438f47d9e8638330ef81e30c2611e5f82a394 start-local.cmd +b9aa751d06f97b28a60aafc71f78941954845ab68478b6f22b3935f57c2d0a2b start-server.sh +81af545a1ee6bc21bc94055791d6a9b30e25ce30036e80939eac4fc5acef8701 stop-local.cmd +88451cef8b37a9eb22a896bf3db036afc88e02d688f9b0fd23185cc3f406ed98 update-library.cmd diff --git a/compose.server.yaml b/compose.server.yaml new file mode 100644 index 0000000..1b6d20d --- /dev/null +++ b/compose.server.yaml @@ -0,0 +1,65 @@ +name: mangabom +services: + web: + image: nginx:stable-alpine + restart: unless-stopped + ports: + - "8080:80" + volumes: + - ./dist:/usr/share/nginx/html:ro + - ./deploy/nginx-server.conf:/etc/nginx/conf.d/default.conf:ro + depends_on: + library: + condition: service_healthy + healthcheck: + test: ["CMD", "wget", "-q", "-O", "-", "http://127.0.0.1/healthz"] + interval: 30s + timeout: 5s + retries: 3 + logging: + driver: json-file + options: + max-size: "10m" + max-file: "3" + + library: + image: node:24-alpine + restart: unless-stopped + user: "65534:65534" + read_only: true + cap_drop: [ALL] + security_opt: ["no-new-privileges:true"] + environment: + MANGA_ROOT: /manga + PORT: "8000" + command: ["node", "/app/library-server.cjs"] + volumes: + - ./dist/manga:/manga:ro + - ./deploy/library-server.cjs:/app/library-server.cjs:ro + healthcheck: + test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:8000/healthz').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"] + interval: 10s + timeout: 5s + retries: 5 + start_period: 10s + logging: + driver: json-file + options: + max-size: "5m" + max-file: "2" + + public: + image: cloudflare/cloudflared:latest + profiles: [public] + restart: unless-stopped + command: ["tunnel", "--no-autoupdate", "--url", "http://web:80"] + depends_on: + web: + condition: service_healthy + cap_drop: [ALL] + security_opt: ["no-new-privileges:true"] + logging: + driver: json-file + options: + max-size: "5m" + max-file: "2" \ No newline at end of file diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..16409f7 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,6 @@ +services: + mangabom: + build: . + ports: + - "127.0.0.1:8080:80" + restart: unless-stopped diff --git a/deploy/library-server.cjs b/deploy/library-server.cjs new file mode 100644 index 0000000..031a25e --- /dev/null +++ b/deploy/library-server.cjs @@ -0,0 +1,85 @@ +'use strict'; +const http = require('node:http'); +const fs = require('node:fs/promises'); +const path = require('node:path'); + +async function jsonFile(filename, required = false) { + try { + if (!(await fs.lstat(filename)).isFile()) throw new Error('Metadata must be a regular file'); + return JSON.parse(await fs.readFile(filename, 'utf8')); + } catch (error) { if (!required && error.code === 'ENOENT') return {}; throw error; } +} + +async function buildLibrary(root) { + const series = []; + const identities = new Set(); + const directories = (await fs.readdir(root, { withFileTypes: true })).filter(entry => entry.isDirectory() && /^[A-Z0-9]+(?:_[A-Z0-9]+)*$/.test(entry.name)).sort((a, b) => a.name.localeCompare(b.name)); + for (const directory of directories) { + const folder = path.join(root, directory.name); + let metadata; + try { metadata = await jsonFile(path.join(folder, 'series.json'), true); } catch (error) { if (error.code === 'ENOENT') continue; throw error; } + if (typeof metadata.title !== 'string' || !metadata.title.trim()) throw new Error('Missing series title: ' + directory.name); + const id = metadata.id || directory.name; + if (typeof id !== 'string' || !/^[A-Za-z0-9]+(?:[-_][A-Za-z0-9]+)*$/.test(id) || identities.has(id.toLowerCase())) throw new Error('Invalid or duplicate series identity'); + identities.add(id.toLowerCase()); + const chapters = []; + const chapterNumbers = new Set(); + const chapterFolders = (await fs.readdir(folder, { withFileTypes: true })).filter(entry => entry.isDirectory() && /^chapter-\d+$/.test(entry.name)).sort((a, b) => Number(a.name.slice(8)) - Number(b.name.slice(8))); + for (const chapterFolder of chapterFolders) { + const number = Number(chapterFolder.name.slice(8)); + if (!Number.isSafeInteger(number) || number < 1 || chapterNumbers.has(number)) throw new Error('Invalid or duplicate chapter number'); + chapterNumbers.add(number); + const chapterRoot = path.join(folder, chapterFolder.name); + const files = (await fs.readdir(chapterRoot, { withFileTypes: true })).filter(entry => entry.isFile() && /\.(png|jpe?g|webp|avif)$/i.test(entry.name)); + const byNumber = new Map(); + let invalid = false; + for (const file of files) { + const stem = path.parse(file.name).name; + const pageNumber = Number(stem); + if (!/^\d+$/.test(stem) || !Number.isSafeInteger(pageNumber) || pageNumber < 1 || pageNumber > 16 || byNumber.has(pageNumber)) { invalid = true; continue; } + const info = await fs.stat(path.join(chapterRoot, file.name)); + if (info.size === 0) { invalid = true; continue; } + byNumber.set(pageNumber, file.name); + } + const custom = await jsonFile(path.join(chapterRoot, 'chapter.json')); + const pages = [...byNumber].sort((a, b) => a[0] - b[0]).map(([, filename]) => ({ src: 'manga/' + directory.name + '/' + chapterFolder.name + '/' + encodeURIComponent(filename) })); + chapters.push({ id: chapterFolder.name, title: custom.title || 'Глава ' + String(number).padStart(2, '0'), number, expectedPages: 16, ready: !invalid && byNumber.size === 16, pages }); + } + series.push({ id, folder: directory.name, title: metadata.title, chapters }); + } + return { version: 1, series }; +} + +function createServer(root) { + let previous = '', cached = ''; + return http.createServer(async (request, response) => { + response.setHeader('Cache-Control', 'no-store'); + response.setHeader('X-Content-Type-Options', 'nosniff'); + if (!['GET', 'HEAD'].includes(request.method)) { response.writeHead(405, { Allow: 'GET, HEAD' }); response.end(); return; } + const route = new URL(request.url, 'http://localhost').pathname; + if (route === '/healthz') { + try { await buildLibrary(root); response.writeHead(200, { 'Content-Type': 'text/plain' }); response.end(request.method === 'HEAD' ? undefined : 'ok\n'); } + catch { response.writeHead(503); response.end(request.method === 'HEAD' ? undefined : 'Library not ready\n'); } + return; + } + if (route !== '/library.json') { response.writeHead(404); response.end(); return; } + try { + const library = await buildLibrary(root); + const signature = JSON.stringify(library); + if (signature !== previous) { cached = JSON.stringify({ version: library.version, generatedAt: new Date().toISOString(), series: library.series }); previous = signature; } + response.writeHead(200, { 'Content-Type': 'application/json; charset=utf-8', 'Content-Length': Buffer.byteLength(cached) }); + response.end(request.method === 'HEAD' ? undefined : cached); + } catch (error) { + console.error('Library indexing failed:', error.message); + response.writeHead(503, { 'Content-Type': 'application/json; charset=utf-8' }); + response.end(request.method === 'HEAD' ? undefined : JSON.stringify({ error: 'Library is temporarily unavailable' })); + } + }); +} + +if (require.main === module) { + const root = path.resolve(process.env.MANGA_ROOT || '/manga'); + const port = Number(process.env.PORT || 8000); + createServer(root).listen(port, '0.0.0.0', () => console.log('MANGABOM library listening on port ' + port)); +} +module.exports = { buildLibrary, createServer }; \ No newline at end of file diff --git a/deploy/nginx-server.conf b/deploy/nginx-server.conf new file mode 100644 index 0000000..b693d0c --- /dev/null +++ b/deploy/nginx-server.conf @@ -0,0 +1,41 @@ +server { + listen 80; + server_name _; + root /usr/share/nginx/html; + index index.html; + charset utf-8; + autoindex off; + disable_symlinks on; + server_tokens off; + add_header X-Content-Type-Options nosniff always; + add_header Referrer-Policy strict-origin-when-cross-origin always; + gzip on; + gzip_types text/css application/javascript application/json image/svg+xml; + + location = /healthz { + access_log off; + default_type text/plain; + return 200 "ok\n"; + } + location = /manga/library.json { + proxy_pass http://library:8000/library.json; + proxy_connect_timeout 3s; + proxy_read_timeout 10s; + proxy_hide_header Cache-Control; + add_header Cache-Control "no-store"; + } + location ~ /\. { deny all; } + location ~ ^/(manga|images)/ { + add_header Cache-Control "no-cache"; + try_files $uri =404; + } + location ~* \.(html|css|js|json)$ { + add_header Cache-Control "no-cache"; + try_files $uri =404; + } + location ~* \.(webp|png|jpe?g|avif|svg|ttf|woff2?)$ { + expires 7d; + try_files $uri =404; + } + location / { try_files $uri $uri/ =404; } +} \ No newline at end of file diff --git a/deploy/nginx.conf b/deploy/nginx.conf new file mode 100644 index 0000000..e6b6baa --- /dev/null +++ b/deploy/nginx.conf @@ -0,0 +1,29 @@ +server { + listen 80; + server_name _; + root /usr/share/nginx/html; + index index.html; + charset utf-8; + + location / { + try_files $uri $uri/ =404; + } + location ~ /\. { + deny all; + } + location ~ ^/images/ { + add_header Cache-Control "no-cache" always; + try_files $uri =404; + } + location ~* \.(webp|png|jpg|jpeg|svg|ttf|woff2?)$ { + expires 7d; + add_header Cache-Control "public"; + try_files $uri =404; + } + location ~* \.(html|css|js|json)$ { + add_header Cache-Control "no-cache"; + try_files $uri =404; + } + add_header X-Content-Type-Options nosniff always; + add_header Referrer-Policy strict-origin-when-cross-origin always; +} diff --git a/dist/about.html b/dist/about.html new file mode 100644 index 0000000..a01bf7e --- /dev/null +++ b/dist/about.html @@ -0,0 +1,71 @@ + + + + + + + + О журнале — MANGABOM + + + + + + + + + + + + + + +
+
+ +
+
О проекте

Восемь историй.
Один MANGABOM.

+

Независимый журнал оригинальных манга-сериалов, создаваемых с использованием ИИ.

+

Что здесь читать

+

Фэнтези, фантастику, драму, спортивные истории и комедию. В первом выпуске собраны восемь сериалов с разными характерами и настроениями.

+

Как устроен журнал

+

Выпуск объединяет главы разных историй под одной обложкой. Каталог помогает найти сериал по жанру, а календарь — увидеть анонсы продолжений.

+

Как создаются истории

+

В работе используются инструменты генеративного ИИ. Сценарий, последовательность кадров и редакторская сборка определяют, как история читается в журнале.

+
+
+
+ +
+ + diff --git a/dist/account.html b/dist/account.html new file mode 100644 index 0000000..051f211 --- /dev/null +++ b/dist/account.html @@ -0,0 +1,70 @@ + + + + + + + + Личный кабинет — MANGABOM + + + + + + + + + + + + + + +
+
+ +
+
Демо-кабинет

Привет, читатель!

+

Твоя личная полка MANGABOM.

+
+

Избранное

+Добавить сериалы ↗ +
+

Настройки

+

Настройки и избранное сохраняются на этом устройстве. Синхронизация между устройствами пока не подключена.

+
+
+ +
+ + diff --git a/dist/app.js b/dist/app.js new file mode 100644 index 0000000..da2c440 --- /dev/null +++ b/dist/app.js @@ -0,0 +1,39 @@ +(() => { + const key = n => 'mangabom.' + n; + const read = (n, fallback) => { try { return JSON.parse(localStorage.getItem(key(n))) ?? fallback; } catch { return fallback; } }; + const write = (n, value) => { try { localStorage.setItem(key(n), JSON.stringify(value)); return true; } catch { return false; } }; + const $ = s => document.querySelector(s); + const $$ = s => [...document.querySelectorAll(s)]; + let favorites = read('favorites', []); + const series = [ ['food','Повелитель дешёвого обеда'],['port','Нулевой причал'],['veranda','Последняя веранда'],['realtor','Риелтор грёз'],['volley','Второе касание'],['warm','Пока в доме тепло'],['dry','Сухая сторона'],['bar','БАР-БАР'] ]; + const settings = read('settings', {}); + document.documentElement.classList.toggle('motion-reduced', !!settings.reduceMotion); + document.documentElement.classList.toggle('compact-cards', !!settings.compactCards); + const profile = read('profile', null); + if (profile) $$('.auth-button').forEach(a=>{a.href='account.html';a.querySelector('span:last-child').textContent='Кабинет';}); + function syncFavorites() { + $$('[data-favorite]').forEach(b=>{const selected=favorites.includes(b.dataset.favorite);b.setAttribute('aria-pressed',String(selected));b.textContent=selected?'♥ В избранном':'♡ В избранное';}); + if (!$('#favorites-list')) return; + const list=$('#favorites-list'); list.replaceChildren(); + const chosen=series.filter(([id])=>favorites.includes(id)); + if(!chosen.length){const p=document.createElement('p');p.className='empty-state';p.textContent='Пока пусто. Выбери любимые истории в каталоге.';list.append(p);} + chosen.forEach(([id,title])=>{const row=document.createElement('div');row.className='favorite-row';const a=document.createElement('a');a.href=`series-${id}.html`;a.textContent=title;const b=document.createElement('button');b.type='button';b.dataset.removeFavorite=id;b.textContent='Убрать';row.append(a,b);list.append(row);}); + } + syncFavorites(); + document.addEventListener('click',e=>{const b=e.target.closest('[data-favorite],[data-remove-favorite]');if(!b)return;const id=b.dataset.favorite||b.dataset.removeFavorite;favorites=favorites.includes(id)?favorites.filter(x=>x!==id):[...favorites,id];write('favorites',favorites);syncFavorites();}); + function filterCatalog(){const text=($('#catalog-search')?.value||'').trim().toLocaleLowerCase('ru');const genre=$('#genre-filter')?.value||'all';let count=0;$$('.catalog-card').forEach(c=>{const visible=c.dataset.title.includes(text)&&(genre==='all'||c.dataset.genre===genre);c.hidden=!visible;count+=Number(visible);});if($('#catalog-count'))$('#catalog-count').textContent=`Найдено: ${count}`;if($('#catalog-empty'))$('#catalog-empty').hidden=count!==0;} + $('#catalog-search')?.addEventListener('input',filterCatalog);$('#genre-filter')?.addEventListener('change',filterCatalog); + const vote=read('vote',null);if(vote){const radio=$(`input[name=series][value="${vote}"]`);if(radio)radio.checked=true;if($('#vote-status'))$('#vote-status').textContent='Твой выбор сохранён в этом браузере. Его можно изменить.';} + $('#vote-form')?.addEventListener('submit',e=>{e.preventDefault();const value=new FormData(e.currentTarget).get('series');if(!value)return;const ok=write('vote',value);$('#vote-status').textContent=ok?'Выбор сохранён на этом устройстве. В редакцию голос не отправлен.':'Браузер не разрешил сохранить выбор.';}); + function selectDay(day){$$('[data-event-day]').forEach(e=>e.hidden=!!day&&e.dataset.eventDay!==day);$$('[data-day]').forEach(b=>b.setAttribute('aria-pressed',String(b.dataset.day===day)));} + $$('[data-day]').forEach(b=>b.addEventListener('click',()=>selectDay(b.getAttribute('aria-pressed')==='true'?'':b.dataset.day)));$('#reset-days')?.addEventListener('click',()=>selectDay('')); + $('#demo-login')?.addEventListener('submit',e=>{e.preventDefault();const name=String(new FormData(e.currentTarget).get('name')||'').trim().slice(0,40)||'читатель';write('profile',{name});location.href='account.html';}); + if($('#reader-name'))$('#reader-name').textContent=profile?.name||'читатель'; + $('#logout')?.addEventListener('click',()=>{try{localStorage.removeItem(key('profile'));}catch{}location.href='login.html';}); + [['reduce-motion','reduceMotion'],['compact-cards','compactCards']].forEach(([id,setting])=>{const field=$('#'+id);if(!field)return;field.checked=!!settings[setting];field.addEventListener('change',()=>{settings[setting]=field.checked;write('settings',settings);document.documentElement.classList.toggle(id==='reduce-motion'?'motion-reduced':'compact-cards',field.checked);});}); + $('#support-form')?.addEventListener('submit',e=>{e.preventDefault();const amount=new FormData(e.currentTarget).get('amount');$('#support-status').textContent=`Выбрано ${amount} ₽. Это предпросмотр: платёж не создаётся, деньги не списываются.`;}); + $('#copy-site')?.addEventListener('click',async()=>{const url=new URL('index.html',location.href).href;try{await navigator.clipboard.writeText(url);$('#copy-status').textContent='Ссылка скопирована.';}catch{$('#copy-status').textContent=url;}}); + const draft=read('draft',null);if($('#contact-form')&&draft){$('#contact-form').elements.topic.value=draft.topic;$('#contact-form').elements.message.value=draft.message;} + $('#contact-form')?.addEventListener('submit',e=>{e.preventDefault();const data=new FormData(e.currentTarget);const ok=write('draft',{topic:data.get('topic'),message:data.get('message')});$('#contact-status').textContent=ok?'Черновик сохранён на этом устройстве. Сообщение не отправлено редакции.':'Браузер не разрешил сохранить черновик.';}); + $('#clear-local')?.addEventListener('click',()=>{try{Object.keys(localStorage).filter(k=>k.startsWith('mangabom.')).forEach(k=>localStorage.removeItem(k));$('#clear-status').textContent='Локальные данные MANGABOM удалены.';}catch{$('#clear-status').textContent='Не удалось получить доступ к хранилищу.';}}); +})(); diff --git a/dist/assets/fonts/Bangers-OFL.txt b/dist/assets/fonts/Bangers-OFL.txt new file mode 100644 index 0000000..16beaca --- /dev/null +++ b/dist/assets/fonts/Bangers-OFL.txt @@ -0,0 +1,93 @@ +Copyright 2010 The Bangers Project Authors (https://github.com/googlefonts/bangers) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +https://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/dist/assets/fonts/RobotoCondensed-OFL.txt b/dist/assets/fonts/RobotoCondensed-OFL.txt new file mode 100644 index 0000000..2096249 --- /dev/null +++ b/dist/assets/fonts/RobotoCondensed-OFL.txt @@ -0,0 +1,93 @@ +Copyright 2011 The Roboto Project Authors (https://github.com/googlefonts/roboto-classic) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/dist/assets/fonts/bangers-normal-400.ttf b/dist/assets/fonts/bangers-normal-400.ttf new file mode 100644 index 0000000..df7d5dc Binary files /dev/null and b/dist/assets/fonts/bangers-normal-400.ttf differ diff --git a/dist/assets/fonts/roboto-condensed-italic-800.ttf b/dist/assets/fonts/roboto-condensed-italic-800.ttf new file mode 100644 index 0000000..c49e60f Binary files /dev/null and b/dist/assets/fonts/roboto-condensed-italic-800.ttf differ diff --git a/dist/assets/fonts/roboto-condensed-italic-900.ttf b/dist/assets/fonts/roboto-condensed-italic-900.ttf new file mode 100644 index 0000000..04ed7c1 Binary files /dev/null and b/dist/assets/fonts/roboto-condensed-italic-900.ttf differ diff --git a/dist/assets/fonts/roboto-condensed-normal-400.ttf b/dist/assets/fonts/roboto-condensed-normal-400.ttf new file mode 100644 index 0000000..6268836 Binary files /dev/null and b/dist/assets/fonts/roboto-condensed-normal-400.ttf differ diff --git a/dist/assets/fonts/roboto-condensed-normal-600.ttf b/dist/assets/fonts/roboto-condensed-normal-600.ttf new file mode 100644 index 0000000..f20ee27 Binary files /dev/null and b/dist/assets/fonts/roboto-condensed-normal-600.ttf differ diff --git a/dist/assets/fonts/roboto-condensed-normal-700.ttf b/dist/assets/fonts/roboto-condensed-normal-700.ttf new file mode 100644 index 0000000..b50fae8 Binary files /dev/null and b/dist/assets/fonts/roboto-condensed-normal-700.ttf differ diff --git a/dist/assets/fonts/roboto-condensed-normal-800.ttf b/dist/assets/fonts/roboto-condensed-normal-800.ttf new file mode 100644 index 0000000..044b689 Binary files /dev/null and b/dist/assets/fonts/roboto-condensed-normal-800.ttf differ diff --git a/dist/assets/fonts/roboto-condensed-normal-900.ttf b/dist/assets/fonts/roboto-condensed-normal-900.ttf new file mode 100644 index 0000000..5f16f32 Binary files /dev/null and b/dist/assets/fonts/roboto-condensed-normal-900.ttf differ diff --git a/dist/assets/textures/brush-texture.webp b/dist/assets/textures/brush-texture.webp new file mode 100644 index 0000000..b0207ab Binary files /dev/null and b/dist/assets/textures/brush-texture.webp differ diff --git a/dist/assets/textures/paper.webp b/dist/assets/textures/paper.webp new file mode 100644 index 0000000..73dc977 Binary files /dev/null and b/dist/assets/textures/paper.webp differ diff --git a/dist/contact.html b/dist/contact.html new file mode 100644 index 0000000..9b68c11 --- /dev/null +++ b/dist/contact.html @@ -0,0 +1,73 @@ + + + + + + + + Обратная связь — MANGABOM + + + + + + + + + + + + + + +
+
+ +
+
Редакции

Есть что сказать?

+

Отзыв, ошибка или предложение — начни с темы обращения.

+
+

+
+ +
+
+
+ +
+ + diff --git a/dist/copyright.html b/dist/copyright.html new file mode 100644 index 0000000..f71dd09 --- /dev/null +++ b/dist/copyright.html @@ -0,0 +1,67 @@ + + + + + + + + Авторские права — MANGABOM + + + + + + + + + + + + + + +
+
+ +
+
Справочная информация

Авторские права

+

Редакционный проект · описание текущей версии сайта

Материалы MANGABOM

+

Журнал включает сценарии, иллюстрации, тексты и дизайн. При работе над историями используются генеративные инструменты.

Использование материалов

+

Условия перепечатки, перевода и коммерческого использования ещё не опубликованы. До согласования не следует считать доступность изображения разрешением на любое использование.

Цитирование и ссылки

+

Чтобы поделиться журналом, можно скопировать ссылку на сайт или страницу сериала.

Вопрос или замечание

+

Если вопрос касается происхождения материала или разрешения на использование, подготовь обращение с указанием конкретного сериала и страницы.

Редакционный статус

+

Этот раздел — проект информационной страницы. Условия и сведения о правообладателях требуют согласования перед запуском.

+
+
+ +
+ + diff --git a/dist/editorial.html b/dist/editorial.html new file mode 100644 index 0000000..e4cdb76 --- /dev/null +++ b/dist/editorial.html @@ -0,0 +1,70 @@ + + + + + + + + Редакция — MANGABOM + + + + + + + + + + + + + + +
+
+ +
+
Редакция

Как собирается журнал

+

От идеи до последовательности страниц.

+
01

Сценарий

+

Сюжет главы, реплики, темп и ключевые события.

02

Кадры

+

Композиция страниц, визуальные референсы и работа с генерацией.

03

Редактура

+

Проверка последовательности, читаемости текста и сборка выпуска.

+
+

Для вопросов и предложений

+

Отзыв о главе, замеченная ошибка или предложение о сотрудничестве — выбери подходящую тему в форме обратной связи.

+Обратная связь ↗
+
+
+ +
+ + diff --git a/dist/faq.html b/dist/faq.html new file mode 100644 index 0000000..61b3e05 --- /dev/null +++ b/dist/faq.html @@ -0,0 +1,66 @@ + + + + + + + + Вопросы и ответы — MANGABOM + + + + + + + + + + + + + + +
+
+ +
+
Помощь

Давай разберёмся

+

Чтение, кабинет, поддержка и возможности текущей версии.

+
Можно ли уже читать главы?

Читалка поддерживает постраничный режим, развороты и вертикальную ленту. Чтение доступно для глав с опубликованными страницами.

Как сохранить сериал?

Нажми «В избранное» в каталоге или на странице сериала. Избранное хранится в этом браузере.

Нужна ли регистрация?

Сейчас доступен демонстрационный кабинет без регистрации. Настоящий вход и синхронизация не подключены.

Работают ли платежи?

Нет. Поддержка показывает локальный выбор суммы, но не принимает деньги. Подписку оформить пока нельзя.

Куда отправляется голос?

Пока только в локальное хранилище этого браузера. Это демонстрация интерфейса, а не общий рейтинг.

Что происходит с сообщением редакции?

Форма сохраняет черновик на устройстве. Отправка на сервер пока не подключена.

Где взять другие сериалы?

В каталоге представлены все восемь серий первого выпуска.

Почему даты расписания — январские?

Это анонсы из макета первого выпуска №001. Они не выданы за актуальный календарь публикаций.

+
+

Остался вопрос?

+Перейти к обратной связи ↗
+
+
+ +
+ + diff --git a/dist/fonts.css b/dist/fonts.css new file mode 100644 index 0000000..fda93ea --- /dev/null +++ b/dist/fonts.css @@ -0,0 +1,56 @@ +@font-face { + font-family: 'Bangers'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url(assets/fonts/bangers-normal-400.ttf) format('truetype'); +} +@font-face { + font-family: 'Roboto Condensed'; + font-style: italic; + font-weight: 800; + font-display: swap; + src: url(assets/fonts/roboto-condensed-italic-800.ttf) format('truetype'); +} +@font-face { + font-family: 'Roboto Condensed'; + font-style: italic; + font-weight: 900; + font-display: swap; + src: url(assets/fonts/roboto-condensed-italic-900.ttf) format('truetype'); +} +@font-face { + font-family: 'Roboto Condensed'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url(assets/fonts/roboto-condensed-normal-400.ttf) format('truetype'); +} +@font-face { + font-family: 'Roboto Condensed'; + font-style: normal; + font-weight: 600; + font-display: swap; + src: url(assets/fonts/roboto-condensed-normal-600.ttf) format('truetype'); +} +@font-face { + font-family: 'Roboto Condensed'; + font-style: normal; + font-weight: 700; + font-display: swap; + src: url(assets/fonts/roboto-condensed-normal-700.ttf) format('truetype'); +} +@font-face { + font-family: 'Roboto Condensed'; + font-style: normal; + font-weight: 800; + font-display: swap; + src: url(assets/fonts/roboto-condensed-normal-800.ttf) format('truetype'); +} +@font-face { + font-family: 'Roboto Condensed'; + font-style: normal; + font-weight: 900; + font-display: swap; + src: url(assets/fonts/roboto-condensed-normal-900.ttf) format('truetype'); +} \ No newline at end of file diff --git a/dist/images.css b/dist/images.css new file mode 100644 index 0000000..15a5906 --- /dev/null +++ b/dist/images.css @@ -0,0 +1,2 @@ +.managed-cover{position:relative;display:block;width:100%;height:100%;overflow:hidden;min-width:0}.managed-cover>.type-cover{position:absolute;inset:0;width:100%;height:100%;z-index:0}.managed-cover>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:1}.managed-cover>img:not(.image-ready){opacity:0}.image-placeholder{display:flex;flex-direction:column;justify-content:space-between;padding:15px;width:100%;height:100%;min-height:140px;background:linear-gradient(145deg,#d92b31,#63232c);color:#fff4df;border-radius:5px;overflow:hidden}.image-placeholder>span{font:25px 'Bangers',sans-serif}.image-placeholder>b{font:900 italic 48px/1 'Roboto Condensed',sans-serif}.issue-sidebar>.image-placeholder{height:315px}.archive-cover>.image-placeholder{aspect-ratio:188/247}.hero-art{background:linear-gradient(140deg,#d3b99b,#a85f45)}.series-card:has(>img:not(.image-ready)){background:#29313d}.series-poster .managed-cover .type-cover{height:100%;padding:25px}.series-poster .managed-cover .type-cover>b{font-size:48px}.managed-cover .type-cover>b{overflow-wrap:anywhere} +.catalog-visual .small-tag{z-index:2} diff --git a/dist/images.js b/dist/images.js new file mode 100644 index 0000000..10d59a9 --- /dev/null +++ b/dist/images.js @@ -0,0 +1,34 @@ +(() => { + const extensions = ['webp', 'png', 'jpg', 'jpeg', 'avif', 'WEBP', 'PNG', 'JPG', 'JPEG', 'AVIF']; + async function load(image) { + const base = image.dataset.image; + for (const extension of extensions) { + const url = base + '.' + extension; + try { + const response = await fetch(url, { method: 'HEAD', cache: 'no-store' }); + if (!response.ok) continue; + const loaded = await new Promise(resolve => { + image.onload = () => resolve(true); image.onerror = () => resolve(false); + const version = response.headers.get('etag') || [response.headers.get('last-modified'), response.headers.get('content-length')].join('-') || String(Date.now()); + image.src = url + '?v=' + encodeURIComponent(version); + }); + image.onload = image.onerror = null; + if (loaded) { + image.classList.add('image-ready'); + if (image.parentElement?.classList.contains('hero-art')) image.parentElement.style.setProperty('--hero-image', 'url("' + image.src + '" )'); + return; + } + } catch {} + } + if (image.dataset.imageLabel) { + const fallback = document.createElement('div'); fallback.className = 'image-placeholder'; + const brand = document.createElement('span'); brand.textContent = 'MANGABOM'; + const title = document.createElement('b'); title.textContent = image.dataset.imageLabel; + fallback.append(brand, title); image.replaceWith(fallback); + } else image.remove(); + } + Promise.all([...document.querySelectorAll('img[data-image]')].map(load)).finally(() => { + document.documentElement.dataset.imagesReady = 'true'; + document.dispatchEvent(new Event('mangabom:images-ready')); + }); +})(); \ No newline at end of file diff --git a/dist/images/BAR_BAR.png b/dist/images/BAR_BAR.png new file mode 100644 index 0000000..c6daafc Binary files /dev/null and b/dist/images/BAR_BAR.png differ diff --git a/dist/images/DREAM_REALTOR.png b/dist/images/DREAM_REALTOR.png new file mode 100644 index 0000000..c6df135 Binary files /dev/null and b/dist/images/DREAM_REALTOR.png differ diff --git a/dist/images/DRY_SIDE.png b/dist/images/DRY_SIDE.png new file mode 100644 index 0000000..69c8053 Binary files /dev/null and b/dist/images/DRY_SIDE.png differ diff --git a/dist/images/HOME.png b/dist/images/HOME.png new file mode 100644 index 0000000..597f54d Binary files /dev/null and b/dist/images/HOME.png differ diff --git a/dist/images/ISSUE_001.png b/dist/images/ISSUE_001.png new file mode 100644 index 0000000..65f3f18 Binary files /dev/null and b/dist/images/ISSUE_001.png differ diff --git a/dist/images/LAST_PORT.png b/dist/images/LAST_PORT.png new file mode 100644 index 0000000..d3ac64e Binary files /dev/null and b/dist/images/LAST_PORT.png differ diff --git a/dist/images/LAST_VERANDA.png b/dist/images/LAST_VERANDA.png new file mode 100644 index 0000000..215ec94 Binary files /dev/null and b/dist/images/LAST_VERANDA.png differ diff --git a/dist/images/LORD_OF_CHEAP_LUNCH.png b/dist/images/LORD_OF_CHEAP_LUNCH.png new file mode 100644 index 0000000..597f54d Binary files /dev/null and b/dist/images/LORD_OF_CHEAP_LUNCH.png differ diff --git a/dist/images/README.txt b/dist/images/README.txt new file mode 100644 index 0000000..8af2d2f --- /dev/null +++ b/dist/images/README.txt @@ -0,0 +1,23 @@ +Картинки, которые можно менять вручную + +HOME.webp — большое изображение на главной. +ISSUE_001.webp — обложка выпуска №001 на всех страницах. +LORD_OF_CHEAP_LUNCH.webp — Повелитель дешёвого обеда. +LAST_PORT.webp — Нулевой причал. +LAST_VERANDA.webp — Последняя веранда. +DREAM_REALTOR.webp — Риелтор грёз. +SECOND_TOUCH.webp — Второе касание. +WHILE_THE_HOUSE_IS_WARM.png — Пока в доме тепло (заглушка арта, можно заменить). +DRY_SIDE.png — Сухая сторона (заглушка арта, можно заменить). +BAR_BAR.png — БАР-БАР (заглушка арта, можно заменить). + +Вместо .webp можно использовать .png, .jpg, .jpeg или .avif. Основа имени должна оставаться той же. Если меняешь формат, удали предыдущий файл: при наличии нескольких форматов сначала выбирается WebP, затем PNG, JPG, JPEG, AVIF. Для Linux важен регистр имени; основа ЗАГЛАВНЫМИ буквами. + +Для замены сохрани новую картинку с тем же именем, затем обнови страницу браузера. Для добавления обложки скопируй сюда файл с нужным именем. Для удаления обложки удали её файл: вместо сломанного изображения появится текстовая обложка. Никакой HTML, JSON или команды обновления библиотеки менять не нужно. + +Обложки сериалов используются в каталоге, на страницах сериалов и в карточках главной. HOME — отдельное изображение главного баннера. + +Страницы глав лежат отдельно: dist/manga/ИМЯ_МАНГИ/chapter-001/01.png ... 16.png. Их структура не меняется. + +Шрифты и технические текстуры оформления находятся в dist/assets/, их не нужно трогать для замены обложек. +Заглушки имеют размер 1920 × 1280 px (3:2). Чтобы поставить свой арт, замени PNG-файл с тем же именем. Один файл используется во всех карточках сериала. Если используешь другой формат, удали PNG-заглушку, чтобы не оставлять два файла с одинаковой основой имени. diff --git a/dist/images/SECOND_TOUCH.png b/dist/images/SECOND_TOUCH.png new file mode 100644 index 0000000..b48c027 Binary files /dev/null and b/dist/images/SECOND_TOUCH.png differ diff --git a/dist/images/WHILE_THE_HOUSE_IS_WARM.png b/dist/images/WHILE_THE_HOUSE_IS_WARM.png new file mode 100644 index 0000000..3a92930 Binary files /dev/null and b/dist/images/WHILE_THE_HOUSE_IS_WARM.png differ diff --git a/dist/index.html b/dist/index.html new file mode 100644 index 0000000..3bdfb4c --- /dev/null +++ b/dist/index.html @@ -0,0 +1,108 @@ + + + + + + + + MANGABOM — журнал манги + + + + + + + + + + + + + + +
+
+ +
+
+
+
Рэн с чашей рамена
+
+ Главный сериал +

Повелительдешёвогообеда

+
+Первый выпуск · Глава 01

Школьная кулинарная битва
выходит на новый уровень!

+
+ Читать главу +
+
+ +
+
+ + +
+ +
+
+ +
+ + diff --git a/dist/issue-001.html b/dist/issue-001.html new file mode 100644 index 0000000..28d60d8 --- /dev/null +++ b/dist/issue-001.html @@ -0,0 +1,66 @@ + + + + + + + + Выпуск №001 — MANGABOM + + + + + + + + + + + + + + +
+ + +
+ + diff --git a/dist/issues.html b/dist/issues.html new file mode 100644 index 0000000..c6a9dba --- /dev/null +++ b/dist/issues.html @@ -0,0 +1,69 @@ + + + + + + + + Выпуски журнала — MANGABOM + + + + + + + + + + + + + + +
+
+ +
+
Выпуски

Под одной обложкой

+

Архив MANGABOM: содержание, сериалы и главы каждого выпуска.

Обложка выпуска №001
+ЯНВАРЬ 2026 · ПЕРВЫЙ ВЫПУСК

Номер один.
Восемь начал.

+

Восемь сериалов, тринадцать глав и знакомство с миром MANGABOM.

+
+08 сериалов13 глав01 выпуск +
+Содержание выпуска → +
+
+
+ +
+ + diff --git a/dist/library.js b/dist/library.js new file mode 100644 index 0000000..dffde3a --- /dev/null +++ b/dist/library.js @@ -0,0 +1,24 @@ +(() => { + const match = location.pathname.match(/series-([a-z0-9-]+)\.html$/); + if (!match) return; + const list = document.querySelector('.detail-chapters'); + if (!list) return; + list.setAttribute('aria-busy', 'true'); + fetch('manga/library.json', { cache: 'no-store' }).then(response => { + if (!response.ok) throw new Error('library'); return response.json(); + }).then(library => { + const manga = library.series.find(item => item.id === match[1]); if (!manga) return; + list.replaceChildren(); + manga.chapters.forEach(chapter => { + const row = document.createElement('li'); + const info = document.createElement('div'); + const label = document.createElement('span'); label.className = 'eyebrow'; label.textContent = 'MANGABOM'; + const heading = document.createElement('h3'); heading.textContent = chapter.title; info.append(label, heading); + const state = document.createElement('span'); state.className = 'chapter-state'; state.textContent = chapter.ready ? chapter.pages.length + ' страниц' : 'Скоро'; + const link = document.createElement('a'); link.className = 'outline-button'; link.href = 'reader.html?series=' + encodeURIComponent(manga.id) + '&chapter=' + encodeURIComponent(chapter.id); link.textContent = chapter.ready ? 'Читать ↗' : 'Открыть ↗'; + row.append(info, state, link); list.append(row); + }); + }).catch(() => { + const notice = document.createElement('p'); notice.className = 'notice'; notice.textContent = 'Не удалось обновить список глав. Попробуй обновить страницу.'; list.before(notice); + }).finally(() => list.setAttribute('aria-busy', 'false')); +})(); \ No newline at end of file diff --git a/dist/login.html b/dist/login.html new file mode 100644 index 0000000..ffd7cb0 --- /dev/null +++ b/dist/login.html @@ -0,0 +1,75 @@ + + + + + + + + Войти в MANGABOM — MANGABOM + + + + + + + + + + + + + + +
+
+ +
+
Личный кабинет

Твоя полка историй

+

Избранные сериалы, настройки чтения и быстрый доступ к любимому.

+
+
+ +
+ + diff --git a/dist/manga/BAR_BAR/chapter-001/README.txt b/dist/manga/BAR_BAR/chapter-001/README.txt new file mode 100644 index 0000000..2ff0d2a --- /dev/null +++ b/dist/manga/BAR_BAR/chapter-001/README.txt @@ -0,0 +1 @@ +Положи сюда 16 отдельных изображений с номерами от 1 до 16. Например, 01.png, 02.png, ... 16.png. Имена 010.png ... 016.png тоже допустимы. Поддерживаются JPG, JPEG, PNG, WebP, AVIF. На localhost после копирования обнови страницу сериала или читалки: библиотека обновится автоматически. Перед переносом на другой хостинг запусти update-library.cmd. \ No newline at end of file diff --git a/dist/manga/BAR_BAR/series.json b/dist/manga/BAR_BAR/series.json new file mode 100644 index 0000000..402da51 --- /dev/null +++ b/dist/manga/BAR_BAR/series.json @@ -0,0 +1,4 @@ +{ + "title": "БАР-БАР", + "id": "bar" +} \ No newline at end of file diff --git a/dist/manga/DREAM_REALTOR/chapter-001/README.txt b/dist/manga/DREAM_REALTOR/chapter-001/README.txt new file mode 100644 index 0000000..2ff0d2a --- /dev/null +++ b/dist/manga/DREAM_REALTOR/chapter-001/README.txt @@ -0,0 +1 @@ +Положи сюда 16 отдельных изображений с номерами от 1 до 16. Например, 01.png, 02.png, ... 16.png. Имена 010.png ... 016.png тоже допустимы. Поддерживаются JPG, JPEG, PNG, WebP, AVIF. На localhost после копирования обнови страницу сериала или читалки: библиотека обновится автоматически. Перед переносом на другой хостинг запусти update-library.cmd. \ No newline at end of file diff --git a/dist/manga/DREAM_REALTOR/series.json b/dist/manga/DREAM_REALTOR/series.json new file mode 100644 index 0000000..6f1462d --- /dev/null +++ b/dist/manga/DREAM_REALTOR/series.json @@ -0,0 +1,4 @@ +{ + "title": "Риелтор грёз", + "id": "realtor" +} \ No newline at end of file diff --git a/dist/manga/DRY_SIDE/chapter-001/README.txt b/dist/manga/DRY_SIDE/chapter-001/README.txt new file mode 100644 index 0000000..2ff0d2a --- /dev/null +++ b/dist/manga/DRY_SIDE/chapter-001/README.txt @@ -0,0 +1 @@ +Положи сюда 16 отдельных изображений с номерами от 1 до 16. Например, 01.png, 02.png, ... 16.png. Имена 010.png ... 016.png тоже допустимы. Поддерживаются JPG, JPEG, PNG, WebP, AVIF. На localhost после копирования обнови страницу сериала или читалки: библиотека обновится автоматически. Перед переносом на другой хостинг запусти update-library.cmd. \ No newline at end of file diff --git a/dist/manga/DRY_SIDE/chapter-002/README.txt b/dist/manga/DRY_SIDE/chapter-002/README.txt new file mode 100644 index 0000000..2ff0d2a --- /dev/null +++ b/dist/manga/DRY_SIDE/chapter-002/README.txt @@ -0,0 +1 @@ +Положи сюда 16 отдельных изображений с номерами от 1 до 16. Например, 01.png, 02.png, ... 16.png. Имена 010.png ... 016.png тоже допустимы. Поддерживаются JPG, JPEG, PNG, WebP, AVIF. На localhost после копирования обнови страницу сериала или читалки: библиотека обновится автоматически. Перед переносом на другой хостинг запусти update-library.cmd. \ No newline at end of file diff --git a/dist/manga/DRY_SIDE/series.json b/dist/manga/DRY_SIDE/series.json new file mode 100644 index 0000000..5cec3fc --- /dev/null +++ b/dist/manga/DRY_SIDE/series.json @@ -0,0 +1,4 @@ +{ + "title": "Сухая сторона", + "id": "dry" +} \ No newline at end of file diff --git a/dist/manga/LAST_PORT/chapter-001/README.txt b/dist/manga/LAST_PORT/chapter-001/README.txt new file mode 100644 index 0000000..2ff0d2a --- /dev/null +++ b/dist/manga/LAST_PORT/chapter-001/README.txt @@ -0,0 +1 @@ +Положи сюда 16 отдельных изображений с номерами от 1 до 16. Например, 01.png, 02.png, ... 16.png. Имена 010.png ... 016.png тоже допустимы. Поддерживаются JPG, JPEG, PNG, WebP, AVIF. На localhost после копирования обнови страницу сериала или читалки: библиотека обновится автоматически. Перед переносом на другой хостинг запусти update-library.cmd. \ No newline at end of file diff --git a/dist/manga/LAST_PORT/chapter-002/README.txt b/dist/manga/LAST_PORT/chapter-002/README.txt new file mode 100644 index 0000000..2ff0d2a --- /dev/null +++ b/dist/manga/LAST_PORT/chapter-002/README.txt @@ -0,0 +1 @@ +Положи сюда 16 отдельных изображений с номерами от 1 до 16. Например, 01.png, 02.png, ... 16.png. Имена 010.png ... 016.png тоже допустимы. Поддерживаются JPG, JPEG, PNG, WebP, AVIF. На localhost после копирования обнови страницу сериала или читалки: библиотека обновится автоматически. Перед переносом на другой хостинг запусти update-library.cmd. \ No newline at end of file diff --git a/dist/manga/LAST_PORT/series.json b/dist/manga/LAST_PORT/series.json new file mode 100644 index 0000000..29b3993 --- /dev/null +++ b/dist/manga/LAST_PORT/series.json @@ -0,0 +1,4 @@ +{ + "title": "Нулевой причал", + "id": "port" +} \ No newline at end of file diff --git a/dist/manga/LAST_VERANDA/chapter-001/README.txt b/dist/manga/LAST_VERANDA/chapter-001/README.txt new file mode 100644 index 0000000..2ff0d2a --- /dev/null +++ b/dist/manga/LAST_VERANDA/chapter-001/README.txt @@ -0,0 +1 @@ +Положи сюда 16 отдельных изображений с номерами от 1 до 16. Например, 01.png, 02.png, ... 16.png. Имена 010.png ... 016.png тоже допустимы. Поддерживаются JPG, JPEG, PNG, WebP, AVIF. На localhost после копирования обнови страницу сериала или читалки: библиотека обновится автоматически. Перед переносом на другой хостинг запусти update-library.cmd. \ No newline at end of file diff --git a/dist/manga/LAST_VERANDA/chapter-002/README.txt b/dist/manga/LAST_VERANDA/chapter-002/README.txt new file mode 100644 index 0000000..2ff0d2a --- /dev/null +++ b/dist/manga/LAST_VERANDA/chapter-002/README.txt @@ -0,0 +1 @@ +Положи сюда 16 отдельных изображений с номерами от 1 до 16. Например, 01.png, 02.png, ... 16.png. Имена 010.png ... 016.png тоже допустимы. Поддерживаются JPG, JPEG, PNG, WebP, AVIF. На localhost после копирования обнови страницу сериала или читалки: библиотека обновится автоматически. Перед переносом на другой хостинг запусти update-library.cmd. \ No newline at end of file diff --git a/dist/manga/LAST_VERANDA/series.json b/dist/manga/LAST_VERANDA/series.json new file mode 100644 index 0000000..0371447 --- /dev/null +++ b/dist/manga/LAST_VERANDA/series.json @@ -0,0 +1,4 @@ +{ + "title": "Последняя веранда", + "id": "veranda" +} \ No newline at end of file diff --git a/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/01.png b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/01.png new file mode 100644 index 0000000..5bb2896 Binary files /dev/null and b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/01.png differ diff --git a/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/010.png b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/010.png new file mode 100644 index 0000000..3349c25 Binary files /dev/null and b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/010.png differ diff --git a/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/011.png b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/011.png new file mode 100644 index 0000000..7792255 Binary files /dev/null and b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/011.png differ diff --git a/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/012.png b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/012.png new file mode 100644 index 0000000..b766487 Binary files /dev/null and b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/012.png differ diff --git a/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/013.png b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/013.png new file mode 100644 index 0000000..47cd645 Binary files /dev/null and b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/013.png differ diff --git a/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/014.png b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/014.png new file mode 100644 index 0000000..c1203fe Binary files /dev/null and b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/014.png differ diff --git a/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/015.png b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/015.png new file mode 100644 index 0000000..45ff018 Binary files /dev/null and b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/015.png differ diff --git a/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/016.png b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/016.png new file mode 100644 index 0000000..9bfb217 Binary files /dev/null and b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/016.png differ diff --git a/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/02.png b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/02.png new file mode 100644 index 0000000..e7d4526 Binary files /dev/null and b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/02.png differ diff --git a/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/03.png b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/03.png new file mode 100644 index 0000000..a58d9b2 Binary files /dev/null and b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/03.png differ diff --git a/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/04.png b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/04.png new file mode 100644 index 0000000..ad1d921 Binary files /dev/null and b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/04.png differ diff --git a/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/05.png b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/05.png new file mode 100644 index 0000000..a5bbde8 Binary files /dev/null and b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/05.png differ diff --git a/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/06.png b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/06.png new file mode 100644 index 0000000..ff8195d Binary files /dev/null and b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/06.png differ diff --git a/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/07.png b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/07.png new file mode 100644 index 0000000..b745e0d Binary files /dev/null and b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/07.png differ diff --git a/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/08.png b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/08.png new file mode 100644 index 0000000..249c23b Binary files /dev/null and b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/08.png differ diff --git a/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/09.png b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/09.png new file mode 100644 index 0000000..9b16b68 Binary files /dev/null and b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/09.png differ diff --git a/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/README.txt b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/README.txt new file mode 100644 index 0000000..2ff0d2a --- /dev/null +++ b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-001/README.txt @@ -0,0 +1 @@ +Положи сюда 16 отдельных изображений с номерами от 1 до 16. Например, 01.png, 02.png, ... 16.png. Имена 010.png ... 016.png тоже допустимы. Поддерживаются JPG, JPEG, PNG, WebP, AVIF. На localhost после копирования обнови страницу сериала или читалки: библиотека обновится автоматически. Перед переносом на другой хостинг запусти update-library.cmd. \ No newline at end of file diff --git a/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-002/README.txt b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-002/README.txt new file mode 100644 index 0000000..2ff0d2a --- /dev/null +++ b/dist/manga/LORD_OF_CHEAP_LUNCH/chapter-002/README.txt @@ -0,0 +1 @@ +Положи сюда 16 отдельных изображений с номерами от 1 до 16. Например, 01.png, 02.png, ... 16.png. Имена 010.png ... 016.png тоже допустимы. Поддерживаются JPG, JPEG, PNG, WebP, AVIF. На localhost после копирования обнови страницу сериала или читалки: библиотека обновится автоматически. Перед переносом на другой хостинг запусти update-library.cmd. \ No newline at end of file diff --git a/dist/manga/LORD_OF_CHEAP_LUNCH/series.json b/dist/manga/LORD_OF_CHEAP_LUNCH/series.json new file mode 100644 index 0000000..a3b0960 --- /dev/null +++ b/dist/manga/LORD_OF_CHEAP_LUNCH/series.json @@ -0,0 +1,4 @@ +{ + "title": "Повелитель дешёвого обеда", + "id": "food" +} \ No newline at end of file diff --git a/dist/manga/SECOND_TOUCH/chapter-001/README.txt b/dist/manga/SECOND_TOUCH/chapter-001/README.txt new file mode 100644 index 0000000..2ff0d2a --- /dev/null +++ b/dist/manga/SECOND_TOUCH/chapter-001/README.txt @@ -0,0 +1 @@ +Положи сюда 16 отдельных изображений с номерами от 1 до 16. Например, 01.png, 02.png, ... 16.png. Имена 010.png ... 016.png тоже допустимы. Поддерживаются JPG, JPEG, PNG, WebP, AVIF. На localhost после копирования обнови страницу сериала или читалки: библиотека обновится автоматически. Перед переносом на другой хостинг запусти update-library.cmd. \ No newline at end of file diff --git a/dist/manga/SECOND_TOUCH/series.json b/dist/manga/SECOND_TOUCH/series.json new file mode 100644 index 0000000..7cb8944 --- /dev/null +++ b/dist/manga/SECOND_TOUCH/series.json @@ -0,0 +1,4 @@ +{ + "title": "Второе касание", + "id": "volley" +} \ No newline at end of file diff --git a/dist/manga/WHILE_THE_HOUSE_IS_WARM/chapter-001/README.txt b/dist/manga/WHILE_THE_HOUSE_IS_WARM/chapter-001/README.txt new file mode 100644 index 0000000..2ff0d2a --- /dev/null +++ b/dist/manga/WHILE_THE_HOUSE_IS_WARM/chapter-001/README.txt @@ -0,0 +1 @@ +Положи сюда 16 отдельных изображений с номерами от 1 до 16. Например, 01.png, 02.png, ... 16.png. Имена 010.png ... 016.png тоже допустимы. Поддерживаются JPG, JPEG, PNG, WebP, AVIF. На localhost после копирования обнови страницу сериала или читалки: библиотека обновится автоматически. Перед переносом на другой хостинг запусти update-library.cmd. \ No newline at end of file diff --git a/dist/manga/WHILE_THE_HOUSE_IS_WARM/chapter-002/README.txt b/dist/manga/WHILE_THE_HOUSE_IS_WARM/chapter-002/README.txt new file mode 100644 index 0000000..2ff0d2a --- /dev/null +++ b/dist/manga/WHILE_THE_HOUSE_IS_WARM/chapter-002/README.txt @@ -0,0 +1 @@ +Положи сюда 16 отдельных изображений с номерами от 1 до 16. Например, 01.png, 02.png, ... 16.png. Имена 010.png ... 016.png тоже допустимы. Поддерживаются JPG, JPEG, PNG, WebP, AVIF. На localhost после копирования обнови страницу сериала или читалки: библиотека обновится автоматически. Перед переносом на другой хостинг запусти update-library.cmd. \ No newline at end of file diff --git a/dist/manga/WHILE_THE_HOUSE_IS_WARM/series.json b/dist/manga/WHILE_THE_HOUSE_IS_WARM/series.json new file mode 100644 index 0000000..51d4563 --- /dev/null +++ b/dist/manga/WHILE_THE_HOUSE_IS_WARM/series.json @@ -0,0 +1,4 @@ +{ + "title": "Пока в доме тепло", + "id": "warm" +} \ No newline at end of file diff --git a/dist/manga/library.json b/dist/manga/library.json new file mode 100644 index 0000000..19a6588 --- /dev/null +++ b/dist/manga/library.json @@ -0,0 +1,239 @@ +{ + "version": 1, + "generatedAt": "2026-11-01T19:39:05.4781026Z", + "series": [ + { + "id": "bar", + "folder": "BAR_BAR", + "title": "БАР-БАР", + "chapters": [ + { + "id": "chapter-001", + "title": "Глава 01", + "number": 1, + "expectedPages": 16, + "ready": false, + "pages": [ + + ] + } + ] + }, + { + "id": "realtor", + "folder": "DREAM_REALTOR", + "title": "Риелтор грёз", + "chapters": [ + { + "id": "chapter-001", + "title": "Глава 01", + "number": 1, + "expectedPages": 16, + "ready": false, + "pages": [ + + ] + } + ] + }, + { + "id": "dry", + "folder": "DRY_SIDE", + "title": "Сухая сторона", + "chapters": [ + { + "id": "chapter-001", + "title": "Глава 01", + "number": 1, + "expectedPages": 16, + "ready": false, + "pages": [ + + ] + }, + { + "id": "chapter-002", + "title": "Глава 02", + "number": 2, + "expectedPages": 16, + "ready": false, + "pages": [ + + ] + } + ] + }, + { + "id": "port", + "folder": "LAST_PORT", + "title": "Нулевой причал", + "chapters": [ + { + "id": "chapter-001", + "title": "Глава 01", + "number": 1, + "expectedPages": 16, + "ready": false, + "pages": [ + + ] + }, + { + "id": "chapter-002", + "title": "Глава 02", + "number": 2, + "expectedPages": 16, + "ready": false, + "pages": [ + + ] + } + ] + }, + { + "id": "veranda", + "folder": "LAST_VERANDA", + "title": "Последняя веранда", + "chapters": [ + { + "id": "chapter-001", + "title": "Глава 01", + "number": 1, + "expectedPages": 16, + "ready": false, + "pages": [ + + ] + }, + { + "id": "chapter-002", + "title": "Глава 02", + "number": 2, + "expectedPages": 16, + "ready": false, + "pages": [ + + ] + } + ] + }, + { + "id": "food", + "folder": "LORD_OF_CHEAP_LUNCH", + "title": "Повелитель дешёвого обеда", + "chapters": [ + { + "id": "chapter-001", + "title": "Глава 01", + "number": 1, + "expectedPages": 16, + "ready": true, + "pages": [ + { + "src": "manga/LORD_OF_CHEAP_LUNCH/chapter-001/01.png" + }, + { + "src": "manga/LORD_OF_CHEAP_LUNCH/chapter-001/02.png" + }, + { + "src": "manga/LORD_OF_CHEAP_LUNCH/chapter-001/03.png" + }, + { + "src": "manga/LORD_OF_CHEAP_LUNCH/chapter-001/04.png" + }, + { + "src": "manga/LORD_OF_CHEAP_LUNCH/chapter-001/05.png" + }, + { + "src": "manga/LORD_OF_CHEAP_LUNCH/chapter-001/06.png" + }, + { + "src": "manga/LORD_OF_CHEAP_LUNCH/chapter-001/07.png" + }, + { + "src": "manga/LORD_OF_CHEAP_LUNCH/chapter-001/08.png" + }, + { + "src": "manga/LORD_OF_CHEAP_LUNCH/chapter-001/09.png" + }, + { + "src": "manga/LORD_OF_CHEAP_LUNCH/chapter-001/010.png" + }, + { + "src": "manga/LORD_OF_CHEAP_LUNCH/chapter-001/011.png" + }, + { + "src": "manga/LORD_OF_CHEAP_LUNCH/chapter-001/012.png" + }, + { + "src": "manga/LORD_OF_CHEAP_LUNCH/chapter-001/013.png" + }, + { + "src": "manga/LORD_OF_CHEAP_LUNCH/chapter-001/014.png" + }, + { + "src": "manga/LORD_OF_CHEAP_LUNCH/chapter-001/015.png" + }, + { + "src": "manga/LORD_OF_CHEAP_LUNCH/chapter-001/016.png" + } + ] + }, + { + "id": "chapter-002", + "title": "Глава 02", + "number": 2, + "expectedPages": 16, + "ready": false, + "pages": [ + + ] + } + ] + }, + { + "id": "volley", + "folder": "SECOND_TOUCH", + "title": "Второе касание", + "chapters": [ + { + "id": "chapter-001", + "title": "Глава 01", + "number": 1, + "expectedPages": 16, + "ready": false, + "pages": [ + + ] + } + ] + }, + { + "id": "warm", + "folder": "WHILE_THE_HOUSE_IS_WARM", + "title": "Пока в доме тепло", + "chapters": [ + { + "id": "chapter-001", + "title": "Глава 01", + "number": 1, + "expectedPages": 16, + "ready": false, + "pages": [ + + ] + }, + { + "id": "chapter-002", + "title": "Глава 02", + "number": 2, + "expectedPages": 16, + "ready": false, + "pages": [ + + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/dist/navigation.css b/dist/navigation.css new file mode 100644 index 0000000..0c713cf --- /dev/null +++ b/dist/navigation.css @@ -0,0 +1,47 @@ +/* Shared header: reserve the logo's actual width and never shrink menu text. */ +.screen .header{display:grid;grid-template-columns:max-content minmax(0,1fr);grid-template-rows:auto;align-items:center;gap:clamp(22px,2.5vw,42px);min-width:0;min-height:0;height:auto} +.screen .header>.wordmark{font-size:clamp(44px,4.5vw,68px);line-height:1;margin:0 8px 0 0;justify-self:start;white-space:nowrap} +.header-navigation{display:flex;align-items:center;gap:clamp(18px,2vw,30px);min-width:0;width:100%} +.screen .header-navigation .nav{display:flex;align-items:center;justify-content:space-between;flex:1 1 auto;min-width:0;gap:10px;padding:0 5px;border:0;height:auto;grid-row:auto;grid-column:auto;overflow:visible} +.screen .header-navigation .nav-item{flex:0 0 auto;min-width:0;white-space:nowrap;font-size:clamp(17px,1.6vw,25px);line-height:1.15;padding:10px 9px} +.header-navigation .header-actions{display:flex;align-items:center;flex:0 0 auto;gap:16px;grid-row:auto;justify-content:flex-end;min-width:0} +.header-navigation .auth-button{font-size:clamp(16px,1.4vw,21px);gap:6px;min-height:44px;flex:0 0 auto} +.header-navigation .header-actions .support{width:clamp(125px,12vw,175px);font-size:clamp(15px,1.3vw,20px);min-height:48px;margin:0 8px 0 0;flex:0 0 auto} +@media(min-width:901px) and (max-width:1150px){.screen .header{gap:22px}.screen .header>.wordmark{font-size:46px}.header-navigation{gap:16px}.screen .header-navigation .nav{gap:7px}.screen .header-navigation .nav-item{font-size:17px;padding-inline:8px}.header-navigation .header-actions{gap:12px}.header-navigation .auth-button{font-size:16px}.header-navigation .header-actions .support{width:124px;font-size:15px}} +@media(max-width:900px){.screen .header{grid-template-columns:minmax(0,1fr);gap:22px;height:auto;margin-bottom:22px}.screen .header>.wordmark{justify-self:center;font-size:clamp(44px,8vw,64px);margin:3px 0 5px}.header-navigation{grid-row:2;grid-column:1/-1;gap:18px}.screen .header-navigation .nav{gap:8px}.screen .header-navigation .nav-item{font-size:20px;padding:9px 10px}.header-navigation .header-actions{gap:12px}.header-navigation .auth-button{font-size:17px}.header-navigation .header-actions .support{width:130px;font-size:15px}} +@media(max-width:650px){.screen .header{gap:16px;margin-bottom:20px}.header-navigation{gap:12px}.screen .header-navigation .nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 10px;flex:1 1 0;padding:0 4px}.screen .header-navigation .nav-item{font-size:clamp(14px,3.8vw,20px);padding:9px 5px;text-align:center;min-height:36px}.header-navigation .header-actions{gap:8px}.header-navigation .auth-button{width:32px;min-height:44px}.header-navigation .auth-button span:last-child{display:none}.header-navigation .header-actions .support{width:96px;font-size:13px;min-height:44px;margin-right:5px;padding:7px 5px;gap:4px}.header-navigation .header-actions .heart-icon{font-size:25px}} +/* The footer owns appearance settings; these controls never cover content. */ +.footer .footer-bottom{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px;min-width:0} +.footer .site-theme-toggle{margin-left:auto} +.reader-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;max-width:1500px;margin:0 auto 110px;padding:20px 24px;border-top:1px solid var(--reader-border);color:var(--reader-muted);font-size:14px} +.main,.lead,.serials,.bottom,.product-main,.product-wrap,.footer-intro,.footer-group{min-width:0} +.catalog-copy h2,.series-intro-copy h1,.page-heading h1,.favorite-row a{overflow-wrap:anywhere} +@media(max-width:600px){.footer .footer-bottom{flex-direction:row;align-items:center}.footer .footer-bottom>span:nth-child(2){flex-basis:100%;order:3}.footer .site-theme-toggle{margin-left:0}} +@media(max-width:650px){.header-navigation .header-actions .heart-icon{display:none}} +@media(max-width:380px){.header-navigation{gap:8px}.screen .header-navigation .nav{gap:8px;padding:0 3px}.header-navigation .header-actions{gap:6px}.header-navigation .auth-button{width:26px}.header-navigation .header-actions .support{width:86px;font-size:12px;margin-right:4px}} + +.chapter-list a>span{white-space:normal;overflow-wrap:anywhere}.footer .footer-wordmark{display:inline-block;line-height:1;margin-bottom:26px} +@media(max-width:380px){.screen .header-navigation .nav{column-gap:6px}.screen .header-navigation .nav-item{padding-inline:3px}} + +/* Equal gaps across all six header controls, including the group boundaries. */ +@media(min-width:651px){ + .header-navigation{justify-content:space-between;gap:10px} + .screen .header-navigation .nav,.header-navigation .header-actions{display:contents} +} +@media(max-width:650px){ + .header-navigation{--header-gap:10px;gap:var(--header-gap)} + .screen .header-navigation .nav,.header-navigation .header-actions{gap:var(--header-gap)} +} +@media(max-width:380px){.header-navigation{--header-gap:6px}} +@media(min-width:651px) and (max-width:900px){.screen .header-navigation .nav-item{font-size:clamp(16px,2.3vw,20px);padding-inline:7px}} + +/* The same reserved header box on every page, including the reader. */ +:root{--site-header-height:96px}html{scrollbar-gutter:stable}.screen{padding-top:0!important}.screen:not(.product-screen):not(.reader-screen){grid-template-rows:var(--site-header-height) minmax(0,1fr)} +.screen .site-header{height:var(--site-header-height)!important;min-height:var(--site-header-height)!important;max-height:var(--site-header-height);padding:14px 0;margin:0!important;align-content:center;flex:0 0 var(--site-header-height);box-sizing:border-box} +.site-header .auth-button{min-width:90px}.screen.reader-screen{display:block;height:auto;min-height:100svh;padding-bottom:0}.reader-body .reader-header{border-radius:12px;margin-top:20px;padding:18px 22px;gap:20px}.reader-body .reader-heading{order:initial;flex:1;flex-basis:auto}.reader-body .reader-width input[type=range]{padding:0;border:0;background:none}.reader-body .page-jump select{width:auto}.reader-body .reader-main{padding-inline:0;padding-bottom:30px} +@media(max-width:900px){:root{--site-header-height:160px}.screen .site-header{row-gap:20px}} +@media(max-width:650px){:root{--site-header-height:184px}.screen .site-header{row-gap:16px}.site-header .auth-button{min-width:32px}} +@media(max-width:380px){:root{--site-header-height:176px}.site-header .auth-button{min-width:26px}} +.page-kicker{color:#17110d} + +.site-header{background:var(--paper) url('assets/textures/paper.webp') repeat}html[data-theme=dark] .site-header{background:#16181e} diff --git a/dist/news-digital.html b/dist/news-digital.html new file mode 100644 index 0000000..90e7979 --- /dev/null +++ b/dist/news-digital.html @@ -0,0 +1,65 @@ + + + + + + + + MANGABOM переходит в цифру — MANGABOM + + + + + + + + + + + + + + +
+
+ +
+
Новый формат

MANGABOM переходит в цифру

+

Веб-журнал открывает больше возможностей для распространения историй и выпуска переводов.

От печатного выпуска к сайту

+

MANGABOM начинался как домашний печатный журнал. Следующий шаг — цифровая площадка для чтения оригинальных сериалов.

Одна история — больше читателей

+

Цифровой формат упрощает распространение и позволяет готовить версии историй на разных языках.

Что появится дальше

+

Каталог и читалка уже собраны. Главы можно читать постранично или вертикальной лентой по мере публикации страниц.

← Все заметки
+
+
+ +
+ + diff --git a/dist/news-reading.html b/dist/news-reading.html new file mode 100644 index 0000000..c6093e3 --- /dev/null +++ b/dist/news-reading.html @@ -0,0 +1,65 @@ + + + + + + + + Манга читается справа налево — MANGABOM + + + + + + + + + + + + + + +
+
+ +
+
Читателям

Манга читается справа налево

+

Короткое знакомство с порядком страниц и кадров.

Начни с правой стороны

+

В традиционной манге страницы и кадры читают справа налево. Внутри страницы двигайся от верхнего ряда к нижнему.

Следи за кадрами

+

Сначала прочитай правый кадр в ряду, затем переходи к левому. Реплики обычно следуют тому же порядку.

Не торопись

+

Рассматривай рисунки и паузы между репликами. Руководство по чтению доступно в справочном разделе.

← Все заметки
+
+
+ +
+ + diff --git a/dist/news.html b/dist/news.html new file mode 100644 index 0000000..ae61f85 --- /dev/null +++ b/dist/news.html @@ -0,0 +1,72 @@ + + + + + + + + Новости журнала — MANGABOM + + + + + + + + + + + + + + +
+
+ +
+
Новости

За страницами MANGABOM

+

Заметки редакции о формате, историях и чтении.

+ +
+
+
+ +
+ + diff --git a/dist/privacy.html b/dist/privacy.html new file mode 100644 index 0000000..aecad7d --- /dev/null +++ b/dist/privacy.html @@ -0,0 +1,67 @@ + + + + + + + + Конфиденциальность — MANGABOM + + + + + + + + + + + + + + +
+
+ +
+
Справочная информация

Конфиденциальность

+

Редакционный проект · описание текущей версии сайта

Локальное хранение

+

Избранные сериалы, голос, настройки, тема оформления, прогресс чтения, имя для демо-кабинета и черновик обращения сохраняются в localStorage этого браузера.

Демо-кабинет

+

Сайт не запрашивает пароль. Имя используется только для приветствия в интерфейсе на текущем устройстве.

Формы и платежи

+

Обращения не отправляются на сервер. Платёжные данные не запрашиваются. Общая система голосования не подключена.

Удаление локальных данных

+

Можно очистить сохранённые настройки и черновики кнопкой ниже. Очистка касается только данных MANGABOM в этом браузере.

Перед запуском

+

Это описание текущей демо-версии, а не окончательная политика сервиса. Информация об операторе, инфраструктуре и серверной обработке должна быть уточнена перед запуском настоящих аккаунтов.

+
+
+ +
+ + diff --git a/dist/reader.css b/dist/reader.css new file mode 100644 index 0000000..9664a90 --- /dev/null +++ b/dist/reader.css @@ -0,0 +1,8 @@ +*{box-sizing:border-box}body{margin:0;font-family:'Roboto Condensed',Arial,sans-serif;background:var(--reader-bg);color:var(--reader-ink)}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button,a,select,input{touch-action:manipulation}button,select{min-height:44px}button{cursor:pointer}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible{outline:3px solid var(--reader-accent);outline-offset:3px}button:disabled{opacity:.4;cursor:default}[hidden]{display:none!important}.reader-skip{position:absolute;top:-100px;left:12px;z-index:100;padding:14px;background:var(--reader-surface)}.reader-skip:focus{top:10px}.reader-header{display:flex;align-items:center;gap:30px;padding:22px max(24px,calc((100vw - 1500px)/2));border-bottom:1px solid var(--reader-border);background:var(--reader-surface)}.reader-brand{font:42px/.9 'Bangers',Impact,sans-serif;transform:rotate(-3deg);color:var(--reader-accent);flex-shrink:0}.reader-brand span{display:block;font:700 9px/1 'Roboto Condensed',sans-serif;letter-spacing:3px;margin:9px 0 0 2px;color:var(--reader-muted)}.reader-heading{min-width:0;flex:1}.reader-heading>a{font-size:14px;color:var(--reader-muted)}.reader-heading h1{font-size:21px;line-height:1.2;margin:5px 0 0;font-weight:800;overflow-wrap:anywhere}.reader-header-actions{display:flex;gap:8px;flex-shrink:0}.reader-header-actions button,.reader-pagination button{border:1px solid var(--reader-border);border-radius:8px;color:var(--reader-ink);background:var(--reader-surface);padding:10px 14px;font-weight:700}.reader-header-actions button:hover,.reader-pagination button:not(:disabled):hover{border-color:var(--reader-accent);color:var(--reader-accent)}.reader-main{padding:22px 24px 120px;max-width:1550px;margin:auto}.reader-toolbar{display:flex;align-items:end;flex-wrap:wrap;gap:18px;border:1px solid var(--reader-border);border-radius:12px;background:var(--reader-surface);padding:18px 20px}.reader-field{display:flex;flex-direction:column;gap:7px;min-width:140px}.reader-field>span{font-size:12px;color:var(--reader-muted);letter-spacing:.4px}.reader-field select,.page-jump select{background:var(--reader-bg);border:1px solid var(--reader-border);border-radius:6px;padding:8px 28px 8px 10px;color:var(--reader-ink);max-width:100%}.reader-modes{display:flex;border:1px solid var(--reader-border);border-radius:8px;padding:3px;gap:2px;align-self:end}.reader-modes button{min-height:38px;border:0;border-radius:5px;background:transparent;color:var(--reader-muted);padding:8px 18px;font-weight:700}.reader-modes button[aria-pressed=true]{background:var(--reader-active);color:var(--reader-accent)}.reader-width{margin-left:auto;width:160px;min-width:120px}.reader-width>span{display:flex;justify-content:space-between}.reader-width input{width:100%;height:44px;margin:0;accent-color:var(--reader-accent)}.reader-caption{display:flex;justify-content:space-between;gap:16px;color:var(--reader-muted);font-size:13px;padding:18px 3px 0}.reader-status{font-size:14px;color:var(--reader-accent);line-height:1.5;margin:10px 3px;min-height:20px}.reader-stage{--zoom:1;min-height:45vh;outline:none;scroll-margin-top:20px}.paged-canvas{display:flex;flex-direction:row-reverse;justify-content:center;align-items:flex-start;gap:6px;width:calc(100% * var(--zoom));min-width:0;margin:0 auto;touch-action:pan-y pinch-zoom}.reader-stage.is-paged{overflow-x:auto;padding:4px 0 15px}.page-frame{position:relative;margin:0;background:var(--reader-surface);border:1px solid var(--reader-border);box-shadow:var(--reader-shadow);flex:0 0 auto;overflow:hidden}.paged-canvas .page-frame{width:calc(min(760px, 100%));max-width:100%}.paged-canvas.is-spread .page-frame{width:calc(min(650px, (100% - 6px)/2))}.page-frame img{display:block;width:100%;height:auto;color:var(--reader-muted)}.page-frame figcaption{display:flex;justify-content:space-between;gap:16px;padding:10px 14px;font-size:11px;letter-spacing:1px;color:var(--reader-muted);border-top:1px solid var(--reader-border);background:var(--reader-surface)}.page-frame.is-loading{min-height:300px}.page-frame.is-error{min-height:350px;display:flex;flex-direction:column;justify-content:center}.image-error{padding:40px 20px;text-align:center;color:var(--reader-muted);line-height:1.5}.image-error button{display:block;margin:15px auto 0;padding:8px 16px;border:1px solid var(--reader-border);border-radius:6px;background:var(--reader-bg);color:var(--reader-ink)}.vertical-canvas{width:calc(min(820px, 100%) * var(--zoom));margin:auto;max-width:150%}.vertical-canvas .page-frame{width:100%;margin-bottom:16px;scroll-margin-top:20px}.reader-stage.is-vertical{overflow-x:auto}.reader-pagination{position:fixed;z-index:20;bottom:0;left:0;right:0;display:flex;justify-content:center;align-items:center;gap:28px;padding:12px 20px calc(12px + env(safe-area-inset-bottom));background:var(--reader-surface);border-top:1px solid var(--reader-border);box-shadow:0 -5px 30px #0000000b}.reader-pagination button{min-width:125px}.page-jump{display:flex;align-items:center;gap:9px;font-size:14px}.page-jump>span{color:var(--reader-muted)}.page-jump select{min-width:64px}.reader-empty{max-width:680px;margin:35px auto;padding:45px 32px;text-align:center;background:var(--reader-surface);border:1px solid var(--reader-border);border-radius:14px}.reader-empty .empty-icon{font:60px 'Bangers',sans-serif;color:var(--reader-accent)}.reader-empty h2{font-size:30px;margin:15px 0}.reader-empty p{color:var(--reader-muted);line-height:1.6;font-size:17px}.reader-empty a,.chapter-navigation a{display:inline-block;margin:12px 5px 0;padding:12px 18px;min-height:44px;border:1px solid var(--reader-border);border-radius:7px;font-weight:700}.reader-empty a:hover,.chapter-navigation a:hover{color:var(--reader-accent);border-color:var(--reader-accent)}.chapter-navigation{display:flex;gap:14px;justify-content:center;flex-wrap:wrap;margin-top:30px}.reader-stage:fullscreen{padding:20px;background:var(--reader-bg)} +@media(max-width:1000px){.reader-toolbar{gap:14px}.reader-width{margin-left:0;flex:1}.reader-header{gap:20px}.reader-header-actions #fullscreen span{display:none}.reader-modes button{padding-inline:14px}} +@media(max-width:650px){.reader-header{padding:17px 16px;gap:12px;flex-wrap:wrap}.reader-brand{font-size:32px}.reader-brand span{font-size:7px;letter-spacing:2px}.reader-heading{order:3;flex-basis:100%}.reader-heading h1{font-size:21px}.reader-header-actions{margin-left:auto}.reader-header-actions button{font-size:14px;padding:8px 10px}.reader-main{padding:15px 10px 115px}.reader-toolbar{padding:13px;gap:13px;display:grid;grid-template-columns:1fr 1fr}.reader-field{min-width:0}.reader-modes{grid-column:1/-1;grid-row:1}.reader-modes button{flex:1}.reader-width{width:auto}.reader-caption{font-size:12px;line-height:1.4}.reader-caption #reader-hint{max-width:125px;text-align:right}.reader-status{font-size:13px}.reader-pagination{gap:10px;padding-inline:12px}.reader-pagination button{min-width:44px;padding:10px}.reader-pagination button span{display:none}.page-jump{gap:6px;font-size:13px}.reader-empty{padding:30px 20px;margin-top:18px}.reader-empty h2{font-size:26px}.reader-empty p{font-size:16px}.page-frame figcaption{padding:8px 10px;font-size:10px}.vertical-canvas .page-frame{margin-bottom:10px}.paged-canvas.is-spread .page-frame{width:calc(min(650px,(100% - 6px)/2))}} +@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}} +/* At 100%, paged reading fits the viewport; zoom scales the actual image. */ +.paged-canvas{width:max-content;min-width:100%} +.paged-canvas .page-frame{width:calc(min(760px, calc((100svh - 130px) * .706), calc(100vw - 48px)) * var(--zoom));max-width:none} +.paged-canvas.is-spread .page-frame{width:calc(min(650px, calc((100svh - 130px) * .706), calc((100vw - 54px) / 2)) * var(--zoom))} \ No newline at end of file diff --git a/dist/reader.html b/dist/reader.html new file mode 100644 index 0000000..7d62b31 --- /dev/null +++ b/dist/reader.html @@ -0,0 +1,58 @@ + + + + + + + + Читать мангу — MANGABOM + + + + + + + + + + + + + + + +К страницам главы +
+ +
Каталог сериалов

Выбери историю

+
+
+
+
+ +
+ + +
+
Загружаем библиотеку…Порядок чтения — справа налево
+

+
+ +
+ + + + \ No newline at end of file diff --git a/dist/reader.js b/dist/reader.js new file mode 100644 index 0000000..b6ffb0f --- /dev/null +++ b/dist/reader.js @@ -0,0 +1,184 @@ +(() => { + 'use strict'; + const $ = selector => document.querySelector(selector); + const stage = $('#reader-stage'); + const params = new URLSearchParams(location.search); + const read = (key, fallback) => { try { return JSON.parse(localStorage.getItem('mangabom.' + key)) ?? fallback; } catch { return fallback; } }; + const write = (key, value) => { try { localStorage.setItem('mangabom.' + key, JSON.stringify(value)); return true; } catch { return false; } }; + const stored = read('reader.settings', {}); + let mode = ['paged', 'vertical'].includes(stored.mode) ? stored.mode : (matchMedia('(max-width:650px)').matches ? 'vertical' : 'paged'); + let layout = stored.layout === 'spread' ? 'spread' : 'single'; + let zoom = Number.isFinite(stored.zoom) ? Math.max(70, Math.min(150, stored.zoom)) : 100; + let manga, chapter, library, page = 0, pages = [], trackingBlockedUntil = 0, raf = 0, touch = null; + let storageWarningShown = false; + function settings() { write('reader.settings', { mode, layout, zoom }); } + function currentSpread(index) { return index === 0 ? [0] : [index % 2 ? index : index - 1, (index % 2 ? index : index - 1) + 1].filter(i => i < pages.length); } + function spreadEnabled() { return mode === 'paged' && layout === 'spread'; } + function visiblePages() { return spreadEnabled() ? currentSpread(page) : [page]; } + function remember() { + if (!chapter || !pages.length) return; + const saved = write('reader.progress.' + manga.id + '.' + chapter.id, { page: page + 1, updatedAt: new Date().toISOString() }); + write('reader.last.' + manga.id, { chapter: chapter.id, page: page + 1 }); + if (!saved && !storageWarningShown) { $('#reader-status').textContent = 'Браузер не разрешает сохранить прогресс. Чтение доступно.'; storageWarningShown = true; } + const url = new URL(location.href); + url.searchParams.set('page', String(page + 1)); history.replaceState(null, '', url); + } + function syncControls() { + document.querySelectorAll('[data-mode]').forEach(button => button.setAttribute('aria-pressed', String(button.dataset.mode === mode))); + $('#layout-field').hidden = mode !== 'paged'; + $('#page-layout').value = layout; $('#reader-zoom').value = String(zoom); $('#zoom-value').textContent = zoom + '%'; + stage.style.setProperty('--zoom', zoom / 100); + $('#reader-hint').textContent = mode === 'vertical' ? 'Прокручивай вниз · прогресс сохраняется' : '← дальше · назад → · свайпы'; + $('#reader-pagination').hidden = !pages.length; + $('#page-layout').disabled = !pages.length; + $('#reader-zoom').disabled = !pages.length; + if (!pages.length) return; + const visible = visiblePages(); + $('#page-select').value = String(page); + $('#page-total').textContent = 'из ' + pages.length; + $('#previous-page').disabled = page === 0; + $('#next-page').disabled = visible.at(-1) === pages.length - 1; + $('#chapter-meta').textContent = chapter.title + ' · ' + (visible.length === 2 ? 'страницы ' + (visible[0] + 1) + '–' + (visible[1] + 1) : 'страница ' + (page + 1)) + ' из ' + pages.length; + } + function makeImage(index, lazy) { + const info = pages[index]; + const frame = document.createElement('figure'); frame.className = 'page-frame is-loading'; frame.dataset.page = String(index); + const image = document.createElement('img'); + image.alt = manga.title + ' — ' + chapter.title + ', страница ' + (index + 1); + image.loading = lazy ? 'lazy' : 'eager'; image.decoding = 'async'; + image.width = info.width || 1200; image.height = info.height || 1700; + const caption = document.createElement('figcaption'); + const name = document.createElement('span'); name.textContent = 'MANGABOM'; + const number = document.createElement('span'); number.textContent = String(index + 1).padStart(2, '0') + ' / ' + String(pages.length).padStart(2, '0'); caption.append(name, number); + image.addEventListener('load', () => { frame.classList.remove('is-loading', 'is-error'); image.width = image.naturalWidth; image.height = image.naturalHeight; }); + image.addEventListener('error', () => { + frame.classList.remove('is-loading'); frame.classList.add('is-error'); image.hidden = true; + const error = document.createElement('div'); error.className = 'image-error'; + const message = document.createElement('p'); message.textContent = 'Не удалось загрузить страницу ' + (index + 1) + '.'; + const retry = document.createElement('button'); retry.type = 'button'; retry.textContent = 'Попробовать ещё раз'; + retry.addEventListener('click', () => { error.remove(); image.hidden = false; frame.classList.remove('is-error'); frame.classList.add('is-loading'); image.src = info.src + '?retry=' + Date.now(); }); + error.append(message, retry); frame.prepend(error); + }); + frame.append(image, caption); image.src = info.src; + return frame; + } + function goTo(index, scroll = true) { + if (!pages.length) return; + page = Math.max(0, Math.min(pages.length - 1, index)); + if (spreadEnabled()) page = currentSpread(page)[0]; + if (mode === 'paged') render(scroll); + else { + trackingBlockedUntil = performance.now() + 450; + if (scroll) stage.querySelector('[data-page="' + page + '"]')?.scrollIntoView({ block: 'start', behavior: 'instant' }); + syncControls(); remember(); + } + } + function turn(delta) { + if (!pages.length) return; + const index = spreadEnabled() ? (delta > 0 ? visiblePages().at(-1) + 1 : (page <= 1 ? 0 : page - 2)) : page + delta; + if (index < 0 || index >= pages.length) return; + goTo(index); + } + function render(scroll = false) { + syncControls(); + if (!pages.length) return; + trackingBlockedUntil = performance.now() + 450; + stage.className = 'reader-stage is-' + mode; + const canvas = document.createElement('div'); + canvas.className = mode === 'paged' ? 'paged-canvas' + (spreadEnabled() ? ' is-spread' : '') : 'vertical-canvas'; + const indices = mode === 'paged' ? visiblePages() : pages.map((_, index) => index); + indices.forEach(index => canvas.append(makeImage(index, mode === 'vertical' && Math.abs(index - page) > 1))); + stage.replaceChildren(canvas); + if (mode === 'paged') stage.scrollLeft = stage.scrollWidth - stage.clientWidth; + if (mode === 'vertical') requestAnimationFrame(() => { if (page > 0 || scroll) stage.querySelector('[data-page="' + page + '"]')?.scrollIntoView({ block: 'start', behavior: 'instant' }); }); + else if (scroll) stage.scrollIntoView({ block: 'start', behavior: 'instant' }); + remember(); + if (mode === 'paged') { + const next = visiblePages().at(-1) + 1; + if (pages[next]) { const preload = new Image(); preload.src = pages[next].src; } + } + } + function empty(title, text) { + stage.className = 'reader-stage'; stage.replaceChildren(); + const box = document.createElement('section'); box.className = 'reader-empty'; + const icon = document.createElement('div'); icon.className = 'empty-icon'; icon.textContent = 'M'; icon.setAttribute('aria-hidden', 'true'); + const heading = document.createElement('h2'); heading.textContent = title; + const message = document.createElement('p'); message.textContent = text; + const link = document.createElement('a'); link.href = manga ? 'series-' + manga.id + '.html#chapters' : 'serials.html'; link.textContent = manga ? 'К списку глав' : 'Выбрать сериал'; + box.append(icon, heading, message, link); stage.append(box); + } + function chapterUrl(item) { return 'reader.html?series=' + encodeURIComponent(manga.id) + '&chapter=' + encodeURIComponent(item.id); } + async function init() { + syncControls(); + try { + const response = await fetch('manga/library.json', { cache: 'no-store' }); + if (!response.ok) throw new Error('library'); + library = await response.json(); + manga = library.series.find(item => (item.id === params.get('series') || item.folder === params.get('series'))); + if (!manga) { $('#chapter-meta').textContent = 'Библиотека MANGABOM'; empty('Выбери свою историю', 'Открой сериал в каталоге и выбери главу для чтения.'); return; } + $('#series-link').href = 'series-' + manga.id + '.html#chapters'; $('#series-link').textContent = manga.title; + const last = read('reader.last.' + manga.id, {}); + const requested = params.get('chapter'); + chapter = requested ? manga.chapters.find(item => item.id === requested) : (manga.chapters.find(item => item.id === last.chapter && item.ready) || manga.chapters.find(item => item.ready) || manga.chapters[0]); + const select = $('#chapter-select'); select.replaceChildren(); + manga.chapters.forEach(item => { const option = document.createElement('option'); option.value = item.id; option.textContent = item.title + (item.ready ? '' : ' · скоро'); select.append(option); }); + select.disabled = !manga.chapters.length; + if (!chapter) { $('#chapter-meta').textContent = manga.title; empty('Глава не найдена', 'Выбери другую главу из списка.'); return; } + select.value = chapter.id; + $('#reader-title').textContent = chapter.title; document.title = manga.title + ' — ' + chapter.title + ' · MANGABOM'; + $('#chapter-meta').textContent = chapter.title; + const readyChapters = manga.chapters.filter(item => item.ready); + const position = manga.chapters.indexOf(chapter); + const previous = readyChapters.filter(item => manga.chapters.indexOf(item) < position).at(-1); + const next = readyChapters.find(item => manga.chapters.indexOf(item) > position); + [['#previous-chapter', previous], ['#next-chapter', next]].forEach(([selector, item]) => { if (item) { $(selector).href = chapterUrl(item); $(selector).hidden = false; } }); + $('#chapter-navigation').hidden = !previous && !next; + if (!chapter.ready || !chapter.pages.length) { empty('Страницы ещё не опубликованы', 'Эта глава готовится к выходу. Загляни позже или выбери другую историю.'); return; } + pages = chapter.pages; + const saved = read('reader.progress.' + manga.id + '.' + chapter.id, {}); + const explicit = Number(params.get('page')); + const target = params.has('page') && Number.isInteger(explicit) && explicit > 0 ? explicit : Number(saved.page) || 1; + page = Math.max(0, Math.min(pages.length - 1, target - 1)); + if (spreadEnabled()) page = currentSpread(page)[0]; + $('#page-select').replaceChildren(...pages.map((_, index) => { const option = document.createElement('option'); option.value = String(index); option.textContent = String(index + 1); return option; })); + render(); + } catch (error) { + $('#chapter-meta').textContent = 'Библиотека недоступна'; empty('Не удалось открыть главу', 'Проверь подключение к сайту и обнови страницу.'); console.error('MANGABOM reader:', error); + } finally { stage.setAttribute('aria-busy', 'false'); syncControls(); } + } + document.querySelectorAll('[data-mode]').forEach(button => button.addEventListener('click', () => { mode = button.dataset.mode; if (spreadEnabled() && pages.length) page = currentSpread(page)[0]; settings(); render(true); })); + $('#page-layout').addEventListener('change', event => { layout = event.target.value; if (spreadEnabled() && pages.length) page = currentSpread(page)[0]; settings(); render(true); }); + $('#reader-zoom').addEventListener('input', event => { zoom = Number(event.target.value); settings(); syncControls(); }); + $('#chapter-select').addEventListener('change', event => { const item = manga?.chapters.find(item => item.id === event.target.value); if (item) location.href = chapterUrl(item); }); + $('#page-select').addEventListener('change', event => goTo(Number(event.target.value))); + $('#next-page').addEventListener('click', () => turn(1)); $('#previous-page').addEventListener('click', () => turn(-1)); + document.addEventListener('keydown', event => { + if (event.target.closest('input,select,textarea,button,a') || event.altKey || event.ctrlKey || event.metaKey || !pages.length) return; + if (event.key === 'ArrowLeft') { event.preventDefault(); turn(1); } + if (event.key === 'ArrowRight') { event.preventDefault(); turn(-1); } + if (event.key === 'Home') { event.preventDefault(); goTo(0); } + if (event.key === 'End') { event.preventDefault(); goTo(pages.length - 1); } + }); + stage.addEventListener('touchstart', event => { if (event.touches.length === 1) touch = { x: event.touches[0].clientX, y: event.touches[0].clientY }; else touch = null; }, { passive: true }); + stage.addEventListener('touchend', event => { + if (!touch || mode !== 'paged' || zoom > 100 || !event.changedTouches.length) return; + const dx = event.changedTouches[0].clientX - touch.x, dy = event.changedTouches[0].clientY - touch.y; touch = null; + if (Math.abs(dx) > 60 && Math.abs(dx) > Math.abs(dy) * 1.5) turn(dx > 0 ? 1 : -1); + }, { passive: true }); + stage.addEventListener('touchcancel', () => { touch = null; }); + window.addEventListener('scroll', () => { + if (mode !== 'vertical' || !pages.length || raf || performance.now() < trackingBlockedUntil) return; + raf = requestAnimationFrame(() => { + raf = 0; if (mode !== 'vertical') return; + const frames = [...stage.querySelectorAll('[data-page]')]; + let current = 0; + for (const frame of frames) { if (frame.getBoundingClientRect().top <= innerHeight * .35) current = Number(frame.dataset.page); } + if (current !== page) { page = current; syncControls(); remember(); } + }); + }, { passive: true }); + $('#fullscreen').hidden = !document.fullscreenEnabled; + $('#fullscreen').addEventListener('click', async () => { try { if (document.fullscreenElement) await document.exitFullscreen(); else await document.documentElement.requestFullscreen(); } catch { $('#reader-status').textContent = 'Полноэкранный режим недоступен в этом браузере.'; } }); + document.addEventListener('fullscreenchange', () => $('#fullscreen').setAttribute('aria-pressed', String(!!document.fullscreenElement))); + window.addEventListener('pagehide', remember); + init(); +})(); \ No newline at end of file diff --git a/dist/reading-effects.css b/dist/reading-effects.css new file mode 100644 index 0000000..1e358d0 --- /dev/null +++ b/dist/reading-effects.css @@ -0,0 +1,36 @@ +/* Blend the hero artwork into the copy, without a hard image boundary. */ +.hero{--hero-matte:248,238,227;background:rgb(var(--hero-matte))} +html[data-theme=dark] .hero{--hero-matte:36,37,43;background:rgb(var(--hero-matte))} +.hero .hero-art{inset:0 0 0 16%;background:none;isolation:isolate;-webkit-mask-image:linear-gradient(90deg,transparent 0%,#000 24%);mask-image:linear-gradient(90deg,transparent 0%,#000 24%)} +.hero .hero-art::before{content:'';position:absolute;inset:-24px;z-index:0;background-image:var(--hero-image,none);background-size:cover;background-position:center 34%;filter:blur(22px);opacity:.8;transform:scale(1.04);-webkit-mask-image:linear-gradient(90deg,transparent 0%,#000 38%);mask-image:linear-gradient(90deg,transparent 0%,#000 38%)} +.hero .hero-art>img{position:absolute;inset:0 0 0 auto;z-index:1;width:84%;height:100%;object-fit:cover;object-position:center 30%;-webkit-mask-image:linear-gradient(90deg,transparent 0%,#0006 12%,#000 34%);mask-image:linear-gradient(90deg,transparent 0%,#0006 12%,#000 34%)} +html[data-theme] .hero::after{background:linear-gradient(90deg,rgba(var(--hero-matte),1) 0%,rgba(var(--hero-matte),.97) 20%,rgba(var(--hero-matte),.82) 31%,rgba(var(--hero-matte),.55) 42%,rgba(var(--hero-matte),.14) 56%,rgba(var(--hero-matte),0) 70%)} +/* The complete series block controls the image, without duplicate buttons. */ +.series-card-link{display:block;width:100%;height:100%;position:relative;overflow:hidden;border-radius:inherit} +.series-card::after{z-index:1;pointer-events:none}.series-card .series-title{z-index:2} +.hero .hero-art>img,.series-card .series-card-link img,.catalog-card .managed-cover>img,.series-intro .series-poster .managed-cover>img{transform:scale(1.045);transition:transform .38s cubic-bezier(.2,.65,.25,1)} +.hero .hero-art::before{transition:transform .38s cubic-bezier(.2,.65,.25,1)} +@media(hover:hover) and (pointer:fine){ + .hero:hover .hero-art>img,.series-card:hover .series-card-link img,.catalog-card:hover .managed-cover>img,.series-intro:hover .series-poster .managed-cover>img{transform:scale(1)} + .hero:hover .hero-art::before{transform:scale(1)} +} +.hero:focus-within .hero-art>img,.series-card:focus-within .series-card-link img,.catalog-card:focus-within .managed-cover>img,.series-intro:focus-within .series-poster .managed-cover>img{transform:scale(1)} +.hero:focus-within .hero-art::before{transform:scale(1)} +@media(prefers-reduced-motion:reduce){ + .hero .hero-art>img,.series-card .series-card-link img,.catalog-card .managed-cover>img,.series-intro .series-poster .managed-cover>img,.hero .hero-art::before{transform:none!important;transition:none!important} +} +.motion-reduced .hero-art>img,.motion-reduced .series-card-link img,.motion-reduced .catalog-card .managed-cover>img,.motion-reduced .series-poster .managed-cover>img,.motion-reduced .hero-art::before{transform:none!important;transition:none!important} +@media(max-width:600px){ + .hero .hero-art{inset:0 0 auto;height:300px;-webkit-mask-image:linear-gradient(180deg,#000 0%,#000 53%,transparent 100%);mask-image:linear-gradient(180deg,#000 0%,#000 53%,transparent 100%)} + .hero .hero-art>img{inset:0;width:100%;height:100%;object-position:center 26%;-webkit-mask-image:none;mask-image:none} + .hero .hero-art::before{-webkit-mask-image:none;mask-image:none} + html[data-theme] .hero::after{background:linear-gradient(180deg,rgba(var(--hero-matte),0) 0,rgba(var(--hero-matte),0) 120px,rgba(var(--hero-matte),.12) 180px,rgba(var(--hero-matte),.55) 235px,rgba(var(--hero-matte),.92) 290px,rgba(var(--hero-matte),1) 340px)} +} +/* Keep the hero copy inside shorter desktop banners. */ +@media(min-width:901px) and (max-height:820px){ + .hero .hero-copy{gap:4px} + .hero .hero-name{font-size:clamp(36px,min(4.9vw,5.8svh),72px)} + .hero .chapter-title{font-size:clamp(16px,1.4vw,20px)} + .hero .hero-description{font-size:clamp(14px,1.1vw,16px)} + .hero .hero-caption{gap:3px} +} \ No newline at end of file diff --git a/dist/reading-guide.html b/dist/reading-guide.html new file mode 100644 index 0000000..ac0ef6f --- /dev/null +++ b/dist/reading-guide.html @@ -0,0 +1,77 @@ + + + + + + + + Как читать мангу — MANGABOM + + + + + + + + + + + + + + +
+
+ +
+
Читателям

Справа налево.
Кадр за кадром.

+

Небольшой путеводитель перед первой главой.

+
+
2
+
1
+
3 ← Порядок чтения +
+
+

1. Начни справа

+

Верхний правый кадр — первый. Дальше двигайся влево по ряду.

+

2. Спускайся ниже

+

Когда ряд закончился, переходи к следующему ряду кадров.

+

3. Читай реплики по порядку

+

Внутри кадра обычно начинают с верхнего правого облачка текста. Направление может подсказывать сама композиция.

+

4. Дай рисунку время

+

Крупные кадры и паузы тоже рассказывают историю.

+
+
+
+ +
+ + diff --git a/dist/schedule.html b/dist/schedule.html new file mode 100644 index 0000000..5eed0ff --- /dev/null +++ b/dist/schedule.html @@ -0,0 +1,86 @@ + + + + + + + + Расписание глав — MANGABOM + + + + + + + + + + + + + + +
+
+ +
+
Календарь

Продолжение следует

+

Расписание из первого выпуска. Выбери отмеченный день, чтобы увидеть анонс.

+
+

Январь 2026

+ +
+
+ПНВТСРЧТПТСБВС +
+
+12345678910111213141516171819212325262728293031 +
+

Выход новой главы

+
+
+
+ +
+ + diff --git a/dist/serials.html b/dist/serials.html new file mode 100644 index 0000000..dfa4326 --- /dev/null +++ b/dist/serials.html @@ -0,0 +1,110 @@ + + + + + + + + Каталог сериалов — MANGABOM + + + + + + + + + + + + + + +
+
+ +
+
Каталог

Твоя следующая история

+

Восемь оригинальных сериалов. Выбирай жанр, открывай знакомство и сохраняй любимое.

+8 сериалов +
+
+ +
+ +
+
+ +
+ + diff --git a/dist/series-bar.html b/dist/series-bar.html new file mode 100644 index 0000000..771bf10 --- /dev/null +++ b/dist/series-bar.html @@ -0,0 +1,80 @@ + + + + + + + + БАР-БАР — MANGABOM + + + + + + + + + + + + + + +
+
+ +
+
БАР-БАР
+
+Комедия · Фурри

БАР-БАР

+

Доисторическая фурри-комедия. Бур, Шуша и их компания — в первом выпуске MANGABOM.

+
+Оригинальный сериал1 главы в №001Справа налево +
+

Список хранится в этом браузере.

+

Знакомые лица

+

Бур · Шуша · Клык · Мох · Рога

+

Читай постранично или вертикальной лентой. Главы открываются по мере публикации страниц.

+
  1. +
    +Выпуск №001

    Глава 01

    +
    +СкороОткрыть +
+
+
+ +
+ + diff --git a/dist/series-data.json b/dist/series-data.json new file mode 100644 index 0000000..c83c642 --- /dev/null +++ b/dist/series-data.json @@ -0,0 +1 @@ +[{"id": "food", "title": "Повелитель дешёвого обеда", "genre": "Фэнтези"}, {"id": "port", "title": "Нулевой причал", "genre": "Приключения"}, {"id": "veranda", "title": "Последняя веранда", "genre": "Фантастика"}, {"id": "realtor", "title": "Риелтор грёз", "genre": "Фэнтези"}, {"id": "volley", "title": "Второе касание", "genre": "Спорт"}, {"id": "warm", "title": "Пока в доме тепло", "genre": "Драма"}, {"id": "dry", "title": "Сухая сторона", "genre": "Триллер"}, {"id": "bar", "title": "БАР-БАР", "genre": "Комедия"}] \ No newline at end of file diff --git a/dist/series-dry.html b/dist/series-dry.html new file mode 100644 index 0000000..1e761f0 --- /dev/null +++ b/dist/series-dry.html @@ -0,0 +1,88 @@ + + + + + + + + Сухая сторона — MANGABOM + + + + + + + + + + + + + + +
+
+ +
+
Сухая сторона
+
+Триллер · Романтика

Сухая сторона

+

Романтический триллер. По другую сторону ворот кто-то ждёт ответа.

+
+Оригинальный сериал2 главы в №001Справа налево +
+

Список хранится в этом браузере.

+

Знакомые лица

+

Ася Ветрова · Лев · Тая · Нина · Виктор

+

Читай постранично или вертикальной лентой. Главы открываются по мере публикации страниц.

+
    +
  1. +
    +Выпуск №001

    Глава 01

    +
    +СкороОткрыть +
  2. +
  3. +
    +Выпуск №001

    Глава 02

    +
    +СкороОткрыть +
  4. +
+
+
+ +
+ + diff --git a/dist/series-food.html b/dist/series-food.html new file mode 100644 index 0000000..548c4f7 --- /dev/null +++ b/dist/series-food.html @@ -0,0 +1,88 @@ + + + + + + + + Повелитель дешёвого обеда — MANGABOM + + + + + + + + + + + + + + +
+
+ +
+
Повелитель дешёвого обеда
+
+Фэнтези · Кулинария

Повелитель дешёвого обеда

+

Фэнтези о еде, соперничестве и находчивости. Главный сериал первого выпуска MANGABOM.

+
+Оригинальный сериал2 главы в №001Справа налево +
+

Список хранится в этом браузере.

+

Знакомые лица

+

Рэн Астер · Лилия · Борин

+

Читай постранично или вертикальной лентой. Главы открываются по мере публикации страниц.

+
    +
  1. +
    +Выпуск №001

    Глава 01

    +
    +СкороОткрыть +
  2. +
  3. +
    +Выпуск №001

    Глава 02

    +
    +СкороОткрыть +
  4. +
+
+
+ +
+ + diff --git a/dist/series-port.html b/dist/series-port.html new file mode 100644 index 0000000..ae3a299 --- /dev/null +++ b/dist/series-port.html @@ -0,0 +1,88 @@ + + + + + + + + Нулевой причал — MANGABOM + + + + + + + + + + + + + + +
+
+ +
+
Нулевой причал
+
+Приключения · Стимпанк

Нулевой причал

+

Стимпанк-приключение в мире причалов и механизмов. Одна из историй первого выпуска журнала.

+
+Оригинальный сериал2 главы в №001Справа налево +
+

Список хранится в этом браузере.

+

Знакомые лица

+

Мира · Таль · Альден · Лив · Йорн

+

Читай постранично или вертикальной лентой. Главы открываются по мере публикации страниц.

+
    +
  1. +
    +Выпуск №001

    Глава 01

    +
    +СкороОткрыть +
  2. +
  3. +
    +Выпуск №001

    Глава 02

    +
    +СкороОткрыть +
  4. +
+
+
+ +
+ + diff --git a/dist/series-realtor.html b/dist/series-realtor.html new file mode 100644 index 0000000..3d5d3ee --- /dev/null +++ b/dist/series-realtor.html @@ -0,0 +1,80 @@ + + + + + + + + Риелтор грёз — MANGABOM + + + + + + + + + + + + + + +
+
+ +
+
Риелтор грёз
+
+Фэнтези · Уютный исекай

Риелтор грёз

+

Уютное фэнтези о риелторе Артёме и необычных обитателях другого мира.

+
+Оригинальный сериал1 главы в №001Справа налево +
+

Список хранится в этом браузере.

+

Знакомые лица

+

Артём · Лира · Борук · Мими · граф Нокт

+

Читай постранично или вертикальной лентой. Главы открываются по мере публикации страниц.

+
  1. +
    +Выпуск №001

    Глава 01

    +
    +СкороОткрыть +
+
+
+ +
+ + diff --git a/dist/series-veranda.html b/dist/series-veranda.html new file mode 100644 index 0000000..bd188ef --- /dev/null +++ b/dist/series-veranda.html @@ -0,0 +1,88 @@ + + + + + + + + Последняя веранда — MANGABOM + + + + + + + + + + + + + + +
+
+ +
+
Последняя веранда
+
+Фантастика · Тайна

Последняя веранда

+

Научная фантастика с атмосферой тайны. История Ники и Марка в журнале MANGABOM.

+
+Оригинальный сериал2 главы в №001Справа налево +
+

Список хранится в этом браузере.

+

Знакомые лица

+

Ника · Марк · Арсений Гранов · Валентина

+

Читай постранично или вертикальной лентой. Главы открываются по мере публикации страниц.

+
    +
  1. +
    +Выпуск №001

    Глава 01

    +
    +СкороОткрыть +
  2. +
  3. +
    +Выпуск №001

    Глава 02

    +
    +СкороОткрыть +
  4. +
+
+
+ +
+ + diff --git a/dist/series-volley.html b/dist/series-volley.html new file mode 100644 index 0000000..a556335 --- /dev/null +++ b/dist/series-volley.html @@ -0,0 +1,80 @@ + + + + + + + + Второе касание — MANGABOM + + + + + + + + + + + + + + +
+
+ +
+
Второе касание
+
+Спорт · Волейбол

Второе касание

+

Спортивная манга о волейболе, команде и следующем касании мяча.

+
+Оригинальный сериал1 главы в №001Справа налево +
+

Список хранится в этом браузере.

+

Знакомые лица

+

Ася · Лиза · Полина · Рита · Вера · Кира

+

Читай постранично или вертикальной лентой. Главы открываются по мере публикации страниц.

+
  1. +
    +Выпуск №001

    Глава 01

    +
    +СкороОткрыть +
+
+
+ +
+ + diff --git a/dist/series-warm.html b/dist/series-warm.html new file mode 100644 index 0000000..e33274c --- /dev/null +++ b/dist/series-warm.html @@ -0,0 +1,88 @@ + + + + + + + + Пока в доме тепло — MANGABOM + + + + + + + + + + + + + + +
+
+ +
+
Пока в доме тепло
+
+Драма · Фурри

Пока в доме тепло

+

Фурри-драма о спасении и тепле дома. В первом выпуске представлены две главы истории.

+
+Оригинальный сериал2 главы в №001Справа налево +
+

Список хранится в этом браузере.

+

Знакомые лица

+

Мирон · Тая · Лада · Северин · Арсений

+

Читай постранично или вертикальной лентой. Главы открываются по мере публикации страниц.

+
    +
  1. +
    +Выпуск №001

    Глава 01

    +
    +СкороОткрыть +
  2. +
  3. +
    +Выпуск №001

    Глава 02

    +
    +СкороОткрыть +
  4. +
+
+
+ +
+ + diff --git a/dist/styles.css b/dist/styles.css new file mode 100644 index 0000000..55101b3 --- /dev/null +++ b/dist/styles.css @@ -0,0 +1,36 @@ +:root{--paper:#fcf5ed;--ink:#0b0b0c;--red:#db2028;--yellow:#ffd62d;--line:#191719;--gap:clamp(12px,1.4vw,22px);--display:'Roboto Condensed',Arial,sans-serif} +*{box-sizing:border-box}html{scrollbar-gutter:stable}body{margin:0;color:var(--ink);background:var(--paper) url('assets/textures/paper.webp') repeat;font-family:var(--display);font-size:18px}button{font:inherit;color:inherit;background:none;border:0;cursor:pointer;padding:0;-webkit-tap-highlight-color:transparent;transition:color .17s,background-color .17s,filter .17s,box-shadow .17s,translate .17s}button:focus-visible{outline:3px solid var(--red);outline-offset:4px}button:active,button.is-pressed{translate:0 2px;filter:brightness(.89)}:is(button,a).text-control:hover{color:var(--red)}img{display:block;max-width:100%;height:auto}h1,h2,p{margin:0}h2{font-size:inherit}:is(button,a).text-control{text-align:inherit;line-height:inherit;font-weight:inherit}.display{text-transform:uppercase;font-style:italic;font-weight:900;line-height:.98}.page{max-width:1800px;margin:auto}.screen{height:100svh;min-height:650px;padding:0 clamp(16px,1.6vw,28px) 20px;display:grid;grid-template-rows:clamp(76px,10.5svh,112px) minmax(0,1fr);gap:12px}.header{display:grid;grid-template-columns:minmax(220px,.9fr) minmax(440px,1.65fr) minmax(150px,.45fr);align-items:center;gap:clamp(18px,2vw,34px)}.wordmark{font-family:'Bangers',Impact,sans-serif;font-size:clamp(50px,5.2vw,87px);line-height:.9;letter-spacing:1px;transform:skew(-8deg) rotate(-3deg);position:relative;white-space:nowrap;text-align:left;justify-self:start}.wordmark:after{content:'';position:absolute;bottom:-9px;right:-5%;width:71%;height:8px;background:var(--red);clip-path:polygon(0 75%,100% 0,85% 45%,95% 43%,8% 100%,30% 57%)}.wordmark:hover{color:var(--red)}.nav{height:44px;border-inline:1px solid #827c76;padding-inline:clamp(14px,2vw,30px);display:flex;gap:12px;align-items:center;justify-content:space-between}.nav-item{text-transform:uppercase;font-size:clamp(19px,1.8vw,29px);font-weight:900;font-style:italic;padding:9px 14px;white-space:nowrap;position:relative;z-index:0}.nav-item:before{content:'';position:absolute;inset:0;z-index:-1;transform:skew(-23deg);border-radius:2px;transition:background .17s}.nav-item:hover:before{background:#f2e3d3}.nav-item.active{color:white}.nav-item.active:before{background:var(--red)}.skew-button{min-height:46px;display:flex;align-items:center;justify-content:center;gap:16px;padding:9px 21px;position:relative;isolation:isolate;font-weight:900;line-height:1;text-align:center}.skew-button:before{content:'';position:absolute;inset:0;transform:skew(-16deg);border-radius:10px;z-index:-1;border:1px solid #ffffffa6;box-shadow:inset 0 0 12px #ffffff18;transition:box-shadow .17s,filter .17s}.yellow:before{background:linear-gradient(110deg,#ffdb2e,#ffd429)}.red:before{background:linear-gradient(110deg,#d92029,#df2428)}.skew-button:hover:before{filter:brightness(1.055);box-shadow:0 5px 15px #9c671e22}.support{font-size:clamp(16px,1.45vw,23px);text-transform:uppercase;padding:10px 12px;min-height:52px;gap:10px}.heart-icon{font:43px/1 Arial,sans-serif}.main{min-height:0;display:grid;grid-template-rows:minmax(270px,1.65fr) minmax(155px,1fr) minmax(96px,.49fr);gap:var(--gap)}.lead{display:grid;grid-template-columns:minmax(0,2.85fr) minmax(0,1fr);gap:14px;min-height:0}.hero{position:relative;isolation:isolate;overflow:hidden;border-radius:24px;background:#f5e9dc;min-width:0}.hero-art{position:absolute;inset:0 0 0 38%;z-index:-2}.hero-art img{width:100%;height:100%;object-fit:cover;object-position:50% 30%}.hero:after{content:'';position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,#f8eee3 0%,#f8eee3 31%,#f8eee3dc 40%,#f8eee300 60%)}.hero-copy{width:54%;height:100%;padding:clamp(16px,2svh,26px) clamp(20px,2.4vw,38px);display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:7px}.badge{font-size:clamp(15px,1.5vw,23px);text-transform:uppercase;font-weight:900;font-style:italic;line-height:1;background:linear-gradient(100deg,#ffdf56,#ffda2e);padding:7px 13px;transform:skew(-12deg) rotate(-3deg);border-radius:5px}.badge:hover{background:var(--red);color:white}.hero-name{font-style:italic;font-weight:900;text-transform:uppercase;line-height:.84;letter-spacing:-.055em;transform:skew(-5deg);font-size:clamp(38px,min(4.9vw,6.1svh),83px);display:block}.hero-name span{display:block}.hero-name span:first-child{font-size:.79em;letter-spacing:-.045em}.hero-name span:nth-child(2){color:var(--red);font-size:1.08em}.hero-name span:last-child{font-size:1.18em;text-align:center}.hero-name:hover span{color:var(--red)}.hero-caption{display:grid;gap:4px}.chapter-title{font-size:clamp(16px,1.65vw,25px);font-weight:800!important;line-height:1.05!important}.hero-description{font-size:clamp(14px,1.35vw,21px);line-height:1.12!important}.read-button{color:white;text-transform:uppercase;font-style:italic;font-size:clamp(20px,2.05vw,32px);width:100%;max-width:370px;min-height:clamp(43px,6svh,60px);gap:18px}.arrow{width:25px;height:3px;background:currentColor;display:inline-block;position:relative;flex-shrink:0;margin-right:4px}.arrow:after{content:'';width:13px;height:13px;border-top:3px solid currentColor;border-right:3px solid currentColor;transform:rotate(45deg);position:absolute;right:0;top:-5px}.book-icon{width:29px;height:25px;display:flex;gap:1px;flex-shrink:0}.book-icon i{width:14px;border:2px solid currentColor;border-radius:4px 4px 0 0;position:relative}.book-icon i:after{content:'';position:absolute;inset:5px 2px;background:repeating-linear-gradient(currentColor 0 2px,transparent 2px 5px)}.issue{border:1.5px solid var(--line);border-radius:22px;padding:clamp(15px,1.5vw,23px);display:flex;flex-direction:column;gap:clamp(10px,1.5svh,18px);min-width:0;min-height:0}.issue h2{font-size:clamp(25px,2.35vw,38px)}.issue-body{display:flex;align-items:center;gap:15px;flex:1;min-height:0}.cover-button{height:100%;max-width:54%;aspect-ratio:188/247;flex-shrink:1;min-width:0}.cover{width:100%;height:100%;object-fit:contain;object-position:left center;border-radius:5px}.cover-button:hover{filter:brightness(1.06);translate:0 -2px}.issue-meta{display:grid;gap:6px;flex-shrink:0;white-space:nowrap}.issue-meta strong{font-size:clamp(36px,4.3vw,69px);font-weight:900;line-height:1;letter-spacing:-2px}.issue-meta span{font-size:clamp(16px,1.65vw,25px)}.issue-button{width:100%;font-size:clamp(19px,1.95vw,30px);gap:12px;min-height:clamp(42px,5.8svh,58px);flex-shrink:0}.serials{display:grid;grid-template-rows:auto minmax(0,1fr);gap:12px;min-height:0}.section-heading{display:flex;align-items:center;gap:17px}.ribbon{padding:3px 23px 5px;font-size:clamp(26px,2.7vw,43px);position:relative;isolation:isolate;white-space:nowrap}.ribbon:before{content:'';position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,#ffdc4a,#ffe9a3);transform:skew(-25deg)}.ribbon:hover{color:var(--red)}.heading-line{height:1px;background:#262326;flex:1}.series-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;min-height:0}.series-card{position:relative;overflow:hidden;border-radius:18px;text-align:left;background:#29313d;min-width:0;min-height:0}.series-card img{height:100%;width:100%;object-fit:cover;object-position:center 30%;transition:transform .3s}.series-card:after{content:'';position:absolute;inset:33% 0 0;background:linear-gradient(0deg,#111722c9,transparent)}.series-card:hover img{transform:scale(1.045)}.series-card:hover .series-title{color:var(--yellow)}.series-title{position:absolute;bottom:10px;left:12px;z-index:1;font-size:clamp(21px,min(2.5vw,4svh),38px);font-style:italic;text-transform:uppercase;font-weight:900;line-height:.94;padding:7px 12px 2px;border-radius:7px;background:linear-gradient(90deg,#20222be8,#20222b99);color:white;transition:color .17s}.bottom{display:grid;grid-template-columns:1.2fr 1fr;gap:14px;min-height:0}.schedule,.vote{border:1.4px solid var(--line);border-radius:18px;padding:clamp(12px,1.4vw,21px);display:flex;align-items:center;gap:18px;min-width:0;min-height:0}.schedule h2{flex:0 0 38%;font-size:clamp(23px,min(2.5vw,4svh),38px)}.panel-title{display:flex;align-items:center;gap:16px}.calendar-icon{width:48px;height:45px;border:4px solid currentColor;border-radius:6px;position:relative;display:block;flex-shrink:0;border-top:13px solid var(--red)}.calendar-icon:before,.calendar-icon:after{content:'';height:13px;width:5px;border-radius:4px;background:#121212;position:absolute;top:-20px;box-shadow:0 0 0 2px var(--paper)}.calendar-icon:before{left:6px}.calendar-icon:after{right:6px}.calendar-icon i{display:block;position:absolute;inset:7px 5px;background:radial-gradient(circle,currentColor 2px,transparent 3px) 0 0/9px 9px}.chapter-list{list-style:none;border-left:1px solid #918980;flex:1;min-width:0;padding:0 0 0 19px;margin:0;align-self:stretch;display:flex;flex-direction:column;justify-content:center}.chapter-list li{min-height:0}.chapter-list :is(button,a){display:flex;gap:14px;width:100%;align-items:center;font-size:clamp(14px,1.45vw,22px);text-align:left;line-height:1.1;padding:4px 0}.chapter-list :is(button,a):hover{color:var(--red)}.chapter-list time{display:block;flex:0 0 61px;text-align:center;font-weight:800;color:white;position:relative;font-style:italic;padding:2px 5px;isolation:isolate}.chapter-list time:before{content:'';position:absolute;inset:0;background:var(--red);transform:skew(-17deg);z-index:-1;border-radius:3px}.chapter-list li+li button>span{border-top:1px solid #cfc3b7;padding-top:4px}.chapter-list :is(button,a)>span{flex:1;min-width:0}.vote{background:linear-gradient(120deg,#ffdf78,#fff0bd 58%,#ffe187);gap:18px}.vote h2{font-size:clamp(23px,min(2.5vw,4svh),38px);flex:0 0 51%}.crown-icon{font-family:Arial,sans-serif;font-size:62px;font-style:normal;font-weight:400;line-height:1}.vote-copy{font-size:clamp(15px,1.5vw,23px);line-height:1.1!important;border-left:1px solid #9b8756;padding-left:20px;flex:1;min-width:0}.vote-button{flex:0 0 52px;height:42px;display:grid;place-items:center;border-radius:12px;background:var(--red);color:white}.vote-button:hover{background:#b81019;translate:2px 0}.footer{border-top:1px solid #b7a99b;padding:42px clamp(20px,3vw,48px) 22px;display:grid;grid-template-columns:1.5fr repeat(3,1fr);gap:30px;background:#f3e9dd}.footer-wordmark{font-size:43px;margin-bottom:26px}.footer-description{display:block;font-size:16px;line-height:1.4!important;color:#62584e}.footer-group{display:flex;align-items:flex-start;flex-direction:column;gap:11px}.footer-group h2{font-size:23px;font-weight:900;margin-bottom:4px}.footer-group>a{font-size:16px;text-align:left;color:#62584e}.footer-group a:hover{color:var(--red)}.footer-bottom{grid-column:1/-1;display:flex;justify-content:space-between;border-top:1px solid #d6c8b9;padding-top:20px;font-size:14px;color:#74685c} +@media(min-width:901px) and (max-height:740px){.screen{min-height:600px;gap:8px;padding-bottom:12px}.header{grid-template-columns:minmax(200px,.9fr) minmax(420px,1.7fr) minmax(145px,.45fr)}.main{gap:12px;grid-template-rows:minmax(250px,1.65fr) minmax(140px,1fr) minmax(88px,.49fr)}.hero-copy{padding:14px 22px;gap:5px}.hero-name{font-size:min(4.8vw,6.2svh)}.hero-description{font-size:14px}.chapter-title{font-size:17px}.read-button{min-height:40px}.support{min-height:46px}.series-title{font-size:25px}.issue{padding:14px;gap:8px}.issue h2{font-size:26px}.schedule,.vote{padding:12px;gap:12px}.calendar-icon{width:36px;height:37px}.crown-icon{font-size:48px}.panel-title{gap:10px}.chapter-list{padding-left:14px}.chapter-list :is(button,a){gap:10px;font-size:15px}.vote-copy{font-size:16px;padding-left:14px}.vote-button{flex-basis:44px;height:36px}} +@media(min-width:901px) and (max-width:1150px){.header{grid-template-columns:210px minmax(390px,1fr) 150px;gap:18px}.wordmark{font-size:52px}.nav{padding-inline:13px;gap:6px}.nav-item{font-size:20px;padding:9px}.support{font-size:17px;gap:7px}.heart-icon{font-size:32px}.lead{grid-template-columns:minmax(0,2.5fr) minmax(0,1fr)}.hero-copy{width:57%;padding-inline:20px}.hero-name{font-size:min(4.8vw,6.1svh)}.issue-meta strong{font-size:43px}.issue-meta span{font-size:17px}.issue-button{font-size:20px;padding-inline:10px}.bottom{grid-template-columns:1.15fr 1fr}.schedule h2,.vote h2{font-size:25px}.calendar-icon{width:32px;height:34px}.crown-icon{font-size:42px}.panel-title{gap:10px}.chapter-list{padding-left:12px}.chapter-list time{flex-basis:48px}.chapter-list :is(button,a){font-size:14px;gap:9px}.vote{gap:12px}.vote h2{flex-basis:49%}.vote-copy{font-size:16px;padding-left:12px}.vote-button{flex-basis:40px;height:36px}.vote-button .arrow{width:20px}} +@media(max-width:900px){.screen{height:auto;min-height:100svh;padding:12px 16px 22px;display:block}.header{display:grid;grid-template-columns:1fr 160px;gap:20px 14px;margin-bottom:18px}.wordmark{font-size:clamp(48px,8vw,68px);margin-bottom:6px}.support{font-size:18px;min-height:47px}.heart-icon{font-size:34px}.nav{grid-row:2;grid-column:1/-1;border:0;padding:0;height:auto;gap:10px;justify-content:space-between}.nav-item{font-size:23px;padding:8px 15px}.main{display:flex;flex-direction:column;gap:20px}.lead{grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);gap:14px}.hero{min-height:390px;border-radius:19px}.hero-art{inset:0 0 0 25%}.hero:after{background:linear-gradient(90deg,#f8eee3f2,#f8eee3bf 30%,#f8eee300 90%)}.hero-copy{width:84%;padding:18px;gap:13px;position:relative;min-height:390px}.badge{font-size:16px}.hero-name{font-size:48px;text-shadow:0 1px 8px #fcf5ed}.chapter-title{font-size:19px}.hero-description{font-size:16px}.read-button{font-size:23px;min-height:46px;gap:14px}.issue{padding:16px;gap:16px;border-radius:19px}.issue h2{font-size:28px}.issue-body{flex-direction:column;align-items:flex-start;gap:14px}.cover-button{height:178px;max-width:100%;flex-shrink:0}.issue-meta strong{font-size:44px}.issue-meta span{font-size:19px}.issue-button{font-size:20px;gap:12px;padding-inline:10px;min-height:45px}.issue-button .arrow{width:20px}.serials{display:block}.section-heading{margin-bottom:13px;gap:12px}.ribbon{font-size:30px;padding-inline:15px}.series-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.series-card{height:180px;border-radius:14px}.series-title{font-size:29px;bottom:10px;left:9px}.bottom{grid-template-columns:1fr;gap:14px}.schedule,.vote{min-height:117px;padding:18px;gap:18px}.schedule h2{font-size:30px;flex-basis:38%}.chapter-list :is(button,a){font-size:18px;gap:12px}.chapter-list time{flex-basis:57px}.vote h2{font-size:30px;flex-basis:48%}.vote-copy{font-size:20px}.vote-button{flex-basis:54px}.footer{grid-template-columns:repeat(3,1fr);padding:30px 22px 20px;gap:26px 20px}.footer-intro{grid-column:1/-1;display:flex;gap:40px;align-items:center}.footer-wordmark{font-size:43px;margin-bottom:10px}.footer-description{font-size:15px}.footer-group h2{font-size:21px}.footer-group>a{font-size:15px}.footer-bottom{font-size:13px}} +@media(max-width:600px){.screen{padding:12px 14px 20px}.header{grid-template-columns:minmax(0,1fr) 116px;gap:17px 12px;margin-bottom:17px}.wordmark{font-size:clamp(38px,9.3vw,55px)}.support{font-size:14px;padding:8px 6px;gap:5px;min-height:42px}.heart-icon{font-size:29px}.support:before{border-radius:8px}.nav{gap:7px}.nav-item{font-size:clamp(17px,4.5vw,22px);padding:7px 10px;flex:1}.lead{grid-template-columns:1fr;gap:16px}.hero{min-height:0}.hero-art{inset:0 0 auto 0;height:220px}.hero-art img{object-position:50% 26%}.hero:after{background:linear-gradient(0deg,#f8eee3 0%,#f8eee3 40%,#f8eee300 68%)}.hero-copy{padding:16px 18px 18px;width:100%;min-height:0;gap:12px}.badge{align-self:flex-end;font-size:15px;padding:8px 11px;margin-bottom:132px;max-width:122px;text-align:center;line-height:1.05}.hero h1{align-self:center;max-width:100%;margin-top:-8px}.hero-name{font-size:clamp(44px,12.3vw,68px);line-height:.84}.hero-caption{gap:6px}.chapter-title{font-size:19px}.hero-description{font-size:16px}.read-button{max-width:none;font-size:24px;min-height:47px;margin-top:2px}.issue{display:grid;grid-template-columns:1fr;gap:12px;padding:17px}.issue h2{font-size:29px}.issue-body{display:flex;flex-direction:row;align-items:center;gap:24px}.cover-button{height:160px;max-width:48%}.issue-meta strong{font-size:57px}.issue-meta span{font-size:20px}.issue-button{font-size:23px;min-height:47px;margin-top:2px}.ribbon{font-size:clamp(24px,6.7vw,32px);padding:4px 13px}.section-heading{gap:9px;margin-bottom:12px}.series-grid{gap:10px}.series-card{height:140px;border-radius:12px}.series-title{font-size:clamp(22px,5.9vw,29px);left:5px;bottom:7px;padding:5px 8px 3px}.main{gap:18px}.schedule{display:block;padding:18px}.schedule h2{font-size:29px;margin-bottom:16px}.calendar-icon{width:40px;height:41px}.chapter-list{border:0;padding:0}.chapter-list :is(button,a){font-size:16px;padding-block:6px;gap:12px}.chapter-list time{flex-basis:58px;font-size:19px}.chapter-list li+li button>span{padding-top:0;border:0}.chapter-list li+li{border-top:1px solid #e1d5c8}.vote{display:grid;grid-template-columns:1fr 48px;gap:14px;padding:18px}.vote h2{grid-column:1/-1;font-size:29px}.crown-icon{font-size:54px}.vote-copy{border:0;padding:0;font-size:18px}.vote-button{height:41px;width:48px}.footer{grid-template-columns:1fr 1fr;gap:25px 18px;padding:28px 20px 18px}.footer-intro{display:block}.footer-wordmark{font-size:45px;margin-bottom:25px}.footer-description{font-size:15px}.footer-group:last-of-type{grid-column:1/-1}.footer-group{gap:10px}.footer-group h2{font-size:22px}.footer-group>a{font-size:15px}.footer-bottom{display:flex;align-items:flex-start;flex-direction:column;gap:9px;line-height:1.3}} +@media(prefers-reduced-motion:reduce){button,.series-card img{transition:none}} +.hero-name.text-control{line-height:.84}.chapter-list :is(button,a){font-size:clamp(13px,1.25vw,20px)}.chapter-list :is(button,a)>span{white-space:nowrap}.chapter-list li+li button>span{border:0;padding-top:0}.chapter-list li+li{border-top:1px solid #d7cabe} +@media(min-width:901px) and (max-height:740px){.chapter-list :is(button,a){font-size:14px;padding-block:3px}} +@media(max-width:900px){.chapter-list :is(button,a){font-size:18px}.chapter-list :is(button,a)>span{white-space:normal}} +@media(max-width:600px){.chapter-list :is(button,a){font-size:16px}} +@media(min-width:901px){.main{grid-template-rows:minmax(270px,1.65fr) minmax(155px,1fr) minmax(116px,.49fr)}.schedule,.vote{padding-block:13px}.chapter-list li{flex-shrink:0}.chapter-list :is(button,a){padding-block:2px;line-height:1.05}.chapter-list time{font-size:inherit}} +@media(min-width:901px) and (max-height:740px){.main{grid-template-rows:minmax(250px,1.65fr) minmax(140px,1fr) minmax(104px,.49fr)}.schedule,.vote{padding-block:11px}} +@media(max-width:600px){.header .wordmark{font-size:clamp(30px,9vw,52px)}.nav{gap:6px;min-width:0}.nav-item{min-width:0;flex:1;font-size:clamp(15px,4.3vw,22px);padding:8px 4px}.issue{grid-template-columns:minmax(0,1fr)}.issue-body{gap:18px;min-width:0}.issue .cover-button{height:150px;max-width:44%;flex-shrink:1}.issue-meta strong{font-size:clamp(43px,14vw,57px)}.issue-meta span{font-size:clamp(17px,5vw,20px)}.skew-button{white-space:nowrap}.read-button{font-size:clamp(20px,6vw,24px);gap:14px}.issue-button{font-size:clamp(20px,6vw,23px)}} +/* Interaction: content stays static; only actual controls respond. */ +*{-webkit-user-select:none;user-select:none}::selection{background:transparent;color:inherit} +a{font:inherit;color:inherit;text-decoration:none;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:color .18s}a:focus-visible{outline:3px solid var(--red);outline-offset:4px}a.text-control{text-align:inherit;line-height:inherit;font-weight:inherit}span.text-control,p.text-control{text-align:inherit;line-height:inherit;font-weight:inherit;cursor:default} +button:active,button.is-pressed{translate:none;filter:none}.wordmark:hover,.text-control:is(a,button):hover,.nav-item:not(.active):hover,.auth-button:hover,.chapter-list a:hover,.footer-group a:hover{color:var(--red)} +.nav-item:not(.active):hover:before{background:transparent}.skew-button:hover:before{filter:none;box-shadow:inset 0 0 12px #ffffff18}.skew-button:hover{color:var(--red)}.skew-button.red:hover{color:#ffdc48}.vote-button:hover{background:var(--red);color:var(--yellow);translate:none}.cover-button:hover{filter:none;translate:none}.cover-button:hover .cover{outline:2px solid var(--red);outline-offset:3px}.series-card:hover img{transform:none}.series-card:hover .series-title{color:var(--yellow)}.hero-name:hover span{color:inherit}.hero-name:hover span:nth-child(2){color:var(--red)}.badge:hover{background:linear-gradient(100deg,#ffdf56,#ffda2e);color:inherit}.hero-name.text-control{line-height:.84}.badge{display:inline-block}.footer-description{font-size:16px}.chapter-list a{display:flex;align-items:center;gap:14px;text-align:left;line-height:1.05;padding:2px 0;font-size:clamp(13px,1.25vw,20px)} +.header{grid-template-columns:minmax(180px,.85fr) minmax(355px,1.4fr) auto;gap:clamp(14px,1.5vw,26px)}.header>.wordmark{font-size:clamp(46px,4.65vw,79px)}.header .nav{padding-inline:clamp(10px,1.2vw,22px);gap:5px}.header .nav-item{font-size:clamp(17px,1.65vw,27px);padding:9px 11px}.header-actions{display:flex;align-items:center;gap:18px}.header-actions .support{width:clamp(144px,13vw,210px);font-size:clamp(16px,1.35vw,22px)}.auth-button{display:flex;gap:9px;align-items:center;justify-content:center;font-weight:800;text-transform:uppercase;font-style:italic;font-size:clamp(17px,1.5vw,23px);white-space:nowrap;min-height:44px}.user-icon{display:block;width:21px;height:24px;position:relative;flex-shrink:0}.user-icon:before{content:'';position:absolute;left:6px;top:0;width:9px;height:9px;border:2px solid currentColor;border-radius:50%}.user-icon:after{content:'';position:absolute;left:1px;bottom:0;width:20px;height:11px;border:2px solid currentColor;border-radius:12px 12px 3px 3px}.auth-button[aria-current=page]{color:var(--red)} +/* Companion pages share the magazine's paper, skewed labels and red/yellow accents. */ +.inner-screen{height:auto;min-height:100svh;grid-template-rows:clamp(76px,10.5svh,112px) minmax(0,1fr)}.placeholder-main{display:grid;align-items:center;padding:24px 0 42px;min-width:0}.placeholder-wrap{width:min(1140px,100%);margin:auto}.breadcrumbs{display:flex;align-items:center;flex-wrap:wrap;gap:12px;font-size:16px;color:#8e7b69;margin-bottom:22px}.breadcrumbs a:hover,.help-link:hover{color:var(--red)}.breadcrumb-current{color:#3b332e}.placeholder-card{border:1.5px solid #161414;border-radius:25px;overflow:hidden;display:grid;grid-template-columns:1.2fr 1fr;min-height:410px;background:linear-gradient(115deg,#fffaf4,#f7ecdf);position:relative}.placeholder-copy{padding:clamp(28px,4vw,64px);display:flex;flex-direction:column;align-items:flex-start;justify-content:center;position:relative;z-index:1;min-width:0}.page-kicker{display:inline-block;background:var(--yellow);transform:skew(-14deg);padding:6px 13px;font-size:17px;font-weight:900;font-style:italic;text-transform:uppercase;margin-bottom:23px}.placeholder-copy h1{font-size:clamp(36px,4.6vw,65px);font-weight:900;font-style:italic;line-height:.98;text-transform:uppercase;letter-spacing:-1.5px;max-width:650px;overflow-wrap:break-word}.page-description{color:#51483e;font-size:21px;line-height:1.4;margin-top:21px;max-width:500px}.page-status{display:flex;gap:9px;align-items:flex-start;color:#8e7b69;font-size:15px;line-height:1.4;margin-top:14px;max-width:420px}.status-dot{flex:0 0 6px;height:6px;background:var(--red);border-radius:50%;margin-top:7px}.back-home{margin:28px 4px 0;min-width:190px;min-height:48px;color:white;text-transform:uppercase;font-style:italic;font-size:22px}.back-arrow{font:28px/1 Arial}.help-link{margin-top:20px;font-size:16px;color:#615244;display:flex;align-items:center;gap:8px}.placeholder-art{background:linear-gradient(135deg,#fff1bb,#ffda45);position:relative;display:grid;place-items:center;overflow:hidden;isolation:isolate;min-width:0}.placeholder-art:after{content:'';position:absolute;inset:0;z-index:-1;background:repeating-linear-gradient(135deg,transparent 0 48px,#ffe895 49px 51px,transparent 52px 56px);opacity:.7}.art-orbit{position:absolute;width:330px;height:330px;border:1px solid #bc922a60;border-radius:50%;transform:rotate(-20deg) scaleY(.7)}.art-number{position:absolute;top:16px;right:25px;font-family:'Bangers',sans-serif;font-size:150px;color:#b9822414;line-height:1}.css-book{width:160px;height:194px;transform:rotate(-13deg);position:relative;background:var(--paper);border:3px solid var(--ink);border-radius:5px 10px 10px 5px;box-shadow:10px 10px 0 #151515}.css-book:before{content:'';position:absolute;left:12px;top:0;bottom:0;width:3px;background:var(--ink)}.css-book:after{content:'';position:absolute;inset:19px 21px 100px;background:var(--red);transform:skewY(-10deg);clip-path:polygon(0 8%,100% 0,90% 100%,9% 90%)}.css-book b{font-family:'Bangers',sans-serif;font-size:100px;position:absolute;left:48px;top:62px;font-weight:400;z-index:1}.css-book i{position:absolute;bottom:18px;left:28px;width:98px;height:4px;background:var(--ink);transform:rotate(-2deg)}.css-book i+i{bottom:30px;width:78px}.art-caption{position:absolute;bottom:35px;left:18px;right:18px;text-align:center;font-style:italic;font-size:21px;font-weight:900;letter-spacing:1px}.placeholder-footnote{display:flex;justify-content:space-between;gap:15px;color:#9d8975;font-size:13px;text-transform:uppercase;letter-spacing:1px;margin-top:17px}.login-card .placeholder-art{background:linear-gradient(135deg,#ffe786,#ffd329)} +@media(min-width:901px) and (max-width:1150px){.header{grid-template-columns:185px minmax(330px,1fr) auto;gap:14px}.header>.wordmark{font-size:46px}.header .nav{padding-inline:10px;gap:3px}.header .nav-item{font-size:18px;padding:9px 8px}.header-actions{gap:13px}.header-actions .support{width:141px;font-size:16px}.auth-button{font-size:17px;gap:7px}.user-icon{width:19px;transform:scale(.9)}.header-actions .heart-icon{font-size:29px}} +@media(max-width:900px){.header{grid-template-columns:minmax(180px,1fr) auto;gap:20px 16px}.header>.wordmark{font-size:clamp(45px,7vw,65px)}.header-actions{gap:19px}.header-actions .support{width:155px;font-size:17px}.auth-button{font-size:20px}.header .nav{grid-row:2;grid-column:1/-1;border:0;padding:0;gap:10px}.header .nav-item{font-size:23px;padding:8px 16px}.chapter-list a{font-size:18px;padding-block:4px}.inner-screen{display:flex;flex-direction:column}.placeholder-main{flex:1;width:100%;padding:12px 0 35px}.placeholder-card{min-height:390px;grid-template-columns:1.25fr .8fr}.placeholder-copy{padding:30px}.placeholder-copy h1{font-size:43px}.page-description{font-size:18px}.css-book{scale:.8}.art-caption{font-size:16px}.art-number{font-size:100px}.art-orbit{width:230px;height:230px}} +@media(max-width:600px){.header{grid-template-columns:minmax(0,1fr) auto;gap:18px 10px}.header>.wordmark{font-size:clamp(29px,8.5vw,48px)}.header-actions{gap:10px}.header-actions .support{width:105px;font-size:13px;min-height:40px;padding:7px 5px;gap:4px}.header-actions .heart-icon{font-size:25px}.auth-button{gap:5px;font-size:15px;min-height:40px}.user-icon{width:18px;transform:scale(.8)}.header .nav{gap:6px}.header .nav-item{font-size:clamp(15px,4.3vw,22px);padding:8px 4px}.chapter-list a{font-size:16px;padding-block:6px}.footer-group>a{font-size:15px}.footer-description{font-size:15px}.placeholder-main{padding:8px 0 24px}.breadcrumbs{font-size:14px;gap:9px;margin:6px 0 17px}.placeholder-card{grid-template-columns:1fr;border-radius:20px;min-height:0}.placeholder-copy{padding:27px 23px 29px}.page-kicker{font-size:15px;margin-bottom:20px}.placeholder-copy h1{font-size:clamp(34px,10vw,46px);letter-spacing:-1px}.page-description{font-size:18px;margin-top:17px}.page-status{font-size:14px;margin-top:13px}.back-home{font-size:21px;min-height:47px;margin-top:24px}.placeholder-art{height:205px;grid-row:2}.css-book{scale:.62}.art-caption{bottom:17px;font-size:15px}.art-number{font-size:110px;top:12px;right:24px}.art-orbit{width:240px;height:240px}.placeholder-footnote{font-size:10px;letter-spacing:.5px}.help-link{font-size:15px}.login-card .placeholder-art{height:210px}} +@media(max-width:359px){.header{grid-template-columns:1fr;gap:12px}.header>.wordmark{font-size:43px;justify-self:center;margin-bottom:6px}.header-actions{grid-row:2;justify-content:center;gap:25px}.header-actions .support{width:139px;font-size:15px}.auth-button{font-size:18px}.header .nav{grid-row:3}.header .nav-item{font-size:16px}} +.hero-name.text-control{font-weight:900} +/* Home catalog invitation and a six-dot calendar with stable geometry. */ +.more-series{min-width:0;min-height:0;position:relative;isolation:isolate;overflow:hidden;border-radius:18px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;background:#f3e9df;text-align:center;font-size:clamp(22px,min(2.3vw,3.7svh),35px);font-weight:800;line-height:1.04;padding:12px}.more-series:before,.more-series:after{content:'';position:absolute;left:0;right:0;height:60%;background:url('assets/textures/brush-texture.webp') top/100% auto no-repeat;opacity:.65;z-index:-1}.more-series:before{top:0}.more-series:after{bottom:0;transform:rotate(180deg)}.more-series:hover{color:var(--red)}.plus-icon{display:block;width:41px;height:41px;position:relative;flex-shrink:0}.plus-icon:before,.plus-icon:after{content:'';position:absolute;background:currentColor;border-radius:2px;top:17px;left:0;width:41px;height:8px}.plus-icon:after{transform:rotate(90deg)} +.calendar-icon{display:grid;position:relative;flex:0 0 52px;width:52px;height:55px;border:6px solid #160d0b;border-top:15px solid #dd1622;border-radius:8px;grid-template-columns:repeat(3,6px);grid-template-rows:repeat(2,6px);gap:5px;padding:8px 5px 4px;align-content:start;justify-content:center;background:#fff6ed;overflow:visible}.calendar-icon:before,.calendar-icon:after{top:-24px;width:7px;height:16px;border:0;box-shadow:0 0 0 3px var(--paper);border-radius:5px;background:#140c0b}.calendar-icon:before{left:5px}.calendar-icon:after{right:5px}.calendar-icon i{position:static;inset:auto;display:block;width:6px;height:6px;border:0;border-radius:50%;background:#160d0b;transform:none} +/* Shared full pages */ +.product-screen{height:auto;min-height:100svh;display:flex;flex-direction:column;padding-bottom:40px;gap:0}.product-screen .header{height:clamp(76px,10.5svh,112px);flex-shrink:0}.product-main{width:100%;flex:1;padding-top:25px}.product-wrap{max-width:1240px;margin:auto;min-width:0}.page-heading{margin-bottom:30px;max-width:920px}.page-heading h1{font-size:clamp(35px,4.1vw,64px);font-weight:900;font-style:italic;text-transform:uppercase;line-height:1;letter-spacing:-1px;margin:0}.page-heading>p{font-size:20px;line-height:1.4;color:#66594d;margin-top:17px;max-width:810px}.page-heading .page-kicker{margin-bottom:16px}.eyebrow{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:1px;color:#8b7662}.lead-text{font-size:22px;line-height:1.4;color:#54483d}.notice{padding:13px 16px;background:#efe2d2;border-left:3px solid var(--red);font-size:14px;line-height:1.45;color:#6d5847;margin:18px 0}.micro-copy{font-size:13px;line-height:1.45;color:#887361;margin-top:12px}.inline-link{color:var(--ink);font-weight:700;font-size:16px}.inline-link:hover{color:var(--red)}.action-button{display:inline-flex;min-height:46px;width:fit-content;max-width:100%;margin:20px 5px 5px;padding:12px 24px;font-size:19px;font-weight:900}.action-button.red{color:white}.action-button.red:hover{color:var(--yellow)}.outline-button{display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:10px 16px;border:1.5px solid #18120e;border-radius:8px;font-size:15px;font-weight:700;min-height:42px}.outline-button:not(:disabled):hover{color:var(--red);border-color:var(--red)}button:disabled{cursor:not-allowed;color:#968777;border-color:#d4c5b5;background:#eee2d4}.paper-panel{border:1px solid #baa895;border-radius:18px;background:#fffaf47a;padding:28px;min-width:0}.paper-panel h2,.yellow-panel h2,.content-section h2{font-size:30px;font-weight:900;line-height:1.06;margin-bottom:16px}.paper-panel>p,.yellow-panel>p,.content-section>p{line-height:1.5;margin-top:12px}.yellow-panel{background:linear-gradient(125deg,#ffe9a0,#ffda43);border:1px solid #bd9e46;border-radius:18px;padding:30px;min-width:0}.yellow-panel h2{font-style:italic;text-transform:uppercase;font-size:36px}.yellow-panel .notice{background:#fff4cb}.yellow-panel .inline-link{display:block;margin-top:20px}.two-column{display:grid;grid-template-columns:1.3fr 1fr;gap:24px;align-items:start}.content-section{margin-top:30px}.section-top{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:15px}.section-top h2{margin:0}.plain-list{padding:0;margin:22px 0;list-style:none}.plain-list li{padding:10px 0;border-bottom:1px solid #ba9d563d;line-height:1.35}.plain-list li:before{content:'—';color:var(--red);margin-right:10px}.empty-state{padding:40px;border:1px dashed #baa895;text-align:center;color:#877363;border-radius:15px}.filter-bar{display:flex;align-items:end;gap:18px;margin-bottom:24px;flex-wrap:wrap}.search-field{flex:1;min-width:190px}.search-field span,.select-field span{display:block;font-size:13px;color:#7e6b5a;margin-bottom:7px}.search-field input,.select-field select,input,select,textarea{font:inherit;color:var(--ink);background:#fffbf6;border:1px solid #c3b19e;border-radius:8px;padding:12px 13px;width:100%;min-width:0;user-select:text;-webkit-user-select:text}.search-field input:focus,select:focus,input:focus,textarea:focus{outline:2px solid var(--red);outline-offset:2px}.select-field{min-width:170px}.result-count{color:#8c7562;font-size:14px;padding-bottom:14px}.catalog-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}.catalog-card{border:1px solid #d1beaa;border-radius:16px;overflow:hidden;background:#fffaf3;min-width:0}.catalog-visual{display:block;height:185px;position:relative;overflow:hidden;background:#deccb7}.poster-art{display:block;width:100%;height:100%;object-fit:cover;object-position:center 20%}.small-tag{position:absolute;bottom:12px;left:12px;background:var(--yellow);padding:4px 8px;font-size:12px;font-weight:800;border-radius:3px}.catalog-copy{padding:18px}.catalog-copy h2{font-size:24px;line-height:1.03;font-weight:900;margin:9px 0 12px;min-height:49px}.catalog-copy h2 a:hover{color:var(--red)}.catalog-copy>p{font-size:15px;line-height:1.4;color:#76604e;min-height:83px}.favorite{display:block;font-size:15px;font-weight:700;margin-top:16px;text-align:left}.favorite:hover,.favorite[aria-pressed=true]{color:var(--red)}.type-cover{background:linear-gradient(145deg,var(--cover-color),#161b23);color:#fff5e5;display:flex;flex-direction:column;justify-content:space-between;padding:18px;position:relative;isolation:isolate;overflow:hidden}.type-cover:after{content:'';position:absolute;inset:0;z-index:-1;background:repeating-linear-gradient(140deg,transparent 0 35px,#ffffff0b 36px 38px,transparent 39px 45px)}.type-cover>span{font:24px 'Bangers',sans-serif}.type-cover>b{font-style:italic;text-transform:uppercase;font-size:clamp(28px,2.5vw,39px);line-height:.93;font-weight:900;overflow-wrap:break-word}.type-cover>small{font-size:9px;letter-spacing:1px}.series-intro{display:grid;grid-template-columns:300px 1fr;gap:42px;align-items:center}.series-poster{height:370px;border-radius:19px;overflow:hidden;border:1px solid #c7b49f}.series-poster img{object-position:center;height:100%;width:100%;object-fit:cover}.series-poster .type-cover{height:100%;padding:25px}.series-poster .type-cover>b{font-size:48px}.series-intro-copy{min-width:0}.series-intro-copy h1{font-size:clamp(35px,4.2vw,62px);font-style:italic;font-weight:900;text-transform:uppercase;line-height:.97;letter-spacing:-1px;margin-bottom:20px}.series-intro-copy .page-kicker{margin-bottom:16px}.info-tags{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}.info-tags>span{border:1px solid #c9b49e;padding:6px 9px;border-radius:4px;color:#8a7059;font-size:12px}.big-favorite{margin-top:23px;padding:10px 15px;border:1px solid #a88f75;border-radius:7px;width:fit-content;font-size:17px}.detail-chapters{padding:0;margin:18px 0 0;list-style:none;border-top:1px solid #cdb8a2}.detail-chapters li{display:flex;gap:20px;align-items:center;padding:18px 0;border-bottom:1px solid #cdb8a2}.detail-chapters h3{font-size:23px;margin:5px 0 0}.chapter-state{margin-left:auto;color:#9d8874;font-size:14px}.issue-feature{display:grid;grid-template-columns:255px 1fr;gap:50px;align-items:center;border:1px solid #cbb49d;background:linear-gradient(110deg,#f1e2cf,#fffaf5);padding:35px;border-radius:22px}.archive-cover img{width:100%;border-radius:7px;box-shadow:9px 10px 0 #b49e8829}.issue-feature h2{font-size:clamp(38px,4vw,64px);font-style:italic;font-weight:900;text-transform:uppercase;line-height:.97;margin:18px 0}.issue-stats{display:flex;gap:30px;margin-top:25px}.issue-stats span{font-size:14px;color:#8f7660}.issue-stats b{font-size:34px;font-weight:900;color:#17110e;margin-right:4px}.issue-contents-layout{display:grid;grid-template-columns:240px 1fr;gap:45px}.issue-sidebar img{width:100%;border-radius:8px}.issue-sidebar p{font-size:16px;color:#8c715b;margin:15px 0}.contents-list h2{font-size:30px;font-weight:900;margin-bottom:20px}.contents-row{display:grid;grid-template-columns:34px 1fr 50px 20px;gap:20px;align-items:center;border-top:1px solid #ceb69f;padding:18px 0}.contents-row:hover{color:var(--red)}.contents-no{font-size:21px;color:#ad8e72;font-weight:900}.contents-row b{font-size:21px}.contents-row small{display:block;color:#9d8169;font-size:13px;margin-top:5px}.contents-row>span:nth-child(3){font-size:14px;color:#8b715c}.schedule-layout{display:grid;grid-template-columns:420px 1fr;gap:30px;align-items:start}.month-calendar{padding:25px;border:1px solid #c6ac92;border-radius:17px;background:#fffaf4}.month-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:22px}.month-top h2{font-size:27px;font-weight:900}.month-top button{font-size:14px;color:#95775d}.week-labels,.month-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;text-align:center}.week-labels{font-size:11px;letter-spacing:1px;color:#9f8368;margin-bottom:9px}.calendar-day{aspect-ratio:1;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:18px;border-radius:7px;position:relative}.calendar-day.has-release{background:#ffeab0;font-weight:900}.calendar-day.has-release i{width:4px;height:4px;border-radius:50%;background:var(--red);position:absolute;bottom:5px}.calendar-day.has-release[aria-pressed=true]{background:var(--red);color:white}.calendar-day.has-release[aria-pressed=true] i{background:white}.calendar-legend{display:flex;align-items:center;gap:8px;font-size:12px;color:#9c7f63;margin-top:20px}.calendar-legend i{width:6px;height:6px;background:var(--red);border-radius:50%}.release-event{display:flex;gap:20px;align-items:center;border-bottom:1px solid #d6c0a9;padding:20px 0}.release-event:first-child{padding-top:0}.release-event time{background:#ffdf70;border-radius:9px;display:flex;flex-direction:column;align-items:center;justify-content:center;width:62px;min-width:62px;height:72px}.release-event time b{font-size:29px;font-weight:900;line-height:1}.release-event time span{font-size:11px;letter-spacing:1px;margin-top:5px}.release-event h3{font-size:23px;line-height:1.05;margin:6px 0}.release-event h3 a:hover{color:var(--red)}.release-event p{font-size:13px;color:#a0846b}.release-event>.inline-link{font-size:13px;white-space:nowrap;margin-left:auto}.vote-options{display:grid;grid-template-columns:1fr 1fr;gap:12px}.vote-choice{border:1px solid #ceb89f;padding:15px;border-radius:10px;display:flex;gap:11px;align-items:center;cursor:pointer;position:relative}.vote-choice input{position:absolute;opacity:0;width:1px;height:1px}.radio-mark{width:18px;height:18px;min-width:18px;border:1.5px solid #987d61;border-radius:50%;display:grid;place-items:center}.vote-choice:has(input:checked){border-color:var(--red);background:#fff1e8}.vote-choice:has(input:focus-visible){outline:2px solid var(--red);outline-offset:2px}.vote-choice input:checked+.radio-mark:after{content:'';width:9px;height:9px;border-radius:50%;background:var(--red)}.vote-choice b{font-size:16px;line-height:1.1;display:block}.vote-choice small{font-size:12px;color:#997a5d;display:block;margin-top:6px}.large-symbol{display:block;font:90px/1 Arial;margin-bottom:15px}.form-status{font-size:15px;line-height:1.4;margin-top:15px;color:#a52222;min-height:20px}.field-label{display:block;font-weight:700;font-size:15px;margin-top:20px}.field-label input,.field-label select,.field-label textarea{margin-top:9px;font-weight:400}.mini-book{width:90px;height:110px;background:var(--paper);border:3px solid #16110f;box-shadow:7px 7px 0 #17110e;transform:rotate(-10deg);display:grid;place-items:center;font:80px 'Bangers',sans-serif;margin:10px 0 35px 10px}.demo-label{font-size:13px;letter-spacing:.5px;color:#9b7f63;border:1px solid #cfb99f;padding:7px 10px;border-radius:5px}.account-toolbar{display:flex;justify-content:space-between;gap:15px;align-items:center;margin-bottom:25px}.favorites-list{display:grid;gap:10px}.favorite-row{display:flex;gap:20px;align-items:center;border:1px solid #d0bba3;padding:17px;border-radius:10px;background:#fffaf4}.favorite-row a{font-size:20px;font-weight:700;flex:1}.favorite-row a:hover{color:var(--red)}.favorite-row button{font-size:13px;color:#a52b25}.setting-row{display:flex;gap:20px;align-items:center;justify-content:space-between;padding:18px 0;border-bottom:1px solid #dbc7b2;cursor:pointer}.setting-row b{display:block;font-size:19px}.setting-row small{display:block;color:#96765a;margin-top:7px;font-size:14px}.setting-row input{appearance:none;width:42px;min-width:42px;height:24px;border-radius:20px;padding:0;background:#d1c1ae;position:relative;border:0;cursor:pointer}.setting-row input:before{content:'';width:18px;height:18px;border-radius:50%;background:white;position:absolute;left:3px;top:3px}.setting-row input:checked{background:var(--red)}.setting-row input:checked:before{left:21px}.amount-options{display:flex;gap:12px;margin:25px 0}.amount-options label{flex:1;position:relative;cursor:pointer}.amount-options input{position:absolute;opacity:0;width:1px;height:1px}.amount-options span{display:block;text-align:center;border:1px solid #c4a88c;border-radius:8px;padding:15px;font-size:23px;font-weight:800}.amount-options input:checked+span{border-color:var(--red);color:var(--red);background:#fff0e6}.amount-options input:focus-visible+span{outline:2px solid var(--red);outline-offset:3px}.plan-grid{display:grid;grid-template-columns:1fr 1fr;gap:25px}.plan-card{padding:32px;border:1px solid #bca187;border-radius:20px;background:#fff9f0;display:flex;flex-direction:column;align-items:flex-start}.plan-card.featured{background:linear-gradient(120deg,#ffe28a,#fff2ca)}.plan-card h2{font-size:36px;font-weight:900;margin:15px 0}.plan-card>p{line-height:1.4;color:#80664e}.unavailable{border:1px dashed #bc9f7d;color:#99774e;border-radius:7px;padding:13px 18px;margin-top:20px;font-size:15px}.news-list{display:grid;gap:20px}.news-card{border:1px solid #ccb396;border-radius:18px;padding:30px;display:grid;grid-template-columns:110px 1fr;gap:30px;background:#fffaf3}.news-number{font:95px/1 'Bangers',sans-serif;color:#d6242b}.news-card h2{font-size:34px;font-weight:900;line-height:1.03;margin:12px 0}.news-card h2 a:hover{color:var(--red)}.news-card p{font-size:18px;color:#8d7055;line-height:1.4;margin-bottom:18px}.prose{font-size:19px;line-height:1.65;max-width:960px}.prose h2{font-size:29px;margin-top:28px;margin-bottom:10px;line-height:1.15}.prose h2:first-child{margin-top:0}.prose p{color:#6a5542;margin:10px 0 20px}.prose section+section{margin-top:26px}.document-page{max-width:930px}.process-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.step-no{font:60px 'Bangers',sans-serif;color:var(--red);display:block;margin-bottom:15px}.manga-guide{display:grid;grid-template-columns:1fr 1fr;gap:12px;background:#1e1713;border-radius:15px;padding:14px;min-height:360px;transform:rotate(-2deg)}.manga-guide>div{display:grid;place-content:center;background:var(--paper);font-size:70px;font-weight:900;font-style:italic;color:var(--red);border:2px solid #0c0907}.manga-guide>div:last-child{grid-column:1/-1;min-height:180px}.manga-guide span{display:block;font-size:20px;color:#33251c}.faq-list{max-width:960px}.faq-list details{border-bottom:1px solid #cfb89d;padding:20px 0}.faq-list summary{font-size:24px;font-weight:700;cursor:pointer;line-height:1.2}.faq-list summary:hover{color:var(--red)}.faq-list details p{font-size:18px;line-height:1.5;color:#81644c;margin-top:14px;max-width:800px}[hidden]{display:none!important}.motion-reduced *{transition:none!important}.compact-cards .catalog-visual{height:120px}.compact-cards .catalog-copy>p{display:none} +@media(max-width:1100px){.catalog-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.schedule-layout{grid-template-columns:350px 1fr;gap:22px}.release-event{gap:13px;flex-wrap:wrap}.release-event>.inline-link{margin-left:75px}.series-intro{grid-template-columns:250px 1fr;gap:28px}.vote-options{grid-template-columns:1fr}.catalog-copy>p{min-height:90px}.issue-feature{grid-template-columns:210px 1fr;gap:30px}} +@media(max-width:900px){.product-screen .header{height:auto;flex-shrink:0}.product-main{padding-top:15px}.page-heading{margin-bottom:25px}.page-heading h1{font-size:43px}.two-column{grid-template-columns:1fr 1fr;gap:18px}.paper-panel,.yellow-panel{padding:22px}.yellow-panel h2{font-size:29px}.catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.catalog-copy>p{min-height:62px}.catalog-visual{height:185px}.series-intro{grid-template-columns:220px 1fr;gap:24px}.series-poster{height:310px}.series-intro-copy h1{font-size:38px}.lead-text{font-size:19px}.issue-contents-layout{grid-template-columns:190px 1fr;gap:25px}.contents-row{gap:12px;grid-template-columns:25px 1fr 36px 15px}.contents-row b{font-size:19px}.schedule-layout{grid-template-columns:1fr}.month-calendar{max-width:470px;width:100%}.release-event>.inline-link{margin-left:auto}.release-event{flex-wrap:nowrap}.process-grid{gap:13px}.process-grid .paper-panel{padding:18px}.process-grid h2{font-size:25px}.more-series{height:180px;border-radius:14px;font-size:29px}.calendar-icon{width:47px;flex-basis:47px;height:53px;padding:8px 3px 4px;gap:5px}.plan-card{padding:25px}.plan-card h2{font-size:30px}.news-card{grid-template-columns:80px 1fr;gap:20px}.news-number{font-size:75px}.news-card h2{font-size:30px}} +@media(max-width:600px){.more-series{height:140px;font-size:23px;gap:10px;border-radius:12px}.plus-icon{width:30px;height:30px}.plus-icon:before,.plus-icon:after{width:30px;height:6px;top:12px}.product-screen{padding-bottom:25px}.product-main{padding-top:7px}.page-heading h1{font-size:clamp(33px,9vw,44px)}.page-heading>p{font-size:17px;margin-top:14px}.page-heading .page-kicker{font-size:14px}.two-column,.plan-grid,.process-grid{grid-template-columns:1fr;gap:17px}.paper-panel,.yellow-panel{padding:22px 18px;border-radius:15px}.paper-panel h2,.yellow-panel h2,.content-section h2{font-size:27px}.lead-text{font-size:18px}.filter-bar{gap:14px;margin-bottom:18px}.search-field{flex-basis:100%}.select-field{flex:1;min-width:150px}.result-count{font-size:12px}.catalog-grid{gap:12px}.catalog-visual{height:145px}.catalog-copy{padding:13px}.catalog-copy h2{font-size:20px;min-height:42px;line-height:1.05}.catalog-copy>p{font-size:13px;line-height:1.35;min-height:105px}.catalog-copy .eyebrow{font-size:9px;letter-spacing:.5px}.favorite{font-size:13px;margin-top:13px}.small-tag{font-size:10px;left:8px;bottom:9px}.type-cover{padding:12px}.type-cover>span{font-size:19px}.type-cover>b{font-size:24px}.type-cover>small{font-size:7px;letter-spacing:.4px}.series-intro{grid-template-columns:1fr;gap:25px}.series-poster{height:255px;width:100%}.series-poster img{object-position:center 26%}.series-poster .type-cover{padding:23px}.series-poster .type-cover>b{font-size:48px;max-width:260px}.series-intro-copy h1{font-size:39px}.series-intro-copy .page-kicker{font-size:13px;max-width:100%}.info-tags{gap:6px}.info-tags span{font-size:11px;padding:5px 7px}.detail-chapters li{flex-wrap:wrap;gap:12px;padding:17px 0}.detail-chapters h3{font-size:22px}.chapter-state{font-size:12px}.detail-chapters button{min-height:35px;padding:8px 12px;font-size:13px}.section-top{align-items:flex-start}.section-top .inline-link{font-size:13px}.issue-feature{grid-template-columns:1fr;padding:24px 20px;gap:27px}.archive-cover{width:175px;justify-self:center}.issue-feature h2{font-size:39px}.issue-stats{gap:22px}.issue-stats b{font-size:30px}.issue-stats span{font-size:12px}.issue-contents-layout{grid-template-columns:1fr;gap:30px}.issue-sidebar{display:grid;grid-template-columns:110px 1fr;column-gap:20px;align-items:center}.issue-sidebar img{grid-row:1/3;width:110px}.issue-sidebar p{font-size:15px}.issue-sidebar .inline-link{font-size:14px}.contents-row{grid-template-columns:23px 1fr 32px 13px;gap:10px;padding:17px 0}.contents-row b{font-size:18px;line-height:1.1;display:block}.contents-row small{font-size:11px}.contents-row>span:nth-child(3){font-size:12px}.month-calendar{padding:20px 15px}.month-top h2{font-size:25px}.calendar-day{font-size:17px}.release-event{gap:12px;flex-wrap:wrap}.release-event time{min-width:52px;width:52px;height:63px}.release-event h3{font-size:20px;max-width:230px}.release-event p{font-size:11px}.release-event>.inline-link{margin-left:64px;margin-top:-4px;font-size:12px}.vote-options{grid-template-columns:1fr}.vote-choice{padding:14px}.vote-choice b{font-size:17px}.yellow-panel .notice{font-size:13px}.field-label{font-size:14px}.action-button{font-size:18px;padding:12px 17px;margin-top:20px;white-space:normal;text-align:center;line-height:1.1}.amount-options{gap:9px}.amount-options span{font-size:21px;padding:13px 9px}.news-card{grid-template-columns:1fr;gap:7px;padding:23px}.news-number{font-size:50px}.news-card h2{font-size:29px}.news-card p{font-size:16px}.prose{font-size:17px;line-height:1.55}.prose h2{font-size:25px}.faq-list summary{font-size:21px}.faq-list details p{font-size:17px}.manga-guide{min-height:310px}.manga-guide>div:last-child{min-height:160px}.favorite-row{gap:12px;padding:14px}.favorite-row a{font-size:18px}.favorite-row button{font-size:12px}.setting-row b{font-size:17px}.setting-row small{font-size:13px}.plan-card{padding:25px 20px}.plan-card h2{font-size:30px}.account-toolbar{gap:10px}.demo-label{font-size:11px;letter-spacing:0}.catalog-visual .poster-art{height:100%}.calendar-icon{width:52px;flex-basis:52px;height:55px;padding:8px 5px 4px}.catalog-card .favorite{min-height:30px}} +@media(max-width:420px){.header{grid-template-columns:1fr;gap:12px}.header>.wordmark{font-size:43px;justify-self:center;margin-bottom:6px}.header-actions{grid-row:2;justify-content:center;gap:25px}.header-actions .support{width:139px;font-size:15px}.auth-button{font-size:18px}.header .nav{grid-row:3}.header .nav-item{font-size:16px}} diff --git a/dist/subscription.html b/dist/subscription.html new file mode 100644 index 0000000..18f45b5 --- /dev/null +++ b/dist/subscription.html @@ -0,0 +1 @@ +Подписка и поддержка MANGABOM

Перейти к подписке и поддержке MANGABOM

\ No newline at end of file diff --git a/dist/support.css b/dist/support.css new file mode 100644 index 0000000..438b57e --- /dev/null +++ b/dist/support.css @@ -0,0 +1,9 @@ +.membership{padding:16px 0 0}.membership-heading{text-align:center;margin:0 auto 26px;max-width:900px}.membership-heading .page-kicker{font-size:14px;margin-bottom:18px}.membership-heading h1{font-size:clamp(38px,4.8vw,64px);font-weight:900;font-style:italic;text-transform:uppercase;line-height:1.02;margin:0;letter-spacing:-1px}.membership-heading h1>span{color:var(--red)}.membership-heading>p{font-size:18px;color:var(--reader-muted);margin-top:17px}.billing-toggle{display:flex;width:fit-content;margin:0 auto 34px;padding:5px;gap:5px;border:1px solid var(--reader-border);border-radius:12px;background:var(--reader-surface)}.billing-toggle button{min-height:44px;border-radius:8px;padding:10px 22px;font-size:17px;font-weight:800;display:flex;align-items:center;justify-content:center;gap:10px;color:var(--reader-ink)}.billing-toggle button[aria-pressed=true]{background:var(--red);color:white}.billing-toggle button>span{padding:3px 6px;border-radius:4px;background:var(--yellow);color:#18120d;font-size:13px}.membership-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px;align-items:stretch}.membership-card{padding:30px;border:1px solid var(--reader-border);border-radius:18px;min-width:0;background:var(--reader-surface);display:flex;flex-direction:column;position:relative}.membership-card h2{font-size:28px;font-weight:900;font-style:italic;margin:0 0 28px;line-height:1.1}.membership-price{font-size:clamp(45px,4.7vw,65px);font-weight:900;line-height:1;white-space:nowrap;letter-spacing:-2px}.membership-price>span:last-child{font-size:.55em;font-weight:700;letter-spacing:0}.membership-price>[data-plan-price]{font-size:inherit;font-weight:inherit;letter-spacing:inherit}.membership-period{font-size:16px;color:var(--reader-muted);margin-top:9px}.membership-details{margin:26px 0 28px;flex:1;border-top:1px solid var(--reader-border);padding-top:24px}.membership-details h3{font-size:19px;line-height:1.25;margin:0 0 12px;font-weight:800}.membership-details p{font-size:17px;line-height:1.5;color:var(--reader-muted);margin:0}.membership-featured{border:2px solid var(--red);padding:29px;background:linear-gradient(160deg,#fff8eb,#ffefc7)}.membership-featured h2{color:#b71924}.membership-button{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;padding:13px 17px;border:1px solid var(--reader-border);border-radius:8px;background:transparent;color:var(--reader-ink);font-size:17px;font-weight:800;text-align:left;line-height:1.2;width:100%;white-space:normal}.membership-button:hover{border-color:var(--red);color:var(--red)}.membership-featured .membership-button{background:var(--red);color:#fff;border-color:var(--red)}.membership-featured .membership-button:hover{background:#b71924}.membership-button>span{font-size:22px;flex-shrink:0}.membership-note,.membership-availability{text-align:center;color:var(--reader-muted);font-size:14px;line-height:1.45;margin-top:20px}.membership-availability{margin-top:6px}.membership>.form-status{text-align:center;margin-top:8px}.one-time-support{margin-top:48px;padding:34px;border-top:1px solid var(--reader-border);display:grid;grid-template-columns:1fr 1.1fr;gap:50px;align-items:center;border-radius:18px;background:var(--reader-surface)}.one-time-copy .page-kicker{margin-bottom:18px;font-size:13px}.one-time-copy h2{font-size:clamp(35px,3.8vw,50px);font-style:italic;font-weight:900;text-transform:uppercase;line-height:.98;margin:0 0 18px}.one-time-copy>p{font-size:17px;line-height:1.5;color:var(--reader-muted);max-width:370px}.share-support{font-size:16px;font-weight:700;text-align:left;margin-top:20px;min-height:40px}.share-support:hover{color:var(--red)}.one-time-form{padding:28px;border:1px solid var(--reader-border);border-radius:12px;min-width:0}.one-time-form h3{font-size:24px;line-height:1.1;margin:0;font-weight:900}.one-time-form .amount-options{margin:24px 0;gap:10px}.one-time-form .amount-options span{font-size:23px;padding:13px 9px}.one-time-form .membership-button{background:var(--yellow);color:#18120d;border-color:#ddbc4d}.one-time-form .form-status{font-size:14px}.membership-button:focus-visible,.billing-toggle button:focus-visible,.share-support:focus-visible{outline:3px solid var(--red);outline-offset:3px}html[data-theme=dark] .membership-featured{background:linear-gradient(160deg,#302627,#352b1c)}html[data-theme=dark] .membership-featured h2{color:#ff9a92}html[data-theme=dark] .membership-heading h1>span{color:#ff7e87}html[data-theme=dark] .one-time-form .amount-options input:checked+span{background:#3b2629;color:#ff9a92;border-color:#ff7e87} +@media(max-width:1100px){.membership-card{padding:23px}.membership-featured{padding:22px}.membership-price{font-size:49px}.membership-grid{gap:16px}.membership-card h2{font-size:25px}.membership-button{font-size:16px;padding:12px}.one-time-support{gap:28px;padding:28px}} +@media(max-width:760px){.membership-grid{grid-template-columns:1fr;gap:18px;max-width:520px;margin:auto}.membership-card{padding:26px}.membership-featured{padding:25px}.membership-card h2{font-size:28px;margin-bottom:24px}.membership-price{font-size:58px}.membership-details{margin-bottom:22px}.membership-button{font-size:17px;min-height:48px}.membership-heading>p{font-size:17px}.one-time-support{grid-template-columns:1fr;gap:24px;padding:24px;margin-top:30px}.one-time-form{padding:22px}.one-time-copy h2 br{display:none}.membership-heading h1{font-size:clamp(34px,8vw,48px)}} +@media(max-width:380px){.membership-card{padding:22px}.membership-featured{padding:21px}.membership-price{font-size:49px}.billing-toggle button{padding:10px 18px}.one-time-support{padding:20px}.one-time-form{padding:18px}.one-time-form h3{font-size:22px}.one-time-form .amount-options{gap:6px}.one-time-form .amount-options span{font-size:18px}} +.one-time-copy,.one-time-form,.one-time-form .amount-options label{min-width:0}.share-support{max-width:100%;white-space:normal}.one-time-form h3{overflow-wrap:anywhere} +@media(max-width:760px){.one-time-support{grid-template-columns:minmax(0,1fr)}} +@media(max-width:380px){.one-time-form .amount-options span{padding-inline:4px}} + +.one-time-copy h2{overflow-wrap:anywhere}@media(max-width:760px){.one-time-copy h2 br{display:initial}} diff --git a/dist/support.html b/dist/support.html new file mode 100644 index 0000000..6f1b718 --- /dev/null +++ b/dist/support.html @@ -0,0 +1,71 @@ + + + + + + + + Поддержать MANGABOM — подписка и разовая поддержка + + + + + + + + + + + + + + + + +
+
+ +
+
Поддержка журнала

Выбери свой MANGABOM

Меняй или отменяй подписку в любой момент

+
+
+

Читатель

0 ₽

Навсегда

Каталог манги, ознакомительные главы, избранное и голосования.

Читать бесплатно
+ +

Коллекционер

399 ₽

в месяц

Полное чтение + бонусы

Всё из MANGABOM+, скачиваемые издания, карточки, закладки и артбуки.

+
+

Цены указаны за месяц.

Оформление подписки и приём платежей пока недоступны.

+
+
Без подписки

Поддержать
один раз

Помоги новым историям появляться. Выбери комфортную сумму разовой поддержки.

Твоя поддержка — продолжение истории

+
+ +
+ + diff --git a/dist/support.js b/dist/support.js new file mode 100644 index 0000000..37e9a26 --- /dev/null +++ b/dist/support.js @@ -0,0 +1,20 @@ +(() => { + const choices = [...document.querySelectorAll('[data-billing]')]; + if (!choices.length) return; + const format = value => new Intl.NumberFormat('ru-RU', { maximumFractionDigits: 2 }).format(value); + let period = 'month'; + try { if (JSON.parse(localStorage.getItem('mangabom.billing')) === 'year') period = 'year'; } catch {} + const price = monthly => period === 'year' ? monthly * 12 * 83 / 100 : monthly; + function apply() { + choices.forEach(button => button.setAttribute('aria-pressed', String(button.dataset.billing === period))); + document.querySelectorAll('[data-plan-price]').forEach(label => label.textContent = format(price(Number(label.dataset.planPrice)))); + document.querySelectorAll('[data-plan-period]').forEach(label => label.textContent = period === 'year' ? 'в год' : 'в месяц'); + document.querySelector('#billing-note').textContent = period === 'year' ? 'Оплата за год целиком. Скидка 17% уже включена.' : 'Цены указаны за месяц.'; + document.querySelector('#plan-status').textContent = ''; + } + choices.forEach(button => button.addEventListener('click', () => { period = button.dataset.billing; try { localStorage.setItem('mangabom.billing', JSON.stringify(period)); } catch {} apply(); })); + document.querySelectorAll('[data-plan]').forEach(button => button.addEventListener('click', () => { + document.querySelector('#plan-status').textContent = 'Выбран ' + button.dataset.plan + ' — ' + format(price(Number(button.dataset.monthly))) + ' ₽ ' + (period === 'year' ? 'в год.' : 'в месяц.') + ' Оформление подписки пока недоступно.'; + })); + apply(); +})(); \ No newline at end of file diff --git a/dist/terms.html b/dist/terms.html new file mode 100644 index 0000000..1184935 --- /dev/null +++ b/dist/terms.html @@ -0,0 +1,67 @@ + + + + + + + + Условия использования — MANGABOM + + + + + + + + + + + + + + +
+
+ +
+
Справочная информация

Условия использования

+

Редакционный проект · описание текущей версии сайта

Статус этой версии

+

Сайт показывает каталог журнала и демонстрационные пользовательские сценарии. Этот текст описывает текущий интерфейс и является редакционным проектом для согласования перед запуском сервиса.

Чтение и аккаунт

+

Читалка доступна для опубликованных глав. Настоящая авторизация пока не подключена. Демо-кабинет не создаёт учётную запись на сервере.

Поддержка и подписка

+

Сайт не принимает платежи и не оформляет подписки. Платёжные условия должны быть отдельно определены и опубликованы до запуска оплаты.

Материалы журнала

+

Вопросы об использовании материалов можно подготовить в разделе обратной связи. См. также раздел об авторских правах.

Обращения

+

В текущей версии сообщения сохраняются локально и не отправляются редакции.

+
+
+ +
+ + diff --git a/dist/theme.css b/dist/theme.css new file mode 100644 index 0000000..3ad9d48 --- /dev/null +++ b/dist/theme.css @@ -0,0 +1,26 @@ +:root{color-scheme:light;--reader-bg:#f3ede5;--reader-surface:#fffbf6;--reader-ink:#211c19;--reader-muted:#75695f;--reader-border:#d7c9bb;--reader-accent:#be202a;--reader-active:#fff0ed;--reader-shadow:0 10px 40px #21150b18} +html[data-theme="dark"]{color-scheme:dark;--paper:#16181e;--ink:#f2ece4;--line:#82796f;--reader-bg:#101216;--reader-surface:#1b1e25;--reader-ink:#f2ece4;--reader-muted:#b4aca3;--reader-border:#3a3e48;--reader-accent:#ff7e87;--reader-active:#42232b;--reader-shadow:0 12px 40px #0005} +.site-theme-toggle{position:static;flex:0 0 auto;width:auto;min-height:40px;padding:9px 14px!important;border:1px solid var(--reader-border)!important;border-radius:7px;background:var(--reader-surface)!important;color:var(--reader-ink)!important;font:700 14px/1.2 "Roboto Condensed",Arial,sans-serif!important;cursor:pointer;white-space:nowrap} +.site-theme-toggle:focus-visible{outline:3px solid var(--reader-accent);outline-offset:3px} +html[data-theme="dark"] body{background:#16181e;color:#f2ece4} +html[data-theme="dark"] :is(.footer,.paper-panel,.catalog-card,.month-calendar,.plan-card,.news-card,.favorite-row,.placeholder-card){background:#20232b;color:#f2ece4;border-color:#4a4442} +html[data-theme="dark"] :is(.hero,.issue-feature){background:#24252b} +html[data-theme="dark"] .hero:after{background:linear-gradient(90deg,#24252b 0%,#24252b 31%,#24252be6 40%,#24252b00 65%)} +html[data-theme="dark"] .hero-name{text-shadow:none} +html[data-theme="dark"] :is(.footer-description,.footer-group>a,.footer-bottom,.catalog-copy>p,.prose p,.news-card p,.plan-card>p,.micro-copy,.eyebrow,.page-heading>p,.lead-text,.result-count,.chapter-state,.info-tags>span,.setting-row small,.breadcrumbs,.breadcrumbs a,.favorite-row button,.month-top button,.calendar-legend,.release-event p,.contents-row small,.contents-row>span:nth-child(3),.faq-list details p,.issue-sidebar p,.demo-label,.placeholder-copy .page-description,.page-status){color:#c3b8aa} +html[data-theme="dark"] :is(input,select,textarea){background:#171a21;color:#f2ece4;border-color:#786b60} +html[data-theme="dark"] :is(.outline-button,.favorite,.big-favorite){color:#f2ece4;border-color:#89796a} +html[data-theme="dark"] :is(.notice,.empty-state,.unavailable){background:#282b33;color:#dbd0c1;border-color:#706256} +html[data-theme="dark"] :is(.yellow-panel,.vote,.plan-card.featured){background:linear-gradient(125deg,#52401c,#342a1a);color:#fff0cf} +html[data-theme="dark"] .yellow-panel :is(p,.notice){color:#f2dfbb} +html[data-theme="dark"] .yellow-panel .notice{background:#332c20} +html[data-theme="dark"] .vote-choice:has(input:checked){background:#40272a;border-color:#ff8f91} +html[data-theme="dark"] .calendar-day.has-release{background:#514222;color:#ffe5a0} +html[data-theme="dark"] .calendar-day.has-release[aria-pressed=true]{background:#b32430;color:white} +html[data-theme="dark"] .issue-stats b{color:#f2ece4} +html[data-theme="dark"] .nav-item:hover:before{background:#36313a} +html[data-theme="dark"] :is(.yellow,.badge,.ribbon,.small-tag,.release-event time,.vote-button){color:#16120d} +html[data-theme="dark"] .vote-button{color:white} +html[data-theme="dark"] .manga-guide>div{color:#ff9197} +@media(max-width:600px){.site-theme-toggle{position:static;flex:0 0 auto;width:auto;min-height:40px;padding:9px 14px!important;border:1px solid var(--reader-border)!important;border-radius:7px;background:var(--reader-surface)!important;color:var(--reader-ink)!important;font:700 14px/1.2 "Roboto Condensed",Arial,sans-serif!important;cursor:pointer;white-space:nowrap}} +html[data-theme="dark"] .more-series{background:#292c34;color:#f2ece4}html[data-theme="dark"] .more-series:before,html[data-theme="dark"] .more-series:after{opacity:.08} diff --git a/dist/theme.js b/dist/theme.js new file mode 100644 index 0000000..a95f196 --- /dev/null +++ b/dist/theme.js @@ -0,0 +1,39 @@ +(() => { + const key = 'mangabom.theme'; + let saved; + try { saved = JSON.parse(localStorage.getItem(key)); } catch {} + const system = matchMedia('(prefers-color-scheme: dark)'); + let theme = ['light', 'dark'].includes(saved) ? saved : (system.matches ? 'dark' : 'light'); + function apply() { + document.documentElement.dataset.theme = theme; + document.querySelectorAll('[data-theme-toggle]').forEach(button => { + button.textContent = theme === 'dark' ? '☀ Светлая' : '☾ Тёмная'; + button.setAttribute('aria-label', theme === 'dark' ? 'Включить светлую тему' : 'Включить тёмную тему'); + button.setAttribute('aria-pressed', String(theme === 'dark')); + button.dataset.themeIcon = theme === 'dark' ? '☀' : '☾'; + button.title = theme === 'dark' ? 'Включить светлую тему' : 'Включить тёмную тему'; + }); + document.querySelector('meta[name="theme-color"]')?.setAttribute('content', theme === 'dark' ? '#16181e' : '#fcf5ed'); + } + apply(); + document.addEventListener('DOMContentLoaded', () => { + if (!document.querySelector('[data-theme-toggle]')) { + const button = document.createElement('button'); + button.type = 'button'; button.className = 'site-theme-toggle'; button.dataset.themeToggle = ''; + document.querySelector('.footer-bottom, .reader-footer')?.append(button); + } + apply(); + }); + document.addEventListener('click', event => { + if (!event.target.closest('[data-theme-toggle]')) return; + theme = theme === 'dark' ? 'light' : 'dark'; saved = theme; + try { localStorage.setItem(key, JSON.stringify(theme)); } catch {} + apply(); + }); + system.addEventListener('change', () => { if (!saved) { theme = system.matches ? 'dark' : 'light'; apply(); } }); + window.addEventListener('storage', event => { + if (event.key !== key && event.key !== null) return; + try { saved = JSON.parse(localStorage.getItem(key)); } catch { saved = null; } + theme = ['light', 'dark'].includes(saved) ? saved : (system.matches ? 'dark' : 'light'); apply(); + }); +})(); \ No newline at end of file diff --git a/dist/vote.html b/dist/vote.html new file mode 100644 index 0000000..aeaa176 --- /dev/null +++ b/dist/vote.html @@ -0,0 +1,72 @@ + + + + + + + + Голосование читателей — MANGABOM + + + + + + + + + + + + + + +
+
+ +
+
Голос читателей

Выбираешь ты

+

Какую серию развивать в первую очередь? Выбери одну историю.

+
+
+ +
+

+
+ +
+
+
+ +
+ + diff --git a/docs/image-spec/HOME_COMPOSITION.svg b/docs/image-spec/HOME_COMPOSITION.svg new file mode 100644 index 0000000..b9b09fa --- /dev/null +++ b/docs/image-spec/HOME_COMPOSITION.svg @@ -0,0 +1,44 @@ + +Композиция главного баннера MANGABOM +Горизонтальный исходник 3:2 с центральным героем. Лицо около 50–55 процентов ширины и 30–34 процентов высоты. Слева спокойное продолжение фона, справа сверху место для мобильного бейджа. Надписи и готовые градиенты не нужны. + + + + + + + + + + + + +ГЛАВНЫЙ БАННЕР · HOME +Мастер 2400 × 1600 px · пропорции 3:2 +Герой в исходнике — около центра + +Запас под мобильный бейдж +Без уникальной важной детали +в верхней правой части. +Условная область, не точная маска CSS. + +Спокойный фон слева +Продолжение той же сцены. +Не рисовать светлую панель, +надписи или готовый градиент. + + +Лицо: X 50–55%, Y 30–34% +Точка внимания в зелёном ядре. +Плечи, окружение и декор +могут выходить за эту зону. + +ЧТО ВАЖНО ДЛЯ HOME.webp +1. Полноценная сцена до краёв, без прозрачных полей. +2. Не смещать лицо к самому правому краю исходника. +3. Сайт сам сдвигает изображение вправо и смягчает стык. +4. Размытие и переход зависят от темы: в файл их не вшивать. +5. Проверить широкий экран, портретный планшет и телефон. +Это схема исходника. Перед экспортом скрыть все направляющие и подписи. + + \ No newline at end of file diff --git a/docs/image-spec/SERIES_SAFE_ZONES.svg b/docs/image-spec/SERIES_SAFE_ZONES.svg new file mode 100644 index 0000000..2c6d017 --- /dev/null +++ b/docs/image-spec/SERIES_SAFE_ZONES.svg @@ -0,0 +1,44 @@ + +Безопасные зоны универсальной обложки MANGABOM +Шаблон 2400 на 1600 пикселей. Критическая зона: 32–68 процентов ширины, 24–44 процента высоты. Центр внимания: 50 процентов ширины, 32 процента высоты. Оранжевая рамка показывает широкую миниатюру, синяя — узкую карточку. + + + + + + + + + + + + +УНИВЕРСАЛЬНАЯ ОБЛОЖКА · 3:2 +Мастер 2400 × 1600 px · экспорт 1920 × 1280 px +Один файл: галерея → каталог → страница сериала + + +Лицо + ключевой предмет +держать в зелёном ядре. +Фокус: X 50%, Y 32%. +Остальная сцена может обрезаться. + +КАК ЧИТАТЬ СХЕМУ + +Широкая миниатюра: срезает верх и низ + +Узкая карточка: срезает боковые части + +Зона с запасом: X 30–70%, Y 22–50% + +Критическое ядро: X 32–68%, Y 24–44% +Рамки — крайние примеры текущей вёрстки, +уже с учётом обычного масштаба 1,045. +На мастере 2400 × 1600 px +Ядро: X 768–1632 · Y 384–704 +Фокус: X 1200 · Y 512 +Фон продолжить до всех краёв. +Названия, плашки и рамки не рисовать. +Перед экспортом скрыть направляющие. + + \ No newline at end of file diff --git a/docs/image-spec/TECHNICAL_MAP.md b/docs/image-spec/TECHNICAL_MAP.md new file mode 100644 index 0000000..7e2dee6 --- /dev/null +++ b/docs/image-spec/TECHNICAL_MAP.md @@ -0,0 +1,162 @@ +# Техническая карта изображений MANGABOM + +Редакция: 2 ноября 2026. Основана на текущих стилях и замерах сайта в Chrome. Размеры блоков адаптивные: эта карта задаёт композицию исходного файла, а не фиксированную ширину баннера в браузере. + +## Короткое ТЗ для художника или генератора + +**Горизонтальная иллюстрация 3:2, мастер 2400 × 1600 px. Главный герой — в центре, лицо и ключевой объект в верхней центральной части. Ориентир для взгляда: X = 50%, Y = 32%. По всем краям — полноценный фон. Без текста, логотипа, рамок и готовых плашек. Экспорт для сайта: 1920 × 1280 px, WebP, sRGB.** + +Для каждого сериала создаётся один файл: он автоматически используется в блоке «Сериалы MANGABOM», в каталоге и на странице сериала. Отдельные версии «миниатюра» и «постер» не нужны. Отличается только кадрирование на сайте. + +## 1. Размеры и назначение + +| Изображение | Рабочий мастер | Файл для сайта | Файл в dist/images | +|---|---|---|---| +| Главный сериал — большой баннер | 2400 × 1600, 3:2 | 1920 × 1280 | HOME.webp | +| Универсальная иллюстрация сериала: главная, каталог и личная карточка | 2400 × 1600, 3:2 | 1920 × 1280 | Имя сериала, например LAST_PORT.webp | + +Мастер хранится отдельно от опубликованного файла, желательно со слоями. Если генератор выдаёт качественные 1536 × 1024 px, можно использовать этот размер: он также имеет пропорции 3:2. Увеличение маленькой картинки само по себе не добавляет деталей. + +Одна и та же иллюстрация может использоваться и для HOME, и для обложки главного сериала, если композиция проходит обе проверки. В таком случае её сохраняют под двумя именами. Обложки обычных сериалов уже используются повторно без копирования. + +## 2. Почему универсальная обложка должна иметь центральную композицию + +Сайт использует `object-fit: cover`: изображение заполняет блок целиком с сохранением пропорций, а лишние части обрезаются. Механизм описан в [MDN: object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/object-fit). + +Текущие примеры видимой области: + +| Место | Пример размера области, px | Что происходит | +|---|---:|---| +| «Сериалы MANGABOM», обычный компьютер | ≈ 318 × 136 | Обрезается верх и низ | +| «Сериалы MANGABOM», широкое невысокое окно | ≈ 427 × 99 | Очень узкая горизонтальная полоса | +| «Сериалы MANGABOM», телефон | ≈ 169 × 140 | Кадр становится почти квадратным | +| Каталог, компьютер | ≈ 293 × 185 | Умеренная горизонтальная обрезка | +| Каталог, узкий телефон | ≈ 131 × 145 | Обрезаются боковые части | +| Страница сериала, компьютер | ≈ 298 × 368 | Вертикальная карточка | +| Страница сериала, промежуточная ширина | ≈ 248 × 368 | Самая узкая из проверенных карточек | +| Страница сериала, телефон | ≈ 345 × 253 | Снова горизонтальная карточка | + +Поэтому в исходнике нужен один главный визуальный центр. Полный рост персонажа или сюжетная сцена могут быть частью иллюстрации, но узнавание сериала должно сохраняться по центральному лицу/объекту. + +## 3. Безопасные зоны универсальной обложки + +Координаты считаются от верхнего левого угла исходника. X — слева направо, Y — сверху вниз. + +| Зона | Проценты исходника | Для мастера 2400 × 1600 px | Что размещать | +|---|---|---|---| +| Критическое ядро | X: 32–68%; Y: 24–44% | X: 768–1632; Y: 384–704 | Лицо, взгляд, ключевой сюжетный объект | +| Композиционный буфер | X: 30–70%; Y: 22–50% | X: 720–1680; Y: 352–800 | Основной силуэт головы, ближние важные детали | +| Ориентир взгляда | X: 50%; Y: 32% | Точка 1200, 512 | Центр внимания | +| Остальная площадь | Весь оставшийся холст | — | Окружение, плечи, одежда, свет, дополнительные персонажи | + +Для экспортного файла 1920 × 1280 критическое ядро: X = 614–1306 px, Y = 307–563 px. Проценты остаются теми же при любом размере 3:2. + +Расчёт по проверенным окнам даёт общую геометрически видимую область около X = 28,5–71,5%, Y = 20,3–53,6%. Рабочие зоны выше сделаны уже этой области, чтобы добавить запас для композиции. Они рассчитаны для текущего заполнения блоков и обычного масштаба 1,045. Заголовки и декоративные наложения требуют отдельной визуальной проверки. + +**Схема:** [SERIES_SAFE_ZONES.svg](SERIES_SAFE_ZONES.svg). + +### Как строить сцену + +- Выбирай одного главного героя или компактную центральную группу из двух персонажей. +- Держи глаза, выражение лица и предмет, по которому узнаётся история, в критическом ядре. +- Не размещай двух равнозначных героев у противоположных краёв: вертикальная карточка срежет их. +- Оставляй вокруг героя среду: небо, интерьер, улицу, стадион, растения. Она должна естественно продолжаться до всех краёв. +- Плечи, руки, волосы, декор и второстепенные персонажи могут выходить за зелёную зону, если их частичная потеря не разрушает смысл. +- На миниатюре лицо должно узнаваться даже при размере около 170 × 140 px. Избегай мелких деталей, от которых зависит понимание сцены. +- Нижняя левая часть миниатюры занята названием сериала. Внизу каталожной картинки также может быть жанровый бейдж. Не помещай туда второй важный смысловой центр. + +## 4. Особенности большого баннера HOME + +Для HOME действует тот же формат 3:2. Главный герой в исходнике должен оставаться около центра, а не прижиматься к правой границе. Сайт сам размещает слой изображения правее текста. + +В текущей версии область изображения меняется примерно от 904 × 253 px на широком экране до 314 × 410 px на планшете и 347 × 300 px на телефоне. Именно поэтому готовый очень широкий баннер с героем у края будет неудобен для адаптации. + +Композиция HOME: + +1. Ориентир взгляда — около X = 50–55%, Y = 30–34% исходника. +2. Левая четверть — спокойное продолжение окружения, подходящее для плавного растворения под текстом. +3. Средняя и правая части могут быть детальнее, но лицо остаётся внутри центральной безопасной области. +4. В верхней правой части не должно быть единственной важной детали: на телефоне поверх неё может оказаться бейдж «Главный сериал». +5. Не рисуй левую белую/чёрную плашку, готовый градиент или искусственное размытие на стыке. Сайт добавляет переход и размытую подложку сам и адаптирует их к светлой и тёмной теме. +6. Изображение должно быть цельной сценой до самого края, без прозрачных полей. + +**Схема:** [HOME_COMPOSITION.svg](HOME_COMPOSITION.svg). Зоны HOME являются композиционными рекомендациями: фактическое растворение на странице задаётся масками и градиентами, а не прямоугольной обрезкой. + +## 5. Что не встраивать в рисунок + +Название сериала, MANGABOM, «Главный сериал», номер главы, жанр, кнопки, цены и подписи уже рисуются интерфейсом. В самой иллюстрации их быть не должно. + +Также не нужны рамка, закругления, падающая тень, водяной знак, коллаж с видимыми швами и размытые поля по краям. Геометрию и эффекты накладывает сайт. Фон должен работать рядом и с кремовым, и с тёмным оформлением. + +## 6. Экспорт + +| Параметр | Рабочее правило проекта | +|---|---| +| Размер | 1920 × 1280 px; мастер 2400 × 1600 px сохраняется отдельно | +| Цвет | RGB, sRGB, 8 бит на канал | +| Основной формат | WebP | +| Стартовое качество | 84; рабочий диапазон примерно 80–88 с проверкой деталей | +| Целевой вес обложки | Около 150–450 КБ | +| Целевой вес HOME | Около 250–700 КБ | +| Прозрачность | Обычно не нужна: предпочтительна цельная сцена | +| Имена | Английские ЗАГЛАВНЫЕ буквы, цифры и нижние подчёркивания | + +Вес и качество выше — бюджет для этого проекта, а не жёсткий предел. Если портятся глаза, контуры, мелкий рисунок или градиенты, сначала сохраняй качество изображения, затем оптимизируй вес. У WebP есть режимы с потерями и без потерь: [официальное описание формата](https://developers.google.com/speed/webp). + +Для проверки рассматривай файл при 100%: на лице и контрастных линиях не должно быть заметных блоков, ореолов и цветной грязи. DPI для отображения на сайте не определяет размер картинки — важны размеры в пикселях. + +PNG, JPG, JPEG и AVIF тоже поддерживаются. При наличии нескольких форматов одного имени сайт выбирает WebP, затем PNG, JPG, JPEG, AVIF. Если переходишь на другой формат, убери предыдущую версию того же имени. + +## 7. Имена файлов и размещение + +Все эти файлы лежат в `Z:\MangaBom\dist\images\`: + +| Имя | Использование | +|---|---| +| HOME.webp | Большой баннер главного сериала | +| LORD_OF_CHEAP_LUNCH.webp | Повелитель дешёвого обеда | +| LAST_PORT.webp | Нулевой причал | +| LAST_VERANDA.webp | Последняя веранда | +| DREAM_REALTOR.webp | Риелтор грёз | +| SECOND_TOUCH.webp | Второе касание | +| WHILE_THE_HOUSE_IS_WARM.webp | Пока в доме тепло | +| DRY_SIDE.webp | Сухая сторона | +| BAR_BAR.webp | БАР-БАР | + +Для сериала нужен один файл: например LAST_PORT.webp сразу обновляет его миниатюру на главной, карточку каталога и изображение на странице сериала. HTML и JSON не редактируются. + +После замены обнови страницу браузера. Если осталась старая версия — Ctrl+F5. При удалении файла сайт возвращает текстовую обложку. SVG-схемы из этой папки документации — рабочие направляющие; финальную иллюстрацию нужно экспортировать в один из поддерживаемых растровых форматов. + +## 8. Готовые формулировки задания + +### Универсальная иллюстрация сериала + +> Оригинальная иллюстрация для манга-сериала [название и жанр], горизонтальный холст 3:2. Главный герой [описание] показан средним планом в [окружение]. Центральная композиция: лицо и [ключевой предмет] находятся в пределах 32–68% ширины и 24–44% высоты, взгляд примерно на точке 50% ширины и 32% высоты. Герой узнаваем по силуэту, выражению лица и цветовой палитре. Вокруг — полноценное пространство, продолжающееся до краёв. Картинка должна сохранять смысл после обрезки в широкую горизонтальную миниатюру и узкую вертикальную карточку. Чёткое лицо, выразительные крупные формы, чистые контуры. Без надписей, логотипов, плашек, рамок и водяных знаков. + +### Иллюстрация большого баннера + +> Иллюстрация главного сериала MANGABOM, горизонтальный холст 3:2. [Герой и действие] в [окружение]. Главный визуальный центр около середины исходника, взгляд в верхней трети. Слева — спокойное продолжение среды, справа — более выразительные детали мира. Не прижимать лицо к краям. Изображение должно выдерживать почти вертикальную обрезку на планшете. Цельная сцена без пустой плашки и готового градиента; переход под текст будет добавлен интерфейсом. Без надписей, кнопок, рамок и водяных знаков. + +Слова и числовые зоны в задании — ориентиры для композиции. Генератор может их не соблюсти точно: результат нужно проверить по направляющим и реальным кадрам. + +## 9. Приёмка одного изображения + +- [ ] Исходник имеет пропорции 3:2; лицо и ключевой объект находятся в критическом ядре. +- [ ] В широкой миниатюре узнаётся история, название не закрывает глаза. +- [ ] В вертикальной карточке лицо не срезано по бокам; не теряется ключевой предмет. +- [ ] На телефоне изображение остаётся понятным при небольшом размере. +- [ ] Для HOME проверены компьютер, планшет и телефон, в том числе бейдж сверху. +- [ ] Изображение проверено до наведения и при наведении: в обычном состоянии масштаб немного больше, поэтому кадр теснее. +- [ ] Нет встроенного текста, искусственной панели, рамок и водяных знаков. +- [ ] Цвета и читаемость проверены в светлой и тёмной теме. +- [ ] Файл назван правильно; старый вариант в другом расширении убран. + +Практический набор экранов для проверки: 320 × 760, 390 × 844, 768 × 1024, 1024 × 768, 1366 × 768 и 1920 × 650. Окончательная проверка выполняется на самом сайте. + +## 10. Для разработчика и дизайнера + +Текущая вертикальная привязка: галерея — `50% 30%`, каталог — `50% 20%`, страница сериала — `50% 50%` на компьютере и `50% 26%` на телефоне. Проценты `object-position` распределяют положение картинки внутри области; это отдельный механизм от координат лица в исходном холсте: [MDN: object-position](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/object-position). + +Обычный масштаб — 1,045; при наведении на блок он уменьшается до 1. Направляющие рассчитаны по более тесному обычному состоянию. Расчёт предполагает масштабирование вокруг центра и касается геометрической видимости; текстовые наложения и мягкие маски дополнительно проверяются глазами. + +Исходные замеры: [slot-measurements.json](slot-measurements.json). Расчёт обрезки: [crop-measurements.json](crop-measurements.json). Скрипт пересчёта: `node scripts/calculate-image-spec.cjs` (после обновления замеров). При изменении пропорций блоков, привязки изображения или масштаба эту карту нужно пересчитать. Иллюстрации и вёрстка сайта при составлении карты не менялись. \ No newline at end of file diff --git a/docs/image-spec/crop-measurements.json b/docs/image-spec/crop-measurements.json new file mode 100644 index 0000000..f83ce55 --- /dev/null +++ b/docs/image-spec/crop-measurements.json @@ -0,0 +1,154 @@ +{ + "master": { + "width": 2400, + "height": 1600 + }, + "intersection": { + "left": 28.503571180916715, + "right": 71.49642881908328, + "top": 20.3079029951929, + "bottom": 53.61407826944411 + }, + "crops": [ + { + "case": "spec-home-wide", + "type": "gallery", + "width": 427, + "height": 99.0781, + "objectPosition": "50% 30%", + "transform": "matrix(1.045, 0, 0, 1.045, 0, 0)", + "crop": { + "left": 2.1531100478468845, + "right": 97.8468899521531, + "top": 20.3079029951929, + "bottom": 53.61407826944411 + } + }, + { + "case": "spec-home-desktop", + "type": "gallery", + "width": 317.938, + "height": 135.719, + "objectPosition": "50% 30%", + "transform": "matrix(1.045, 0, 0, 1.045, 0, 0)", + "crop": { + "left": 2.1531100478468845, + "right": 97.8468899521531, + "top": 12.169391245700725, + "bottom": 73.44296084810374 + } + }, + { + "case": "spec-home-tablet", + "type": "gallery", + "width": 354.5, + "height": 180, + "objectPosition": "50% 30%", + "transform": "matrix(1.045, 0, 0, 1.045, 0, 0)", + "crop": { + "left": 2.1531100478468845, + "right": 97.84688995215312, + "top": 8.790803139403831, + "bottom": 81.67464114832536 + } + }, + { + "case": "spec-home-mobile", + "type": "gallery", + "width": 168.5, + "height": 140, + "objectPosition": "50% 30%", + "transform": "matrix(1.045, 0, 0, 1.045, 0, 0)", + "crop": { + "left": 11.608566871724761, + "right": 88.39143312827525, + "top": 2.1531100478468845, + "bottom": 97.84688995215312 + } + }, + { + "case": "spec-catalog-wide", + "type": "catalog", + "width": 293, + "height": 185, + "objectPosition": "50% 20%", + "transform": "matrix(1.045, 0, 0, 1.045, 0, 0)", + "crop": { + "left": 2.1531100478468845, + "right": 97.8468899521531, + "top": 3.097228799581948, + "bottom": 93.72870976697095 + } + }, + { + "case": "spec-catalog-mobile", + "type": "catalog", + "width": 130.5, + "height": 145, + "objectPosition": "50% 20%", + "transform": "matrix(1.045, 0, 0, 1.045, 0, 0)", + "crop": { + "left": 21.291866028708135, + "right": 78.70813397129187, + "top": 2.1531100478468845, + "bottom": 97.84688995215312 + } + }, + { + "case": "spec-series-desktop", + "type": "series", + "width": 298, + "height": 368, + "objectPosition": "50% 50%", + "transform": "matrix(1.045, 0, 0, 1.045, 0, 0)", + "crop": { + "left": 24.16961375771444, + "right": 75.83038624228556, + "top": 2.1531100478468845, + "bottom": 97.8468899521531 + } + }, + { + "case": "spec-series-narrow", + "type": "series", + "width": 248, + "height": 368, + "objectPosition": "50% 50%", + "transform": "matrix(1.045, 0, 0, 1.045, 0, 0)", + "crop": { + "left": 28.503571180916715, + "right": 71.49642881908328, + "top": 2.1531100478468845, + "bottom": 97.8468899521531 + } + }, + { + "case": "spec-series-tablet", + "type": "series", + "width": 218, + "height": 308, + "objectPosition": "50% 50%", + "transform": "matrix(1.045, 0, 0, 1.045, 0, 0)", + "crop": { + "left": 27.42289608318316, + "right": 72.57710391681684, + "top": 2.1531100478468845, + "bottom": 97.84688995215312 + } + }, + { + "case": "spec-series-mobile", + "type": "series", + "width": 345, + "height": 253, + "objectPosition": "50% 26%", + "transform": "matrix(1.045, 0, 0, 1.045, 0, 0)", + "crop": { + "left": 6.502827316224432, + "right": 93.49717268377556, + "top": 2.153110047846882, + "bottom": 97.84688995215312 + } + } + ] +} \ No newline at end of file diff --git a/docs/image-spec/slot-measurements.json b/docs/image-spec/slot-measurements.json new file mode 100644 index 0000000..f39f24a --- /dev/null +++ b/docs/image-spec/slot-measurements.json @@ -0,0 +1,150 @@ +[ + { + "case": "spec-home-wide", + "slots": [ + { + "type": "home", + "width": 903.625, + "height": 252.781, + "objectPosition": "50% 30%", + "transform": "matrix(1.045, 0, 0, 1.045, 0, 0)" + }, + { + "type": "gallery", + "width": 427, + "height": 99.0781, + "objectPosition": "50% 30%", + "transform": "matrix(1.045, 0, 0, 1.045, 0, 0)" + } + ] + }, + { + "case": "spec-home-desktop", + "slots": [ + { + "type": "home", + "width": 675.766, + "height": 302.719, + "objectPosition": "50% 30%", + "transform": "matrix(1.045, 0, 0, 1.045, 0, 0)" + }, + { + "type": "gallery", + "width": 317.938, + "height": 135.719, + "objectPosition": "50% 30%", + "transform": "matrix(1.045, 0, 0, 1.045, 0, 0)" + } + ] + }, + { + "case": "spec-home-tablet", + "slots": [ + { + "type": "home", + "width": 314.094, + "height": 410, + "objectPosition": "50% 30%", + "transform": "matrix(1.045, 0, 0, 1.045, 0, 0)" + }, + { + "type": "gallery", + "width": 354.5, + "height": 180, + "objectPosition": "50% 30%", + "transform": "matrix(1.045, 0, 0, 1.045, 0, 0)" + } + ] + }, + { + "case": "spec-home-mobile", + "slots": [ + { + "type": "home", + "width": 347, + "height": 300, + "objectPosition": "50% 26%", + "transform": "matrix(1.045, 0, 0, 1.045, 0, 0)" + }, + { + "type": "gallery", + "width": 168.5, + "height": 140, + "objectPosition": "50% 30%", + "transform": "matrix(1.045, 0, 0, 1.045, 0, 0)" + } + ] + }, + { + "case": "spec-catalog-wide", + "slots": [ + { + "type": "catalog", + "width": 293, + "height": 185, + "objectPosition": "50% 20%", + "transform": "matrix(1.045, 0, 0, 1.045, 0, 0)" + } + ] + }, + { + "case": "spec-catalog-mobile", + "slots": [ + { + "type": "catalog", + "width": 130.5, + "height": 145, + "objectPosition": "50% 20%", + "transform": "matrix(1.045, 0, 0, 1.045, 0, 0)" + } + ] + }, + { + "case": "spec-series-desktop", + "slots": [ + { + "type": "series", + "width": 298, + "height": 368, + "objectPosition": "50% 50%", + "transform": "matrix(1.045, 0, 0, 1.045, 0, 0)" + } + ] + }, + { + "case": "spec-series-narrow", + "slots": [ + { + "type": "series", + "width": 248, + "height": 368, + "objectPosition": "50% 50%", + "transform": "matrix(1.045, 0, 0, 1.045, 0, 0)" + } + ] + }, + { + "case": "spec-series-tablet", + "slots": [ + { + "type": "series", + "width": 218, + "height": 308, + "objectPosition": "50% 50%", + "transform": "matrix(1.045, 0, 0, 1.045, 0, 0)" + } + ] + }, + { + "case": "spec-series-mobile", + "slots": [ + { + "type": "series", + "width": 345, + "height": 253, + "objectPosition": "50% 26%", + "transform": "matrix(1.045, 0, 0, 1.045, 0, 0)" + } + ] + } +] \ No newline at end of file diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 0000000..794d70b --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1 @@ +lxml==6.1.1 diff --git a/scripts/build-pages.py b/scripts/build-pages.py new file mode 100644 index 0000000..2b63ba0 --- /dev/null +++ b/scripts/build-pages.py @@ -0,0 +1,100 @@ +from pathlib import Path +from copy import deepcopy +from lxml import html, etree + +root = Path(__file__).resolve().parents[1] +dist = root / 'dist' +doc = html.parse(str(root / 'scripts' / 'home-template.html')) + +def one(xpath): return doc.xpath(xpath)[0] +def cls(name): return f'//*[contains(concat(" ",normalize-space(@class)," ")," {name} ")]' +def link(node, href): + node.tag = 'a'; node.attrib.pop('type',None); node.attrib.pop('aria-pressed',None); node.set('href',href) + return node + +def text(node, tag='span'): + node.tag=tag + for key in ['type','aria-pressed','aria-label']:node.attrib.pop(key,None) + return node + +# Descriptive copy is content, not a control. +for name in ['badge','hero-name','chapter-title','hero-description','vote-copy','footer-description']: + for node in doc.xpath(cls(name)):text(node,'p' if name in ['hero-description','footer-description','vote-copy'] else 'span') +for node in doc.xpath(cls('footer-bottom')+'//button'):text(node) +for node in doc.xpath(cls('footer-group')+'/h2/button'):text(node) +for node in doc.xpath(cls('wordmark')):link(node,'index.html') +for node,href in zip(doc.xpath(cls('nav-item')),['index.html','serials.html','issues.html','news.html']): + link(node,href) + if 'active' in node.get('class',''):node.set('aria-current','page') +for name,href in [('support','support.html'),('read-button','reader.html'),('cover-button','issue-001.html'),('issue-meta','issue-001.html'),('issue-button','issue-001.html'),('ribbon','serials.html'),('vote-button','vote.html')]: + for node in doc.xpath(cls(name)):link(node,href) +link(one('//*[@id="issue-title"]/button'),'issues.html') +link(one('//*[@id="schedule-title"]/button'),'schedule.html') +link(one('//*[@id="vote-title"]/button'),'vote.html') +for node in doc.xpath(cls('chapter-list')+'//button'):link(node,'schedule.html') +footer_routes=['about.html','editorial.html','contact.html','reading-guide.html','subscription.html','faq.html','terms.html','privacy.html','copyright.html'] +for node,href in zip(doc.xpath(cls('footer-group')+'/button'),footer_routes):link(node,href) +header=one(cls('header')) +support=one(cls('support')) +group=html.Element('div',{'class':'header-actions'}) +header.replace(support,group) +group.append(html.fragment_fromstring('Войти')) +group.append(support) + +def save(tree,path): + path.write_bytes(html.tostring(tree,encoding='utf-8',method='html',pretty_print=True,doctype='')) +save(doc,dist/'index.html') + +pages = { + 'login':('Вход в MANGABOM','Личный кабинет','Вход в журнал','Здесь появится авторизация и доступ к личному кабинету читателя.','Вход пока не подключён. Вводить данные не нужно.'), + 'support':('Поддержать MANGABOM','Поддержка журнала','История продолжается','Здесь появятся способы поддержать журнал MANGABOM.','Приём платежей пока не подключён.'), + 'serials':('Сериалы MANGABOM','Каталог','Найди свою историю','Здесь появится полный каталог сериалов журнала.','Каталог готовится к открытию.'), + 'issues':('Выпуски журнала','Архив MANGABOM','Все истории под одной обложкой','Здесь появится архив выпусков журнала MANGABOM.','Архив выпусков готовится.'), + 'news':('Новости','Жизнь журнала','Всё самое свежее','Здесь появятся новости журнала, анонсы и редакционные заметки.','Первые публикации скоро появятся.'), + 'issue-001':('Выпуск №001','Январь 2026','Один выпуск. Много историй.','Здесь появятся содержание первого выпуска и переход к чтению.','Выпуск пока недоступен для чтения.'), + 'reader':('Читать главу','Повелитель дешёвого обеда','Глава 08 — Новый конкурент','Здесь появится читалка главы.','Страницы манги пока не добавлены.'), + 'schedule':('Ближайшие главы','Расписание','Не пропусти продолжение','Здесь появится календарь выхода новых глав.','Полное расписание готовится.'), + 'vote':('Голосование читателей','Твой голос','Какую историю продолжим?','Здесь можно будет выбрать серию, которую стоит развивать в первую очередь.','Голосование пока не открыто.'), + 'about':('О проекте','MANGABOM','Журнал новых историй','Здесь появится подробный рассказ о журнале и его идее.','Раздел готовится.'), + 'editorial':('Редакция','За страницами журнала','Кто делает MANGABOM','Здесь появится информация о редакции и работе над журналом.','Информация готовится.'), + 'contact':('Обратная связь','На связи','Напиши в редакцию','Здесь появятся контакты и форма обратной связи.','Отправка сообщений пока недоступна.'), + 'reading-guide':('Как читать мангу','Справочник читателя','Начни с правильной стороны','Здесь появится руководство по чтению манги и использованию читалки.','Руководство готовится.'), + 'subscription':('Подписка и поддержка','Для читателей','Больше любимых историй','Здесь появится информация о подписке и способах поддержки журнала.','Оформление подписки пока недоступно.'), + 'faq':('Вопросы и ответы','Помощь','Всё по порядку','Здесь появятся ответы на вопросы о чтении, выпусках и личном кабинете.','Справочный раздел готовится.'), + 'terms':('Условия использования','Документы','Правила пользования журналом','Здесь будут опубликованы условия использования сайта.','Текст документа пока не опубликован.'), + 'privacy':('Конфиденциальность','Документы','О персональных данных','Здесь будет опубликована политика конфиденциальности.','Текст документа пока не опубликован.'), + 'copyright':('Авторские права','Документы','Об историях и иллюстрациях','Здесь появится информация об авторских правах и использовании материалов журнала.','Информация готовится.'), +} +for slug,(title,kicker,heading,description,status) in pages.items(): + page=deepcopy(doc) + page.find('.//title').text=title+' — MANGABOM' + page.xpath('//meta[@name="description"]')[0].set('content',description) + screen=page.xpath(cls('screen'))[0] + screen.set('class','screen inner-screen') + main=page.xpath('//main')[0] + main.clear();main.set('class','placeholder-main') + for node in page.xpath(cls('nav-item')): + node.set('class','nav-item');node.attrib.pop('aria-current',None) + section={'serials':'serials','issues':'issues','issue-001':'issues','news':'news'}.get(slug) + if section and node.get('href')==section+'.html':node.set('class','nav-item active');node.set('aria-current','page') + if slug=='login':page.xpath(cls('auth-button'))[0].set('aria-current','page') + content=html.fragment_fromstring('''
+ +
+ + +
MANGABOMНовая страница журнала
''') + content.xpath('.//*[@class="breadcrumb-current"]')[0].text=title + content.xpath('.//*[@class="page-kicker"]')[0].text=kicker + content.xpath('.//*[@id="page-title"]')[0].text=heading if slug!='login' else 'Войти в MANGABOM' + content.xpath('.//*[@class="page-description"]')[0].text=description + content.xpath('.//*[@class="page-status"]/span')[1].text=status + if slug=='login': + card=content.xpath('.//*[@class="placeholder-card"]')[0];card.set('class','placeholder-card login-card') + content.xpath('.//*[@class="art-number"]')[0].text='ID' + content.xpath('.//*[@class="art-caption"]')[0].text='ТВОЯ ПОЛКА ИСТОРИЙ' + help_link=html.fragment_fromstring('Помощь со входом ') + content.xpath('.//*[@class="placeholder-copy"]')[0].append(help_link) + main.append(content) + save(page,dist/(slug+'.html')) +print('Created',len(pages),'placeholder pages') diff --git a/scripts/build-product.py b/scripts/build-product.py new file mode 100644 index 0000000..5b20c40 --- /dev/null +++ b/scripts/build-product.py @@ -0,0 +1,122 @@ +from pathlib import Path +from copy import deepcopy +from lxml import html, etree +from html import escape as E +import json +ROOT=Path(__file__).resolve().parents[1];D=ROOT/'dist' +base=html.parse(str(ROOT/'scripts'/'product-home-template.html')) +shared_header=html.fragment_fromstring((ROOT/'scripts'/'partials'/'header.html').read_text(encoding='utf-8')) +old_header=base.xpath('//header[contains(concat(" ",normalize-space(@class)," ")," site-header " )]')[0] +old_header.getparent().replace(old_header,shared_header) +def has(c):return f'//*[contains(concat(" ",normalize-space(@class)," ")," {c} ")]' +def save(d,name): (D/name).write_bytes(html.tostring(d,encoding='utf-8',pretty_print=True,doctype='')) +series=[ + dict(id='food',title='Повелитель дешёвого обеда',genre='Фэнтези',tag='Кулинария',color='#c73328',desc='Фэнтези о еде, соперничестве и находчивости. Главный сериал первого выпуска MANGABOM.',chars='Рэн Астер · Лилия · Борин',chapters=2), + dict(id='port',title='Нулевой причал',genre='Приключения',tag='Стимпанк',color='#316982',desc='Стимпанк-приключение в мире причалов и механизмов. Одна из историй первого выпуска журнала.',chars='Мира · Таль · Альден · Лив · Йорн',chapters=2), + dict(id='veranda',title='Последняя веранда',genre='Фантастика',tag='Тайна',color='#a75c80',desc='Научная фантастика с атмосферой тайны. История Ники и Марка в журнале MANGABOM.',chars='Ника · Марк · Арсений Гранов · Валентина',chapters=2), + dict(id='realtor',title='Риелтор грёз',genre='Фэнтези',tag='Уютный исекай',color='#777895',desc='Уютное фэнтези о риелторе Артёме и необычных обитателях другого мира.',chars='Артём · Лира · Борук · Мими · граф Нокт',chapters=1), + dict(id='volley',title='Второе касание',genre='Спорт',tag='Волейбол',color='#dc8d44',desc='Спортивная манга о волейболе, команде и следующем касании мяча.',chars='Ася · Лиза · Полина · Рита · Вера · Кира',chapters=1), + dict(id='warm',title='Пока в доме тепло',genre='Драма',tag='Фурри',color='#ad6f41',desc='Фурри-драма о спасении и тепле дома. В первом выпуске представлены две главы истории.',chars='Мирон · Тая · Лада · Северин · Арсений',chapters=2), + dict(id='dry',title='Сухая сторона',genre='Триллер',tag='Романтика',color='#49737a',desc='Романтический триллер. По другую сторону ворот кто-то ждёт ответа.',chars='Ася Ветрова · Лев · Тая · Нина · Виктор',chapters=2), + dict(id='bar',title='БАР-БАР',genre='Комедия',tag='Фурри',color='#737e40',desc='Доисторическая фурри-комедия. Бур, Шуша и их компания — в первом выпуске MANGABOM.',chars='Бур · Шуша · Клык · Мох · Рога',chapters=1), +] +S={s['id']:s for s in series} +IMAGE_NAMES={"food":"LORD_OF_CHEAP_LUNCH","port":"LAST_PORT","veranda":"LAST_VERANDA","realtor":"DREAM_REALTOR","volley":"SECOND_TOUCH","warm":"WHILE_THE_HOUSE_IS_WARM","dry":"DRY_SIDE","bar":"BAR_BAR"} +def visual(s,cls='poster-art'): + name=IMAGE_NAMES[s['id']] + return f'
{E(s[
' + +def card(s):return f'''''' +def heading(title,sub='',kicker='MANGABOM'): + return f'
{kicker}

{title}

{"

"+sub+"

" if sub else ""}
' +def notice(t):return f'

{t}

' +def btn(t,href,red=True):return f'{t}' +def page(slug,title,content,active=None): + doc=deepcopy(base);doc.find('.//title').text=title+' — MANGABOM' + for node in doc.xpath(has('nav-item')): + node.set('class','nav-item');node.attrib.pop('aria-current',None) + if active and node.get('href')==active+'.html':node.set('class','nav-item active');node.set('aria-current','page') + screen=doc.xpath(has('screen'))[0];screen.set('class','screen product-screen') + main=doc.xpath('//main')[0];main.clear();main.set('class','product-main');main.set('id','main') + wrap=html.fragment_fromstring(f'
{content}
') + if slug=='support': + for crumb in wrap.xpath('./nav[@class="breadcrumbs"]'):wrap.remove(crumb) + wrap.set('class','product-wrap support-wrap') + main.append(wrap) + if slug in ['login','account']:doc.xpath(has('auth-button'))[0].set('aria-current','page') + if slug=='support': + head=doc.find('.//head') + etree.SubElement(head,'link',rel='stylesheet',href='support.css') + script=etree.SubElement(head,'script',src='support.js');script.set('defer','defer') + save(doc,slug+'.html') +# Home: replace the fourth card, retain the first three destinations. +cards=base.xpath(has('series-card')) +for node,sid in zip(cards[:3],['port','veranda','realtor']): + node.xpath('.//a[@class="series-card-link"]')[0].set('href',f'series-{sid}.html') +last=cards[3];new=html.fragment_fromstring('Ещё 4 сериала
в каталоге
');last.getparent().replace(last,new) +for a in base.xpath(has('read-button')):a.set('href','reader.html?series=food&chapter=chapter-001') +for a in base.xpath('//a[@href="reader.html"]'):a.set('href','reader.html?series=food&chapter=chapter-001') +for node in base.xpath(has('calendar-icon')): + node.clear();node.set('class','calendar-icon');node.set('aria-hidden','true') + for i in range(6):etree.SubElement(node,'i') +save(base,'index.html') +# Use the amended home for shared navigation/footer. +(D/'series-data.json').write_text(json.dumps([{k:s[k] for k in ['id','title','genre']} for s in series],ensure_ascii=False),encoding='utf-8') +# Catalog +filters='
8 сериалов
' +page('serials','Каталог сериалов',heading('Твоя следующая история','Восемь оригинальных сериалов. Выбирай жанр, открывай знакомство и сохраняй любимое.','Каталог')+filters+'
'+''.join(card(s) for s in series)+'
','serials') +# Series pages; library.js refreshes the chapter list from manga/library.json. +for s in series: + chapters=''.join(f'
  • Выпуск №001

    Глава {i:02}

    СкороОткрыть
  • ' for i in range(1,s['chapters']+1)) + body=f'''
    {visual(s)}
    {s['genre']} · {s['tag']}

    {s['title']}

    {s['desc']}

    Оригинальный сериал{s['chapters']} главы в №001Справа налево

    Список хранится в этом браузере.

    Знакомые лица

    {s['chars']}

    {notice('Читай постранично или вертикальной лентой. Главы открываются по мере публикации страниц.')}
      {chapters}
    ''' + page('series-'+s['id'],s['title'],body,'serials') +# Archive and issue +page('issues','Выпуски журнала',heading('Под одной обложкой','Архив MANGABOM: содержание, сериалы и главы каждого выпуска.','Выпуски')+f'''
    Обложка выпуска №001
    ЯНВАРЬ 2026 · ПЕРВЫЙ ВЫПУСК

    Номер один.
    Восемь начал.

    Восемь сериалов, тринадцать глав и знакомство с миром MANGABOM.

    08 сериалов13 глав01 выпуск
    {btn('Содержание выпуска →','issue-001.html')}
    ''','issues') +contents=''.join(f'{i:02}{s["title"]}{s["genre"]} · {s["tag"]}{s["chapters"]} гл.' for i,s in enumerate(series,1)) +page('issue-001','Выпуск №001',heading('Выпуск №001','Январь 2026 · 8 сериалов · 13 глав','Свежий номер')+'

    Содержание

    '+contents+'
    ','issues') +# Schedule calendar fixed January 2026, identical to reference content. +events=[('20','port','Глава 15'),('22','food','Глава 09'),('24','volley','Глава 06')] +days=''.join('' for _ in range(3)) +for i in range(1,32): + if str(i) in ['20','22','24']:days+=f'' + else:days+=f'{i}' +eventhtml=''.join(f'' for day,sid,chapter in events) +page('schedule','Расписание глав',heading('Продолжение следует','Расписание из первого выпуска. Выбери отмеченный день, чтобы увидеть анонс.','Календарь')+f'

    Январь 2026

    '+''.join(f'{d}' for d in ['ПН','ВТ','СР','ЧТ','ПТ','СБ','ВС'])+f'
    {days}

    Выход новой главы

    {eventhtml}
    ') +# Voting +choices=''.join(f'' for s in series) +page('vote','Голосование читателей',heading('Выбираешь ты','Какую серию развивать в первую очередь? Выбери одну историю.','Голос читателей')+f'
    {choices}

    ') +# Demo sign-in and account. +page('login','Войти в MANGABOM',heading('Твоя полка историй','Избранные сериалы, настройки чтения и быстрый доступ к любимому.','Личный кабинет')+'''''') +page('account','Личный кабинет',heading('Привет, читатель!','Твоя личная полка MANGABOM.','Демо-кабинет')+'''

    Настройки

    Настройки и избранное сохраняются на этом устройстве. Синхронизация между устройствами пока не подключена.

    ''') +# One canonical support page; old links keep working. +page('support','Поддержать MANGABOM',(ROOT/'scripts'/'support-content.html').read_text(encoding='utf-8')) +(D/'subscription.html').write_text("Подписка и поддержка MANGABOM

    Перейти к подписке и поддержке MANGABOM

    ",encoding='utf-8') +# News and full articles. +articles=[('digital','Новый формат','MANGABOM переходит в цифру','Веб-журнал открывает больше возможностей для распространения историй и выпуска переводов.', [('От печатного выпуска к сайту','MANGABOM начинался как домашний печатный журнал. Следующий шаг — цифровая площадка для чтения оригинальных сериалов.'),('Одна история — больше читателей','Цифровой формат упрощает распространение и позволяет готовить версии историй на разных языках.'),('Что появится дальше','Каталог и читалка уже собраны. Главы можно читать постранично или вертикальной лентой по мере публикации страниц.')]),('reading','Читателям','Манга читается справа налево','Короткое знакомство с порядком страниц и кадров.', [('Начни с правой стороны','В традиционной манге страницы и кадры читают справа налево. Внутри страницы двигайся от верхнего ряда к нижнему.'),('Следи за кадрами','Сначала прочитай правый кадр в ряду, затем переходи к левому. Реплики обычно следуют тому же порядку.'),('Не торопись','Рассматривай рисунки и паузы между репликами. Руководство по чтению доступно в справочном разделе.')])] +news=''.join(f'' for i,a in enumerate(articles,1)) +page('news','Новости журнала',heading('За страницами MANGABOM','Заметки редакции о формате, историях и чтении.','Новости')+'
    '+news+'
    ','news') +for slug,kicker,title,intro,parts in articles: + page('news-'+slug,title,heading(title,intro,kicker)+'','news') +# Editorial/information pages with concrete content rather than holding messages. +page('about','О журнале',heading('Восемь историй.
    Один MANGABOM.','Независимый журнал оригинальных манга-сериалов, создаваемых с использованием ИИ.','О проекте')+'''

    Что здесь читать

    Фэнтези, фантастику, драму, спортивные истории и комедию. В первом выпуске собраны восемь сериалов с разными характерами и настроениями.

    Как устроен журнал

    Выпуск объединяет главы разных историй под одной обложкой. Каталог помогает найти сериал по жанру, а календарь — увидеть анонсы продолжений.

    Как создаются истории

    В работе используются инструменты генеративного ИИ. Сценарий, последовательность кадров и редакторская сборка определяют, как история читается в журнале.

    ''') +page('editorial','Редакция',heading('Как собирается журнал','От идеи до последовательности страниц.','Редакция')+'''
    01

    Сценарий

    Сюжет главы, реплики, темп и ключевые события.

    02

    Кадры

    Композиция страниц, визуальные референсы и работа с генерацией.

    03

    Редактура

    Проверка последовательности, читаемости текста и сборка выпуска.

    Для вопросов и предложений

    Отзыв о главе, замеченная ошибка или предложение о сотрудничестве — выбери подходящую тему в форме обратной связи.

    Обратная связь ↗
    ''') +page('contact','Обратная связь',heading('Есть что сказать?','Отзыв, ошибка или предложение — начни с темы обращения.','Редакции')+'''

    ''') +page('reading-guide','Как читать мангу',heading('Справа налево.
    Кадр за кадром.','Небольшой путеводитель перед первой главой.','Читателям')+'''
    2
    1
    3 ← Порядок чтения

    1. Начни справа

    Верхний правый кадр — первый. Дальше двигайся влево по ряду.

    2. Спускайся ниже

    Когда ряд закончился, переходи к следующему ряду кадров.

    3. Читай реплики по порядку

    Внутри кадра обычно начинают с верхнего правого облачка текста. Направление может подсказывать сама композиция.

    4. Дай рисунку время

    Крупные кадры и паузы тоже рассказывают историю.

    ''') +faqs=[('Можно ли уже читать главы?','Читалка поддерживает постраничный режим, развороты и вертикальную ленту. Чтение доступно для глав с опубликованными страницами.'),('Как сохранить сериал?','Нажми «В избранное» в каталоге или на странице сериала. Избранное хранится в этом браузере.'),('Нужна ли регистрация?','Сейчас доступен демонстрационный кабинет без регистрации. Настоящий вход и синхронизация не подключены.'),('Работают ли платежи?','Нет. Поддержка показывает локальный выбор суммы, но не принимает деньги. Подписку оформить пока нельзя.'),('Куда отправляется голос?','Пока только в локальное хранилище этого браузера. Это демонстрация интерфейса, а не общий рейтинг.'),('Что происходит с сообщением редакции?','Форма сохраняет черновик на устройстве. Отправка на сервер пока не подключена.'),('Где взять другие сериалы?','В каталоге представлены все восемь серий первого выпуска.'),('Почему даты расписания — январские?','Это анонсы из макета первого выпуска №001. Они не выданы за актуальный календарь публикаций.')] +page('faq','Вопросы и ответы',heading('Давай разберёмся','Чтение, кабинет, поддержка и возможности текущей версии.','Помощь')+'
    '+''.join(f'
    {q}

    {a}

    ' for q,a in faqs)+'

    Остался вопрос?

    Перейти к обратной связи ↗
    ') +docs={ + 'terms':('Условия использования',[('Статус этой версии','Сайт показывает каталог журнала и демонстрационные пользовательские сценарии. Этот текст описывает текущий интерфейс и является редакционным проектом для согласования перед запуском сервиса.'),('Чтение и аккаунт','Читалка доступна для опубликованных глав. Настоящая авторизация пока не подключена. Демо-кабинет не создаёт учётную запись на сервере.'),('Поддержка и подписка','Сайт не принимает платежи и не оформляет подписки. Платёжные условия должны быть отдельно определены и опубликованы до запуска оплаты.'),('Материалы журнала','Вопросы об использовании материалов можно подготовить в разделе обратной связи. См. также раздел об авторских правах.'),('Обращения','В текущей версии сообщения сохраняются локально и не отправляются редакции.')]), + 'privacy':('Конфиденциальность',[('Локальное хранение','Избранные сериалы, голос, настройки, тема оформления, прогресс чтения, имя для демо-кабинета и черновик обращения сохраняются в localStorage этого браузера.'),('Демо-кабинет','Сайт не запрашивает пароль. Имя используется только для приветствия в интерфейсе на текущем устройстве.'),('Формы и платежи','Обращения не отправляются на сервер. Платёжные данные не запрашиваются. Общая система голосования не подключена.'),('Удаление локальных данных','Можно очистить сохранённые настройки и черновики кнопкой ниже. Очистка касается только данных MANGABOM в этом браузере.'),('Перед запуском','Это описание текущей демо-версии, а не окончательная политика сервиса. Информация об операторе, инфраструктуре и серверной обработке должна быть уточнена перед запуском настоящих аккаунтов.')]), + 'copyright':('Авторские права',[('Материалы MANGABOM','Журнал включает сценарии, иллюстрации, тексты и дизайн. При работе над историями используются генеративные инструменты.'),('Использование материалов','Условия перепечатки, перевода и коммерческого использования ещё не опубликованы. До согласования не следует считать доступность изображения разрешением на любое использование.'),('Цитирование и ссылки','Чтобы поделиться журналом, можно скопировать ссылку на сайт или страницу сериала.'),('Вопрос или замечание','Если вопрос касается происхождения материала или разрешения на использование, подготовь обращение с указанием конкретного сериала и страницы.'),('Редакционный статус','Этот раздел — проект информационной страницы. Условия и сведения о правообладателях требуют согласования перед запуском.')])} +for slug,(title,sections) in docs.items(): + extra='

    ' if slug=='privacy' else '' + page(slug,title,heading(title,'Редакционный проект · описание текущей версии сайта','Справочная информация')+'
    '+''.join(f'

    {t}

    {p}

    ' for t,p in sections)+extra+'
    ') +reader_doc=html.parse(str(ROOT/'scripts'/'reader-template.html')) +reader_header=reader_doc.xpath(has('site-header'))[0] +new_reader_header=deepcopy(shared_header) +for node in new_reader_header.xpath('.//a[contains(concat(" ",normalize-space(@class)," ")," nav-item ")]'): + node.set('class','nav-item');node.attrib.pop('aria-current',None) + if node.get('href')=='serials.html':node.set('class','nav-item active');node.set('aria-current','page') +reader_header.getparent().replace(reader_header,new_reader_header) +save(reader_doc,'reader.html') +print('Built journal pages and reader. Run update-library.cmd after adding chapter images.') diff --git a/scripts/calculate-image-spec.cjs b/scripts/calculate-image-spec.cjs new file mode 100644 index 0000000..0aac501 --- /dev/null +++ b/scripts/calculate-image-spec.cjs @@ -0,0 +1,9 @@ +const fs=require('node:fs'),path=require('node:path');const root=path.resolve(__dirname,'..'); +const measurements=JSON.parse(fs.readFileSync(path.join(root,'docs/image-spec/slot-measurements.json'),'utf8')); +const W=2400,H=1600; +function crop(slot,z=1.045){const fit=Math.max(slot.width/W,slot.height/H);const [px,py]=slot.objectPosition.split(' ').map(v=>parseFloat(v)/100);const dx=(slot.width-W*fit)*px,dy=(slot.height-H*fit)*py;return {left:(slot.width/2*(1-1/z)-dx)/fit/W*100,right:(slot.width/2*(1+1/z)-dx)/fit/W*100,top:(slot.height/2*(1-1/z)-dy)/fit/H*100,bottom:(slot.height/2*(1+1/z)-dy)/fit/H*100};} +const slots=measurements.flatMap(m=>m.slots.filter(s=>s.type!=='home').map(s=>({case:m.case,...s,crop:crop(s)}))); +const intersection={left:Math.max(...slots.map(s=>s.crop.left)),right:Math.min(...slots.map(s=>s.crop.right)),top:Math.max(...slots.map(s=>s.crop.top)),bottom:Math.min(...slots.map(s=>s.crop.bottom))}; +const output={master:{width:W,height:H},intersection,crops:slots}; +fs.mkdirSync(path.join(root,'docs/image-spec'),{recursive:true});fs.writeFileSync(path.join(root,'docs/image-spec/crop-measurements.json'),JSON.stringify(output,null,2)); +console.log(JSON.stringify({intersection,crops:slots.map(s=>({case:s.case,type:s.type,width:s.width,height:s.height,crop:s.crop}))},null,2)); \ No newline at end of file diff --git a/scripts/check-layout.ps1 b/scripts/check-layout.ps1 new file mode 100644 index 0000000..d6a5abe --- /dev/null +++ b/scripts/check-layout.ps1 @@ -0,0 +1,32 @@ +param([string]$Name='desktop',[int]$Width=1366,[int]$Height=768,[string]$Page='index.html',[string]$Theme='light',[switch]$Footer,[string]$Period='',[string]$Anchor='',[string]$Focus='') +$ErrorActionPreference='Continue' +$projectRoot=Split-Path -Parent $PSScriptRoot +$qaRoot=Join-Path $projectRoot '.qa' +[IO.Directory]::CreateDirectory($qaRoot) | Out-Null +$tempBase=[IO.Path]::GetFullPath([IO.Path]::GetTempPath()) +$profile=Join-Path $tempBase ('mangabom-render-'+[Guid]::NewGuid().ToString('N')) +$probeName='layout-check-'+[Guid]::NewGuid().ToString('N')+'.html' +$probePath=Join-Path $projectRoot ('dist\'+$probeName) +[IO.File]::WriteAllText($probePath,[IO.File]::ReadAllText((Join-Path $PSScriptRoot 'layout-probe.html')),[Text.UTF8Encoding]::new($false)) +try { + $url='http://localhost:8080/'+$probeName+'?width='+$Width+'&height='+$Height+'&page='+[Uri]::EscapeDataString($Page)+'&theme='+$Theme + if($Footer){$url+='&footer=1'} + if($Period){$url+='&period='+[Uri]::EscapeDataString($Period)} + if($Anchor){$url+='&anchor='+[Uri]::EscapeDataString($Anchor)} + if($Focus){$url+='&focus='+[Uri]::EscapeDataString($Focus)} + $dump=& 'C:\Program Files\Google\Chrome\Application\chrome.exe' --headless=new --no-first-run --no-default-browser-check "--user-data-dir=$profile" "--window-size=$Width,$Height" --virtual-time-budget=10000 "--screenshot=$qaRoot\$Name.png" --dump-dom $url 2> (Join-Path $qaRoot ($Name+'.chrome.log')) | Out-String + $match=[regex]::Match($dump,'
    (.*?)
    ') + if(-not $match.Success -or $match.Groups[1].Value -eq 'pending'){throw 'Layout probe did not finish'} + $json=[Net.WebUtility]::HtmlDecode($match.Groups[1].Value) + [IO.File]::WriteAllText((Join-Path $qaRoot ($Name+'.json')),$json,[Text.UTF8Encoding]::new($false)) + Write-Output ($Name+': '+$json) + $metrics=$json | ConvertFrom-Json + if($metrics.probeError){throw $metrics.probeError} + if($metrics.heroReadClipped){throw 'Hero reading button is clipped'} + if($metrics.scrollWidth -gt $metrics.viewport -or $metrics.logoOverlapsMenu -or $metrics.overlappingMenuItems -or $metrics.outside.Count -or $metrics.textClipped.Count -or $metrics.errors.Count -or @($metrics.themeButtons | Where-Object {-not $_.inFooter}).Count){throw 'Layout check failed; inspect the screenshot and metrics in .qa/'} +} finally { + [IO.File]::Delete($probePath) + $resolvedProfile=[IO.Path]::GetFullPath($profile) + if(-not $resolvedProfile.StartsWith((Join-Path $tempBase 'mangabom-render-'),[StringComparison]::OrdinalIgnoreCase)){throw 'Unsafe temporary profile cleanup path'} + if(Test-Path -LiteralPath $resolvedProfile){Remove-Item -LiteralPath $resolvedProfile -Recurse -Force -ErrorAction SilentlyContinue} +} \ No newline at end of file diff --git a/scripts/home-template.html b/scripts/home-template.html new file mode 100644 index 0000000..4525c30 --- /dev/null +++ b/scripts/home-template.html @@ -0,0 +1,85 @@ + + + + + + + + MANGABOM — журнал манги + + + + + + + + + +
    +
    +
    + + + +
    +
    +
    +
    +
    Рэн с чашей рамена
    +
    + +

    +
    + +
    +
    + +
    +
    +

    +
    + + + + +
    +
    +
    +
    +

    +
      +
    1. +
    2. +
    3. +
    +
    +
    +

    + + +
    +
    +
    +
    +
    + + + + + +
    +
    + + diff --git a/scripts/index-manga.ps1 b/scripts/index-manga.ps1 new file mode 100644 index 0000000..bfa1b2a --- /dev/null +++ b/scripts/index-manga.ps1 @@ -0,0 +1,72 @@ +param([string]$ContentRoot = (Join-Path (Split-Path -Parent $PSScriptRoot) 'dist\manga')) +$ErrorActionPreference = 'Stop' +$utf8 = [Text.UTF8Encoding]::new($false) +$root = [IO.Path]::GetFullPath($ContentRoot) +if (-not (Test-Path -LiteralPath $root -PathType Container)) { throw ('Content folder does not exist: ' + $root) } +$librarySeries = @() +foreach ($mangaFolder in (Get-ChildItem -LiteralPath $root -Directory | Sort-Object Name)) { + if ($mangaFolder.Name -cnotmatch '^[A-Z0-9]+(?:_[A-Z0-9]+)*$') { Write-Warning ('Skipped invalid series folder: ' + $mangaFolder.Name); continue } + $metadataPath = Join-Path $mangaFolder.FullName 'series.json' + if (-not (Test-Path -LiteralPath $metadataPath)) { Write-Warning ('Missing series.json: ' + $mangaFolder.Name); continue } + $metadata = Get-Content -LiteralPath $metadataPath -Raw -Encoding UTF8 | ConvertFrom-Json + if (-not $metadata.title) { throw ('Missing title: ' + $metadataPath) } + $seriesId = if ($metadata.id) { [string]$metadata.id } else { $mangaFolder.Name } + if ($seriesId -cnotmatch '^[A-Za-z0-9]+(?:[-_][A-Za-z0-9]+)*$') { throw ('Invalid series id: ' + $metadataPath) } + if (@($librarySeries | Where-Object { $_.id -eq $seriesId }).Count) { throw ('Duplicate series id: ' + $seriesId) } + $chapters = @() + $chapterFolders = @(Get-ChildItem -LiteralPath $mangaFolder.FullName -Directory | Where-Object { $_.Name -match '^chapter-\d+$' } | Sort-Object { [int]($_.Name -replace '^chapter-','') }) + $seenNumbers = @{} + foreach ($chapterFolder in $chapterFolders) { + $number = [int]($chapterFolder.Name -replace '^chapter-','') + if ($number -lt 1 -or $seenNumbers.ContainsKey($number)) { throw ('Invalid or duplicate chapter number: ' + $chapterFolder.FullName) } + $seenNumbers[$number] = $true + $images = @(Get-ChildItem -LiteralPath $chapterFolder.FullName -File | Where-Object { $_.Extension -match '^\.(png|jpe?g|webp|avif)$' }) + $byNumber = @{}; $issues = @() + foreach ($image in $images) { + if ($image.BaseName -notmatch '^\d+$') { $issues += ('Use numeric file names: ' + $image.Name); continue } + $pageNumber = [int]$image.BaseName + if ($pageNumber -lt 1 -or $pageNumber -gt 16) { $issues += ('Page outside 01-16: ' + $image.Name); continue } + if ($byNumber.ContainsKey($pageNumber)) { $issues += ('Duplicate page: ' + $pageNumber); continue } + if ($image.Length -eq 0) { $issues += ('Empty image: ' + $image.Name); continue } + $byNumber[$pageNumber] = $image + } + $missing = @(1..16 | Where-Object { -not $byNumber.ContainsKey($_) }) + $ready = $missing.Count -eq 0 -and $issues.Count -eq 0 + $title = 'Глава {0:00}' -f $number + $chapterMetadata = Join-Path $chapterFolder.FullName 'chapter.json' + if (Test-Path -LiteralPath $chapterMetadata) { + $custom = Get-Content -LiteralPath $chapterMetadata -Raw -Encoding UTF8 | ConvertFrom-Json + if ($custom.title) { $title = [string]$custom.title } + } + $pages = @() + foreach ($pageNumber in ($byNumber.Keys | Sort-Object)) { + $image = $byNumber[$pageNumber] + $src = 'manga/' + $mangaFolder.Name + '/' + $chapterFolder.Name + '/' + [Uri]::EscapeDataString($image.Name) + $pages += [ordered]@{ src = $src } + } + $chapters += [ordered]@{ id = $chapterFolder.Name; title = $title; number = $number; expectedPages = 16; ready = $ready; pages = @($pages) } + if ($images.Count -and -not $ready) { Write-Warning ($mangaFolder.Name + '/' + $chapterFolder.Name + ': not published; missing ' + ($missing -join ', ') + '; ' + ($issues -join '; ')) } + Write-Host ('{0}/{1}: {2}/16, {3}' -f $mangaFolder.Name, $chapterFolder.Name, $byNumber.Count, $(if ($ready) {'ready'} else {'waiting'})) + } + $librarySeries += [ordered]@{ id = $seriesId; folder = $mangaFolder.Name; title = [string]$metadata.title; chapters = @($chapters) } +} +$manifest = [ordered]@{ version = 1; generatedAt = [DateTime]::UtcNow.ToString('o'); series = @($librarySeries) } +$manifestPath = Join-Path $root 'library.json' +if ([IO.File]::Exists($manifestPath)) { + try { + $existing = Get-Content -LiteralPath $manifestPath -Raw -Encoding UTF8 | ConvertFrom-Json + $before = ConvertTo-Json -InputObject @($existing.series) -Depth 15 -Compress + $after = ConvertTo-Json -InputObject @($librarySeries) -Depth 15 -Compress + if ($existing.version -eq $manifest.version -and $before -ceq $after) { + Write-Host ('Library is current: ' + $manifestPath) + return + } + } catch { # A missing or invalid previous manifest is rebuilt below. + } +} +$tempPath = Join-Path $root ('library.' + [Guid]::NewGuid().ToString('N') + '.tmp') +try { + [IO.File]::WriteAllText($tempPath, ($manifest | ConvertTo-Json -Depth 15), $utf8) + if ([IO.File]::Exists($manifestPath)) { [IO.File]::Replace($tempPath, $manifestPath, [NullString]::Value) } else { [IO.File]::Move($tempPath, $manifestPath) } +} finally { if ([IO.File]::Exists($tempPath)) { [IO.File]::Delete($tempPath) } } +Write-Host ('Library updated: ' + $manifestPath) \ No newline at end of file diff --git a/scripts/layout-probe.html b/scripts/layout-probe.html new file mode 100644 index 0000000..277f91c --- /dev/null +++ b/scripts/layout-probe.html @@ -0,0 +1,25 @@ + +
    pending
    \ No newline at end of file diff --git a/scripts/local-server.ps1 b/scripts/local-server.ps1 new file mode 100644 index 0000000..767e570 --- /dev/null +++ b/scripts/local-server.ps1 @@ -0,0 +1,107 @@ +param( + [ValidateSet('Start', 'Stop', 'Serve')][string]$Action = 'Start', + [ValidateRange(1024, 65535)][int]$Port = 8080 +) +$ErrorActionPreference = 'Stop' +$projectRoot = Split-Path -Parent $PSScriptRoot +$siteRoot = [IO.Path]::GetFullPath((Join-Path $projectRoot 'dist')) +$statePath = Join-Path $projectRoot '.local-server.json' +$scriptPath = $PSCommandPath + +function Get-SiteProcess { + if (-not (Test-Path -LiteralPath $statePath)) { return $null } + $state = Get-Content -LiteralPath $statePath -Raw | ConvertFrom-Json + $siteProcess = Get-CimInstance Win32_Process -Filter ('ProcessId = ' + [int]$state.pid) + if ($siteProcess -and $siteProcess.CommandLine -and $siteProcess.CommandLine.Contains($scriptPath) -and $siteProcess.CommandLine.Contains('-Action Serve')) { + return [pscustomobject]@{ Process = $siteProcess; Port = [int]$state.port } + } + return $null +} + +if ($Action -eq 'Stop') { + $running = Get-SiteProcess + if ($running) { + Stop-Process -Id $running.Process.ProcessId + Write-Host ('MANGABOM stopped: http://localhost:' + $running.Port + '/') + } else { Write-Host 'MANGABOM is not running.' } + exit 0 +} +if ($Action -eq 'Start') { + & (Join-Path $PSScriptRoot 'index-manga.ps1') | Out-Host + $running = Get-SiteProcess + if ($running) { + Write-Host ('MANGABOM is already running: http://localhost:' + $running.Port + '/') + exit 0 + } + $powerShellPath = Join-Path $PSHOME 'powershell.exe' + $arguments = '-NoProfile -ExecutionPolicy Bypass -File "' + $scriptPath + '" -Action Serve -Port ' + $Port + $child = Start-Process -FilePath $powerShellPath -ArgumentList $arguments -WindowStyle Hidden -WorkingDirectory $env:SystemRoot -RedirectStandardOutput (Join-Path $projectRoot '.local-server-output.log') -RedirectStandardError (Join-Path $projectRoot '.local-server-error.log') -PassThru + for ($attempt = 0; $attempt -lt 25; $attempt++) { + Start-Sleep -Milliseconds 200 + $child.Refresh() + if ($child.HasExited) { throw ('Server failed. See ' + (Join-Path $projectRoot '.local-server-error.log')) } + try { + $response = Invoke-WebRequest -Uri ('http://localhost:' + $Port + '/') -UseBasicParsing -TimeoutSec 2 + if ($response.Headers['X-Mangabom-Local'] -eq '1') { + Write-Host ('MANGABOM: http://localhost:' + $Port + '/') + exit 0 + } + } catch { } + } + throw 'Server did not become ready. Check the local server logs.' +} + +$mime = @{ + '.html' = 'text/html; charset=utf-8'; '.css' = 'text/css; charset=utf-8' + '.js' = 'application/javascript; charset=utf-8'; '.json' = 'application/json; charset=utf-8' + '.webp' = 'image/webp'; '.png' = 'image/png'; '.jpg' = 'image/jpeg'; '.jpeg' = 'image/jpeg' + '.avif' = 'image/avif'; '.svg' = 'image/svg+xml'; '.ico' = 'image/x-icon'; '.ttf' = 'font/ttf' + '.woff' = 'font/woff'; '.woff2' = 'font/woff2'; '.txt' = 'text/plain; charset=utf-8' +} +$listener = [Net.HttpListener]::new() +$listener.Prefixes.Add(('http://localhost:' + $Port + '/')) +try { + $listener.Start() + @{ pid = $PID; port = $Port } | ConvertTo-Json | Set-Content -LiteralPath $statePath -Encoding UTF8 + while ($listener.IsListening) { + $context = $listener.GetContext() + $response = $context.Response + $response.Headers['X-Mangabom-Local'] = '1' + $response.Headers['X-Content-Type-Options'] = 'nosniff' + $response.Headers['Cache-Control'] = 'no-cache' + try { + if ($context.Request.HttpMethod -notin @('GET', 'HEAD')) { + $response.StatusCode = 405 + $response.Headers['Allow'] = 'GET, HEAD' + continue + } + $relativePath = [Uri]::UnescapeDataString($context.Request.Url.AbsolutePath).TrimStart('/').Replace('/', '\') + if (-not $relativePath) { $relativePath = 'index.html' } + $filePath = [IO.Path]::GetFullPath([IO.Path]::Combine($siteRoot, $relativePath)) + if (-not $filePath.StartsWith($siteRoot + '\', [StringComparison]::OrdinalIgnoreCase)) { + $response.StatusCode = 403 + continue + } + # Refresh from folders when the reader requests the catalogue. + # This works on SMB shares without unreliable filesystem watchers. + if ($filePath.Equals((Join-Path $siteRoot 'manga\library.json'), [StringComparison]::OrdinalIgnoreCase)) { + & (Join-Path $PSScriptRoot 'index-manga.ps1') 6>$null + } + if (-not [IO.File]::Exists($filePath)) { + $response.StatusCode = 404 + continue + } + $contentType = $mime[[IO.Path]::GetExtension($filePath).ToLowerInvariant()] + if (-not $contentType) { $contentType = 'application/octet-stream' } + $response.ContentType = $contentType + $file = [IO.File]::OpenRead($filePath) + try { + $response.ContentLength64 = $file.Length + if ($context.Request.HttpMethod -eq 'GET') { $file.CopyTo($response.OutputStream) } + } finally { $file.Dispose() } + } catch { + try { $response.StatusCode = 500 } catch { } + [Console]::Error.WriteLine($_.Exception.Message) + } finally { $response.Close() } + } +} finally { $listener.Close() } \ No newline at end of file diff --git a/scripts/partials/header.html b/scripts/partials/header.html new file mode 100644 index 0000000..8ebf4ab --- /dev/null +++ b/scripts/partials/header.html @@ -0,0 +1,10 @@ + diff --git a/scripts/product-home-template.html b/scripts/product-home-template.html new file mode 100644 index 0000000..850eddb --- /dev/null +++ b/scripts/product-home-template.html @@ -0,0 +1,108 @@ + + + + + + + + MANGABOM — журнал манги + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    Рэн с чашей рамена
    +
    + Главный сериал +

    Повелительдешёвогообеда

    +
    +Первый выпуск · Глава 01

    Школьная кулинарная битва
    выходит на новый уровень!

    +
    + Читать главу +
    +
    + +
    +
    + + +
    + +
    +
    + +
    + + diff --git a/scripts/reader-template.html b/scripts/reader-template.html new file mode 100644 index 0000000..7d62b31 --- /dev/null +++ b/scripts/reader-template.html @@ -0,0 +1,58 @@ + + + + + + + + Читать мангу — MANGABOM + + + + + + + + + + + + + + + +К страницам главы +
    + +
    Каталог сериалов

    Выбери историю

    +
    +
    +
    +
    + +
    + + +
    +
    Загружаем библиотеку…Порядок чтения — справа налево
    +

    +
    + +
    + + + + \ No newline at end of file diff --git a/scripts/support-content.html b/scripts/support-content.html new file mode 100644 index 0000000..1d31cc4 --- /dev/null +++ b/scripts/support-content.html @@ -0,0 +1,11 @@ +
    +
    Поддержка журнала

    Выбери свой MANGABOM

    Меняй или отменяй подписку в любой момент

    +
    +
    +

    Читатель

    0 ₽

    Навсегда

    Каталог манги, ознакомительные главы, избранное и голосования.

    Читать бесплатно
    + +

    Коллекционер

    399 ₽

    в месяц

    Полное чтение + бонусы

    Всё из MANGABOM+, скачиваемые издания, карточки, закладки и артбуки.

    +
    +

    Цены указаны за месяц.

    Оформление подписки и приём платежей пока недоступны.

    +
    +
    Без подписки

    Поддержать
    один раз

    Помоги новым историям появляться. Выбери комфортную сумму разовой поддержки.

    Твоя поддержка — продолжение истории

    \ No newline at end of file diff --git a/scripts/test-build.py b/scripts/test-build.py new file mode 100644 index 0000000..9bec9b0 --- /dev/null +++ b/scripts/test-build.py @@ -0,0 +1,22 @@ +from pathlib import Path +from lxml import html +import sys +root=Path(sys.argv[1]) +headers=[] +for p in sorted((root/'dist').glob('*.html')): + d=html.parse(str(p)) + if d.xpath('//meta[@http-equiv="refresh"]'):continue + hs=d.xpath('//header[contains(concat(" ",normalize-space(@class)," ")," site-header ")]') + assert len(hs)==1,p.name + h=hs[0] + for a in h.xpath('.//a'): + a.attrib.pop('aria-current',None) + if 'nav-item' in a.get('class',''):a.set('class','nav-item') + headers.append((p.name,html.tostring(h,encoding='unicode',with_tail=False))) +assert len({v for _,v in headers})==1,'Header markup differs' +s=html.parse(str(root/'dist'/'support.html')) +assert len(s.xpath('//*[@data-billing]'))==2 +assert len(s.xpath('//*[contains(concat(" ",normalize-space(@class)," ")," membership-card ")]'))==3 +assert len(s.xpath('//*[@id="support-form"]'))==1 +assert s.xpath('//*[@id="plans"]')[0].getparent().index(s.xpath('//*[@id="plans"]')[0]) < s.xpath('//*[@id="one-time"]')[0].getparent().index(s.xpath('//*[@id="one-time"]')[0]) +print('PASS: identical header markup on',len(headers),'pages; unified support and one shared billing toggle.') \ No newline at end of file diff --git a/scripts/test-images.ps1 b/scripts/test-images.ps1 new file mode 100644 index 0000000..d34b906 --- /dev/null +++ b/scripts/test-images.ps1 @@ -0,0 +1,27 @@ +$ErrorActionPreference='Stop' +$projectRoot=Split-Path -Parent $PSScriptRoot +$token=[Guid]::NewGuid().ToString('N') +$imageBase='QA_SWAP_'+$token.ToUpperInvariant() +$pageName='image-swap-'+$token+'.html' +$pagePath=Join-Path $projectRoot ('dist\'+$pageName) +$imagePath=Join-Path $projectRoot ('dist\images\'+$imageBase+'.png') +if((Test-Path -LiteralPath $pagePath)-or(Test-Path -LiteralPath $imagePath)){throw 'Test path already exists'} +$html='
    MANGABOMTESTОБЛОЖКА
    Тестовая обложка
    ' +try{ + [IO.File]::WriteAllText($pagePath,$html,[Text.UTF8Encoding]::new($false)) + & powershell.exe -NoProfile -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot 'check-layout.ps1') -Name image-swap-missing -Width 390 -Height 844 -Page $pageName + if($LASTEXITCODE-ne 0){throw 'Missing image layout failed'} + $metrics=Get-Content -LiteralPath (Join-Path $projectRoot '.qa\image-swap-missing.json') -Raw -Encoding UTF8|ConvertFrom-Json + if($metrics.imageFallbacks-ne 1-or$metrics.managedImages.Count-ne 0){throw 'Missing image did not show a text cover'} + [IO.File]::Copy((Join-Path $projectRoot 'dist\manga\LORD_OF_CHEAP_LUNCH\chapter-001\01.png'),$imagePath,$false) + & powershell.exe -NoProfile -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot 'check-layout.ps1') -Name image-swap-added -Width 390 -Height 844 -Page $pageName + if($LASTEXITCODE-ne 0){throw 'Added image layout failed'} + $metrics=Get-Content -LiteralPath (Join-Path $projectRoot '.qa\image-swap-added.json') -Raw -Encoding UTF8|ConvertFrom-Json + if($metrics.managedImages.Count-ne 1-or-not $metrics.managedImages[0].loaded-or$metrics.imageFallbacks-ne 0){throw 'New PNG image was not found automatically'} + [IO.File]::Delete($imagePath) + & powershell.exe -NoProfile -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot 'check-layout.ps1') -Name image-swap-removed -Width 390 -Height 844 -Page $pageName + if($LASTEXITCODE-ne 0){throw 'Removed image layout failed'} + $metrics=Get-Content -LiteralPath (Join-Path $projectRoot '.qa\image-swap-removed.json') -Raw -Encoding UTF8|ConvertFrom-Json + if($metrics.imageFallbacks-ne 1-or$metrics.managedImages.Count-ne 0){throw 'Deleting an image did not restore text cover'} + Write-Host 'PASS: adding a PNG and deleting it updates the cover automatically without HTML edits or indexing.' +}finally{[IO.File]::Delete($pagePath);[IO.File]::Delete($imagePath)} \ No newline at end of file diff --git a/scripts/test-reader.cjs b/scripts/test-reader.cjs new file mode 100644 index 0000000..cd75e4b --- /dev/null +++ b/scripts/test-reader.cjs @@ -0,0 +1,92 @@ +const fs = require('node:fs'); +const vm = require('node:vm'); +const path = require('node:path'); +const assert = require('node:assert/strict'); +const root = path.resolve(__dirname, '..'); +for (const name of ['reader.js', 'theme.js', 'library.js', 'app.js']) new vm.Script(fs.readFileSync(path.join(root, 'dist', name), 'utf8'), { filename: name }); + +class Element { + constructor(tag = 'div') { this.tagName = tag.toUpperCase(); this.children = []; this.dataset = {}; this.listeners = {}; this.attributes = {}; this.value = ''; this.hidden = false; this.className = ''; this.textContent = ''; this.style = { setProperty: (key, value) => { this.style[key] = value; } }; this.classList = { add: (...names) => { this.className += ' ' + names.join(' '); }, remove: (...names) => { this.className = this.className.split(' ').filter(x => !names.includes(x)).join(' '); }, toggle: () => {} }; } + append(...nodes) { for (const node of nodes) { node.parent = this; this.children.push(node); } } + insertBefore(node, reference) { if (!reference) this.append(node); else { node.parent = this; this.children.splice(this.children.indexOf(reference), 0, node); } } + prepend(node) { node.parent = this; this.children.unshift(node); } + replaceChildren(...nodes) { this.children = []; this.append(...nodes); } + remove() { if (this.parent) this.parent.children = this.parent.children.filter(item => item !== this); } + before() {} + setAttribute(name, value) { this.attributes[name] = value; } + addEventListener(name, fn) { (this.listeners[name] ||= []).push(fn); } + async emit(name, properties = {}) { for (const fn of this.listeners[name] || []) await fn({ target: this, preventDefault() {}, ...properties }); } + querySelectorAll(selector) { const nodes = this.children.flatMap(child => [child, ...child.querySelectorAll(selector)]); return nodes.filter(node => selector === '[data-page]' ? node.dataset.page !== undefined : /^\[data-page="(\d+)"\]$/.test(selector) && node.dataset.page === selector.match(/\d+/)[0]); } + querySelector(selector) { return this.querySelectorAll(selector)[0] || null; } + closest(selector) { return selector.split(',').some(tag => tag.trim().toUpperCase() === this.tagName) ? this : null; } + scrollIntoView() { this.scrolled = true; } + getBoundingClientRect() { return { top: this.rectTop ?? 1000 }; } +} +const fixture = { series: [{ id: 'food', folder: 'LORD_OF_CHEAP_LUNCH', title: 'Test manga', chapters: [1, 2, 3].map(n => ({ id: 'chapter-00' + n, title: 'Chapter ' + n, ready: n !== 3, pages: n === 3 ? [] : Array.from({ length: 16 }, (_, i) => ({ src: 'manga/LORD_OF_CHEAP_LUNCH/chapter-00' + n + '/' + (i + 1) + '.jpg' })) })) }] }; +async function setup({ query = '?series=food&chapter=chapter-001', settings, progress, manifest = fixture, badFetch = false, mobile = false } = {}) { + const nodes = new Map(); + for (const match of fs.readFileSync(path.join(root, 'dist/reader.html'), 'utf8').matchAll(/<([a-z]+)\b[^>]*\bid="([^"]+)"[^>]*>/g)) { + const element = new Element(match[1]); element.hidden = /\bhidden\b/.test(match[0]); nodes.set('#' + match[2], element); + } + const document = new Element('document'); document.documentElement = new Element('html'); document.fullscreenEnabled = false; + document.createElement = tag => new Element(tag); + document.querySelector = selector => { if (!nodes.has(selector)) nodes.set(selector, new Element(selector.includes('select') || selector === '#page-layout' ? 'select' : 'div')); return nodes.get(selector); }; + const modes = ['paged', 'vertical'].map(mode => { const button = new Element('button'); button.dataset.mode = mode; return button; }); + document.querySelectorAll = selector => selector === '[data-mode]' ? modes : []; + const memory = new Map(); if (settings) memory.set('mangabom.reader.settings', JSON.stringify(settings)); if (progress) memory.set('mangabom.reader.progress.food.chapter-001', JSON.stringify(progress)); + const window = new Element('window'); + const context = { document, window, localStorage: { getItem: key => memory.get(key) ?? null, setItem: (key, value) => memory.set(key, value) }, location: { href: 'http://localhost:8080/reader.html' + query, search: query }, history: { replaceState(_, __, url) { context.location.href = String(url); } }, URL, URLSearchParams, matchMedia: () => ({ matches: mobile }), performance: { now: () => 1000 }, innerHeight: 800, Image: class {}, console: { error() {} }, fetch: async () => ({ ok: !badFetch, json: async () => manifest }), requestAnimationFrame: callback => { callback(); return 1; } }; + vm.runInNewContext(fs.readFileSync(path.join(root, 'dist/reader.js'), 'utf8'), context); + await new Promise(resolve => setImmediate(resolve)); + return { context, nodes, document, window, modes, memory, get: selector => nodes.get(selector) }; +} +(async () => { + let app = await setup(); + assert.equal(app.get('#reader-stage').querySelectorAll('[data-page]').length, 1); + assert.equal(app.get('#previous-page').disabled, true); + await app.get('#next-page').emit('click'); + assert.equal(JSON.parse(app.memory.get('mangabom.reader.progress.food.chapter-001')).page, 2); + await app.document.emit('keydown', { key: 'ArrowLeft' }); assert.equal(app.get('#page-select').value, '2'); + await app.document.emit('keydown', { key: 'ArrowRight' }); assert.equal(app.get('#page-select').value, '1'); + const select = app.get('#page-layout'); select.value = 'spread'; await select.emit('change'); + assert.equal(app.get('#reader-stage').querySelectorAll('[data-page]').length, 2); + await app.get('#next-page').emit('click'); assert.equal(app.get('#page-select').value, '3'); + await app.document.emit('keydown', { key: 'End' }); assert.equal(app.get('#page-select').value, '15'); assert.equal(app.get('#next-page').disabled, true); + await app.document.emit('keydown', { key: 'Home' }); assert.equal(app.get('#reader-stage').querySelectorAll('[data-page]').length, 1); + await app.modes[1].emit('click'); assert.equal(app.get('#reader-stage').querySelectorAll('[data-page]').length, 16); assert.equal(app.get('#layout-field').hidden, true); + app.get('#page-select').value = '8'; await app.get('#page-select').emit('change'); assert.equal(JSON.parse(app.memory.get('mangabom.reader.progress.food.chapter-001')).page, 9); + assert.equal(app.get('#reader-stage').querySelector('[data-page="8"]').scrolled, true); + await app.modes[0].emit('click'); assert.equal(app.get('#page-select').value, '7'); + await app.document.emit('keydown', { key: 'ArrowLeft', target: new Element('input') }); assert.equal(app.get('#page-select').value, '7'); + assert.match(app.get('#next-chapter').href, /chapter-002/); assert.equal(app.get('#previous-chapter').hidden, true); + const frame = app.get('#reader-stage').querySelectorAll('[data-page]')[0]; await frame.children[0].emit('error'); assert.match(frame.className, /is-error/); assert.equal(frame.children[0].className, 'image-error'); + app = await setup({ query: '?series=LORD_OF_CHEAP_LUNCH&chapter=chapter-001', progress: { page: 7 } }); assert.equal(app.get('#page-select').value, '6'); + app = await setup({ progress: { page: 7 } }); assert.equal(app.get('#page-select').value, '6'); + app = await setup({ query: '?series=food&chapter=chapter-001&page=4', progress: { page: 7 } }); assert.equal(app.get('#page-select').value, '3'); + app = await setup({ query: '?series=food&chapter=chapter-001&page=999' }); assert.equal(app.get('#page-select').value, '15'); + app = await setup({ mobile: true }); assert.match(app.get('#reader-stage').className, /is-vertical/); + app.context.performance.now = () => 10000; + app.get('#reader-stage').querySelectorAll('[data-page]').forEach((frame, index) => { frame.rectTop = (index - 5) * 1200; }); + await app.window.emit('scroll'); assert.equal(app.get('#page-select').value, '5'); + assert.equal(JSON.parse(app.memory.get('mangabom.reader.progress.food.chapter-001')).page, 6); + app = await setup({ query: '?series=food&chapter=chapter-003' }); assert.equal(app.get('#reader-pagination').hidden, true); assert.equal(app.get('#reader-stage').children[0].className, 'reader-empty'); + app = await setup({ query: '?series=food&chapter=missing' }); assert.equal(app.get('#reader-stage').children[0].children[1].textContent, 'Глава не найдена'); + app = await setup({ badFetch: true }); assert.equal(app.get('#reader-stage').attributes['aria-busy'], 'false'); + app = await setup({ query: '?series=missing' }); assert.equal(app.get('#reader-stage').children[0].children[1].textContent, 'Выбери свою историю'); + // Verify theme toggle and persistence using the same document events as a browser. + const button = new Element('button'); button.closest = () => button; + const themeDoc = new Element('document'); themeDoc.documentElement = new Element('html'); themeDoc.querySelectorAll = () => [button]; themeDoc.querySelector = selector => selector === '[data-theme-toggle]' ? button : null; + themeDoc.body = new Element('body'); themeDoc.createElement = tag => new Element(tag); + const footerActions = new Element('div'); + const themeMemory = new Map(); const themeWindow = new Element('window'); + const themeContext = { document: themeDoc, window: themeWindow, localStorage: { getItem: k => themeMemory.get(k) || null, setItem: (k, v) => themeMemory.set(k, v) }, matchMedia: () => ({ matches: false, addEventListener() {} }) }; + vm.runInNewContext(fs.readFileSync(path.join(root, 'dist/theme.js'), 'utf8'), themeContext); + assert.equal(themeDoc.documentElement.dataset.theme, 'light'); await themeDoc.emit('click', { target: button }); + assert.equal(themeDoc.documentElement.dataset.theme, 'dark'); assert.equal(JSON.parse(themeMemory.get('mangabom.theme')), 'dark'); + await themeDoc.emit('click', { target: button }); assert.equal(themeDoc.documentElement.dataset.theme, 'light'); + themeDoc.querySelector = selector => selector === '.footer-bottom, .reader-footer' ? footerActions : null; + await themeDoc.emit('DOMContentLoaded'); + assert.equal(footerActions.children.length, 1, 'Theme switch belongs in the footer'); + assert.equal(themeDoc.body.children.length, 0, 'No floating body-level theme button'); + console.log('PASS: syntax, navigation, RTL spreads, vertical mode and scroll tracking, saved progress, explicit page, mobile default, empty/error states, image errors and theme persistence.'); +})().catch(error => { console.error(error); process.exitCode = 1; }); \ No newline at end of file diff --git a/scripts/test-reader.ps1 b/scripts/test-reader.ps1 new file mode 100644 index 0000000..1e326da --- /dev/null +++ b/scripts/test-reader.ps1 @@ -0,0 +1,86 @@ +$ErrorActionPreference = 'Stop' +$projectRoot = Split-Path -Parent $PSScriptRoot +$indexer = Join-Path $PSScriptRoot 'index-manga.ps1' +$tempBase = [IO.Path]::GetFullPath([IO.Path]::GetTempPath()) +$testRoot = Join-Path $tempBase ('mangabom-tests-' + [Guid]::NewGuid().ToString('N')) +function Assert-True($Condition, $Message) { if (-not $Condition) { throw $Message } } +function Load-Library { Get-Content -LiteralPath (Join-Path $testRoot 'library.json') -Raw -Encoding UTF8 | ConvertFrom-Json } +function Reindex { & $indexer -ContentRoot $testRoot 6>$null 3>$null } +try { + $chapterRoot = Join-Path $testRoot 'SAMPLE_MANGA\chapter-001' + [IO.Directory]::CreateDirectory($chapterRoot) | Out-Null + [IO.File]::WriteAllText((Join-Path $testRoot 'SAMPLE_MANGA\series.json'), '{"id":"sample","title":"Тестовая манга"}', [Text.UTF8Encoding]::new($false)) + Reindex + $library = Load-Library + Assert-True ($library.series.Count -eq 1) 'Single series must remain an array' + Assert-True (-not $library.series[0].chapters[0].ready) 'Empty chapter must not be ready' + Assert-True ($library.series[0].chapters[0].pages.Count -eq 0) 'Empty pages must remain an array' + $png = [Convert]::FromBase64String('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+aWZsAAAAASUVORK5CYII=') + foreach ($number in 1..15) { [IO.File]::WriteAllBytes((Join-Path $chapterRoot ('{0:00}.png' -f $number)), $png) } + Reindex + Assert-True (-not (Load-Library).series[0].chapters[0].ready) '15 pages must not be published' + [IO.File]::WriteAllBytes((Join-Path $chapterRoot '16.PNG'), $png) + [IO.File]::Move((Join-Path $chapterRoot '10.png'), (Join-Path $chapterRoot '010.png')) + Reindex + $chapter = (Load-Library).series[0].chapters[0] + Assert-True ($chapter.ready -and $chapter.pages.Count -eq 16) '16 pages must be published' + Assert-True ($chapter.pages[1].src.EndsWith('/02.png') -and $chapter.pages[9].src.EndsWith('/010.png')) 'Pages must be in numeric order' + Assert-True ($library.series[0].id -eq 'sample' -and $library.series[0].folder -eq 'SAMPLE_MANGA') 'Folder renames must preserve the series identity' + $stableManifest = [IO.File]::ReadAllText((Join-Path $testRoot 'library.json')) + Reindex + Assert-True ([IO.File]::ReadAllText((Join-Path $testRoot 'library.json')) -eq $stableManifest) 'Unchanged content must not rewrite the manifest' + [IO.File]::WriteAllBytes((Join-Path $chapterRoot '1.jpg'), $png) + Reindex + Assert-True (-not (Load-Library).series[0].chapters[0].ready) 'Duplicate page must block publication' + [IO.File]::Delete((Join-Path $chapterRoot '1.jpg')) + [IO.File]::WriteAllBytes((Join-Path $chapterRoot 'page-17.png'), $png) + Reindex + Assert-True (-not (Load-Library).series[0].chapters[0].ready) 'Bad image name must block publication' + [IO.File]::Delete((Join-Path $chapterRoot 'page-17.png')) + [IO.File]::WriteAllBytes((Join-Path $chapterRoot '17.png'), $png) + Reindex + Assert-True (-not (Load-Library).series[0].chapters[0].ready) 'Extra page must block publication' + [IO.File]::Delete((Join-Path $chapterRoot '17.png')) + [IO.File]::WriteAllBytes((Join-Path $chapterRoot '16.PNG'), [byte[]]@()) + Reindex + Assert-True (-not (Load-Library).series[0].chapters[0].ready) 'Empty image must block publication' + [IO.File]::WriteAllBytes((Join-Path $chapterRoot '16.PNG'), $png) + $secondChapter = Join-Path $testRoot 'SAMPLE_MANGA\chapter-002' + [IO.Directory]::CreateDirectory($secondChapter) | Out-Null + [IO.File]::WriteAllText((Join-Path $secondChapter 'chapter.json'), '{"title":"Особая глава"}', [Text.UTF8Encoding]::new($false)) + Reindex + $library = Load-Library + Assert-True ($library.series[0].chapters.Count -eq 2 -and $library.series[0].chapters[1].title -eq 'Особая глава') 'New chapter and custom title must be indexed' + $before = [IO.File]::ReadAllText((Join-Path $testRoot 'library.json')) + [IO.Directory]::CreateDirectory((Join-Path $testRoot 'SAMPLE_MANGA\chapter-1')) | Out-Null + $failed = $false + try { Reindex } catch { $failed = $true } + Assert-True $failed 'Duplicate chapter number must fail' + Assert-True ([IO.File]::ReadAllText((Join-Path $testRoot 'library.json')) -eq $before) 'Failed indexing must preserve the previous manifest' + Write-Host 'PASS: content indexing, numeric sorting, 16-page validation, duplicates, missing/extra/empty pages, custom chapters and atomic manifest.' +} finally { + $resolvedTestRoot = [IO.Path]::GetFullPath($testRoot) + if (-not $resolvedTestRoot.StartsWith((Join-Path $tempBase 'mangabom-tests-'), [StringComparison]::OrdinalIgnoreCase)) { throw 'Unsafe test cleanup path' } + if (Test-Path -LiteralPath $resolvedTestRoot) { Remove-Item -LiteralPath $resolvedTestRoot -Recurse -Force } +} +$node = Get-Command node -ErrorAction SilentlyContinue +if ($node) { $nodePath = $node.Source } else { + $nodePath = Join-Path $env:LOCALAPPDATA 'Programs\Microsoft VS Code\Code.exe' + if (-not (Test-Path -LiteralPath $nodePath)) { throw 'Node.js or VS Code is required for JavaScript tests.' } + $env:ELECTRON_RUN_AS_NODE = '1' + if ($projectRoot.StartsWith('\\')) { $env:NODE_UNC_HOST_ALLOWLIST = ($projectRoot -split '\\')[2].ToLowerInvariant() } +} +& $nodePath (Join-Path $PSScriptRoot 'test-reader.cjs') 2>&1 | Out-Host +if ($LASTEXITCODE -ne 0) { throw 'JavaScript reader tests failed' } +$dist = Join-Path $projectRoot 'dist' +foreach ($page in (Get-ChildItem -LiteralPath $dist -Filter '*.html' -File)) { + $html = [IO.File]::ReadAllText($page.FullName) + if ($html.Contains('http-equiv="refresh"')) { continue } + Assert-True ($html.Contains('src="theme.js"' ) -and $html.Contains('href="theme.css"')) ('Missing theme: ' + $page.Name) + foreach ($match in [regex]::Matches($html, '(?:href|src)="([^"]+)"')) { + $target = ([Net.WebUtility]::HtmlDecode($match.Groups[1].Value) -split '[#?]')[0] + if (-not $target -or $target -match '^(https?:|data:|mailto:|tel:|/)') { continue } + Assert-True (Test-Path -LiteralPath (Join-Path $dist $target)) ('Missing local target: ' + $page.Name + ' -> ' + $target) + } +} +Write-Host 'PASS: all HTML references resolve; every page includes the shared theme.' \ No newline at end of file diff --git a/scripts/test-server.cjs b/scripts/test-server.cjs new file mode 100644 index 0000000..b939a78 --- /dev/null +++ b/scripts/test-server.cjs @@ -0,0 +1,52 @@ +'use strict'; +const assert = require('node:assert/strict'); +const fs = require('node:fs/promises'); +const os = require('node:os'); +const path = require('node:path'); +const { buildLibrary, createServer } = require('../deploy/library-server.cjs'); +(async () => { + const root = await fs.mkdtemp(path.join(os.tmpdir(), 'mangabom-server-test-')); + let server; + try { + const folder = path.join(root, 'LORD_OF_CHEAP_LUNCH'); + const chapter = path.join(folder, 'chapter-001'); + await fs.mkdir(chapter, { recursive: true }); + await fs.writeFile(path.join(folder, 'series.json'), JSON.stringify({ id: 'food', title: 'Повелитель дешёвого обеда' })); + let library = await buildLibrary(root); + assert.equal(library.series[0].id, 'food'); assert.equal(library.series[0].folder, 'LORD_OF_CHEAP_LUNCH'); assert.equal(library.series[0].chapters[0].ready, false); + server = createServer(root); + await new Promise(resolve => server.listen(0, '127.0.0.1', resolve)); + const base = 'http://127.0.0.1:' + server.address().port; + assert.equal((await fetch(base + '/healthz')).status, 200); + for (let i = 1; i <= 15; i++) await fs.writeFile(path.join(chapter, String(i).padStart(2, '0') + '.png'), Buffer.from([137,80,78,71])); + assert.equal((await (await fetch(base + '/library.json')).json()).series[0].chapters[0].ready, false); + await fs.writeFile(path.join(chapter, '016.PNG'), Buffer.from([137,80,78,71])); + library = await (await fetch(base + '/library.json')).json(); + assert.equal(library.series[0].chapters[0].ready, true); + assert.equal(library.series[0].chapters[0].pages.length, 16); + assert.equal(library.series[0].chapters[0].pages[9].src, 'manga/LORD_OF_CHEAP_LUNCH/chapter-001/10.png'); + assert.equal(library.series[0].chapters[0].pages[15].src, 'manga/LORD_OF_CHEAP_LUNCH/chapter-001/016.PNG'); + assert.equal((await (await fetch(base + '/library.json')).json()).generatedAt, library.generatedAt); + const head = await fetch(base + '/library.json', { method: 'HEAD' }); assert.equal(head.status, 200); assert.equal(await head.text(), ''); + assert.equal((await fetch(base + '/library.json', { method: 'POST' })).status, 405); + assert.equal((await fetch(base + '/anything-else')).status, 404); + await fs.writeFile(path.join(chapter, '1.jpg'), Buffer.from([1])); + assert.equal((await (await fetch(base + '/library.json')).json()).series[0].chapters[0].ready, false); + await fs.unlink(path.join(chapter, '1.jpg')); + await fs.writeFile(path.join(chapter, 'page-17.png'), Buffer.from([1])); + assert.equal((await buildLibrary(root)).series[0].chapters[0].ready, false); + await fs.unlink(path.join(chapter, 'page-17.png')); + const second = path.join(folder, 'chapter-002'); await fs.mkdir(second); await fs.writeFile(path.join(second, 'chapter.json'), JSON.stringify({ title: 'Продолжение' })); + assert.equal((await (await fetch(base + '/library.json')).json()).series[0].chapters[1].title, 'Продолжение'); + const currentRoot = path.join(__dirname, '../dist/manga'); + const live = await buildLibrary(currentRoot); + const existing = JSON.parse(await fs.readFile(path.join(currentRoot, 'library.json'), 'utf8')); + assert.deepEqual(live.series, existing.series, 'Server catalogue must match the existing Windows catalogue'); + assert.equal(live.series.find(item => item.id === 'food').chapters[0].ready, true); + console.log('PASS: server-side auto-indexing, real 16-page chapter, stable catalogue, HTTP methods, numeric sorting, duplicates and custom chapters.'); + } finally { + if (server) await new Promise(resolve => server.close(resolve)); + if (!path.resolve(root).startsWith(path.resolve(os.tmpdir()) + path.sep + 'mangabom-server-test-')) throw Error('Unsafe cleanup path'); + await fs.rm(root, { recursive: true, force: true }); + } +})().catch(error => { console.error(error); process.exitCode = 1; }); \ No newline at end of file diff --git a/scripts/test-support.cjs b/scripts/test-support.cjs new file mode 100644 index 0000000..b488685 --- /dev/null +++ b/scripts/test-support.cjs @@ -0,0 +1,17 @@ +const fs=require('node:fs');const path=require('node:path');const vm=require('node:vm');const assert=require('node:assert/strict'); +const root=path.resolve(__dirname,'..'); +for(const file of fs.readdirSync(path.join(root,'dist')).filter(name=>name.endsWith('.js')))new vm.Script(fs.readFileSync(path.join(root,'dist',file),'utf8'),{filename:file}); +function setup(saved){ + const memory=new Map(saved?[['mangabom.billing',JSON.stringify(saved)]]:[]); + const el=(dataset={})=>({dataset,textContent:'',events:{},attributes:{},setAttribute(k,v){this.attributes[k]=v},addEventListener(k,fn){this.events[k]=fn}}); + const choices=[el({billing:'month'}),el({billing:'year'})],prices=[el({planPrice:'99'}),el({planPrice:'399'})],periods=[el(),el()],plans=[el({plan:'MANGABOM+',monthly:'99'}),el({plan:'Коллекционер',monthly:'399'})],note=el(),status=el(); + const document={querySelectorAll:s=>({'[data-billing]':choices,'[data-plan-price]':prices,'[data-plan-period]':periods,'[data-plan]':plans}[s]||[]),querySelector:s=>({'#billing-note':note,'#plan-status':status}[s])}; + vm.runInNewContext(fs.readFileSync(path.join(root,'dist/support.js'),'utf8'),{document,Intl,localStorage:{getItem:k=>memory.get(k)||null,setItem:(k,v)=>memory.set(k,v)}}); + return{choices,prices,periods,plans,note,status,memory}; +} +let app=setup();assert.deepEqual(app.prices.map(x=>x.textContent),['99','399']);assert.equal(app.choices[0].attributes['aria-pressed'],'true'); +app.choices[1].events.click();assert.deepEqual(app.prices.map(x=>x.textContent.replace(/\s/g,'')),['986,04','3974,04']);assert.equal(app.periods[0].textContent,'в год');assert.equal(JSON.parse(app.memory.get('mangabom.billing')),'year'); +app.plans[0].events.click();assert.match(app.status.textContent,/986,04/);assert.match(app.status.textContent,/недоступно/); +app.choices[0].events.click();assert.deepEqual(app.prices.map(x=>x.textContent),['99','399']);assert.equal(app.status.textContent,''); +app=setup('year');assert.equal(app.choices[1].attributes['aria-pressed'],'true');assert.equal(app.prices[0].textContent,'986,04'); +console.log('PASS: exact 17% annual discount, shared monthly/yearly switch, saved choice, honest plan preview and all JavaScript syntax.'); \ No newline at end of file diff --git a/start-local.cmd b/start-local.cmd new file mode 100644 index 0000000..28d0d84 --- /dev/null +++ b/start-local.cmd @@ -0,0 +1,3 @@ +@echo off +powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0scripts\local-server.ps1" -Action Start +if errorlevel 1 pause diff --git a/start-server.sh b/start-server.sh new file mode 100644 index 0000000..9196e05 --- /dev/null +++ b/start-server.sh @@ -0,0 +1,60 @@ +#!/bin/sh +set -eu +cd -- "$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)" + +if ! command -v docker >/dev/null 2>&1; then + echo "Docker is not installed. Enable Docker/Compose on OMV, then run this command again." >&2 + exit 1 +fi +USE_SUDO=0 +if ! docker info >/dev/null 2>&1; then + if command -v sudo >/dev/null 2>&1; then + echo "Docker access requires administrator permissions. Enter the server password in this terminal if prompted." + sudo docker info >/dev/null + USE_SUDO=1 + else + echo "Docker is unavailable. Run this script as a user with Docker access." >&2 + exit 1 + fi +fi +compose() { + if [ "$USE_SUDO" = 1 ]; then + sudo docker compose -f compose.server.yaml "$@" + else + docker compose -f compose.server.yaml "$@" + fi +} +compose version >/dev/null +MODE="${1:---public}" +case "$MODE" in + --public) PROFILE=public ;; + --lan) PROFILE=local ;; + *) echo "Usage: sh start-server.sh [--public|--lan]" >&2; exit 1 ;; +esac + +compose config --quiet +if [ "$PROFILE" = public ]; then + compose --profile public up -d --pull always +else + compose --profile public stop public + compose up -d --pull always web library +fi +compose ps +printf '\nSite on the server: http://192.168.0.181:8080/\n' +if [ "$PROFILE" = public ]; then + echo "Waiting for the public HTTPS address..." + attempt=0 + while [ "$attempt" -lt 30 ]; do + public_url="$(compose logs --no-color --tail=100 public 2>/dev/null | grep -Eo 'https://[a-z0-9-]+\.trycloudflare\.com' | tail -n 1 || true)" + if [ -n "$public_url" ]; then + printf '\nPUBLIC SITE: %s\n' "$public_url" + echo "Anyone can open this address. It changes when the tunnel restarts." + echo "Keep the OMV server running; this SSH terminal may be closed." + exit 0 + fi + attempt=$((attempt + 1)) + sleep 2 + done + echo "No public address yet. Inspect: docker compose -f compose.server.yaml --profile public logs --tail=100 public" >&2 + exit 1 +fi \ No newline at end of file diff --git a/stop-local.cmd b/stop-local.cmd new file mode 100644 index 0000000..f3d06d1 --- /dev/null +++ b/stop-local.cmd @@ -0,0 +1,3 @@ +@echo off +powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0scripts\local-server.ps1" -Action Stop +if errorlevel 1 pause diff --git a/update-library.cmd b/update-library.cmd new file mode 100644 index 0000000..afdb3c9 --- /dev/null +++ b/update-library.cmd @@ -0,0 +1,3 @@ +@echo off +powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0scripts\index-manga.ps1" +if errorlevel 1 pause