Files
FastD e352335822 Filter bar with hover layer, icon-only project links, design reports
Filters: the panel is a bar (status segment, always visible) plus a body that lives as a layer
under it - collapsed by default, expands on hover/focus/tap and never moves the case grid; the
reset control appears only when a facet is limited; width capped at 720px (measured 45px slack
against 477px before). Facet research report is included.

Links: project links in the mini card and in the project window are icon-only buttons with a
uniform slot (16px card / 18px window) and the accessible name in aria-label; studio contacts
(mail, VK, RuStore) live outside the cards.

Team and page: real photos from the public TITANS team page go to the member window while the
card keeps the mascot; the portfolio gains the First Step Radio card and genre values, the
process block became an individual-approach section, plus a cookie bar and a removable ticker.

Design folders under design/ keep reports, measurements, scripts and the .pen; probe and
before/after screenshot dumps, editor backups and caches are removed. Background-variant and
palette previews stay until the client picks one.
2026-10-15 05:50:52 +03:00

44 lines
2.3 KiB
Python

"""Выравнивание сериализации .pen под исходный формат файлов Pencil.
Pencil держит канон с отступом 2 и переводом строк CRLF, а снимок design/ — компактным (без пробелов).
Сравнение идёт ПО БАЙТАМ, а не по нормализованному тексту: иначе CRLF/LF не различить.
Доказательство формата: сериализация БЭКАПА в найденном формате должна совпасть с бэкапом байт-в-байт.
Затем тот же формат применяется к отпатченному файлу.
Запуск: py design/brand-marks-2026-10-14/normalize-pen-format.py
"""
import json
from pathlib import Path
ROOT = Path("G:/Project/Haevey_Monster_Team_Page")
STAMP = "bak-brandmarks-20261014"
TARGETS = [(ROOT / "Harvey_Monster_Team_Page.pen", " ", "\r\n"), # канон: indent 2 + CRLF
(ROOT / "design" / "Harvey_Monster_Team_Page.pen", None, "")] # снимок: компакт, без переводов
def dump(doc, indent, eol):
text = json.dumps(doc, ensure_ascii=False, indent=indent,
separators=None if indent else (",", ":"))
return (text if not indent else text.replace("\n", eol)).encode("utf-8")
for path, indent, eol in TARGETS:
bak = path.with_suffix(".pen." + STAMP)
raw_bak = bak.read_bytes()
probes = {"indent=2+CRLF": dump(json.loads(raw_bak), " ", "\r\n"),
"indent=2+LF": dump(json.loads(raw_bak), " ", "\n"),
"compact": dump(json.loads(raw_bak), None, "")}
match = [k for k, v in probes.items() if v == raw_bak]
print("===", path.parent.name + "/" + path.name, "| формат бэкапа:", match or list(probes.keys()))
if not match:
print(" размеры: бэкап", len(raw_bak), {k: len(v) for k, v in probes.items()})
continue
cur = path.read_bytes()
want = dump(json.loads(cur), indent, eol)
if cur != want:
path.write_bytes(want)
print(" перезаписано:", len(cur), "→", len(want), "байт, CRLF", want.count(b"\r\n"))
else:
print(" формат уже совпадает:", len(cur), "байт, CRLF", cur.count(b"\r\n"))