18 lines
3.8 KiB
Python
18 lines
3.8 KiB
Python
from pathlib import Path
|
|
import base64,hashlib,html,json
|
|
|
|
here=Path(__file__).resolve().parent
|
|
designs=json.loads((here/'concepts.json').read_text(encoding='utf-8'))
|
|
cards=[]
|
|
for i,d in enumerate(designs,1):
|
|
slug=d['slug'];png=here/(slug+'.png');picture='data:image/png;base64,'+base64.b64encode(png.read_bytes()).decode()
|
|
cards.append(f'<article><div class="heading"><span class="number">{i}</span><h2>{html.escape(d["name"])}</h2></div><a href="{slug}.html" aria-label="Open {d["name"]}"><img src="{picture}" alt="{d["name"]} full desktop mockup"></a><p>{html.escape(d["description"])}</p><div class="links"><a href="{slug}.html">Open standalone mockup ↗</a><a href="{slug}.png">Full-size image ↗</a></div></article>')
|
|
page='''<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>AstroFrame design concepts</title><style>
|
|
*{box-sizing:border-box}body{margin:0;background:#141414;color:#e9e6df;font-family:'Segoe UI',Arial,sans-serif;padding:40px;line-height:1.5}main{max-width:1800px;margin:auto}header{margin-bottom:32px;display:flex;justify-content:space-between;align-items:end;gap:24px}h1{font-size:28px;margin:0;font-weight:500}header p{color:#a5a19a;font-size:14px;margin:8px 0 0}.tag{color:#bbb4a6;border:1px solid #49453e;padding:6px 12px;border-radius:3px;white-space:nowrap;font-size:12px}.grid{display:grid;grid-template-columns:1fr 1fr;gap:30px}article{min-width:0}.heading{display:flex;align-items:center;gap:10px;margin-bottom:12px}h2{font-size:18px;font-weight:500;margin:0}.number{color:#c9b79d;font-size:12px;border:1px solid #5a4e3d;border-radius:3px;display:grid;place-items:center;width:25px;height:25px}img{width:100%;display:block;border:1px solid #3e3b36;border-radius:4px}a{color:#d1bea3;text-decoration:none}a:hover{text-decoration:underline}article p{font-size:13px;color:#aaa59b;margin:10px 0}.links{display:flex;justify-content:space-between;font-size:12px;margin-top:12px}.notes{align-self:center;padding:34px;border-left:1px solid #494238}.notes h2{margin-bottom:12px}.notes p{font-size:14px;margin:8px 0;color:#b7b1a6}.notes a{font-size:13px}footer{margin-top:40px;color:#878279;font-size:12px}@media(max-width:1000px){.grid{grid-template-columns:1fr}.notes{border-left:0;border-top:1px solid #494238}body{padding:22px}header{display:block}.tag{display:inline-block;margin-top:14px}}
|
|
</style></head><body><main><header><div><h1>AstroFrame · five design directions</h1><p>The same real exposure and session data in every mockup. Open a design to see it at full size.</p></div><span class="tag">Standalone concepts · application untouched</span></header><div class="grid">'''+''.join(cards)+'''<section class="notes"><h2>What changes between designs</h2><p>Color, layout, session navigation, data density, and placement of the preview and decision evidence.</p><p>Each has one selectable graph, a photographic space header, a fully visible stretch control, and no Inspect stars button.</p><p>These are visual concepts. No analysis, export, or review actions are connected.</p><a href="README.md">Design notes and image provenance ↗</a></section></div><footer>Frame preview and measurements: supplied Seestar dataset. Decorative header: generated concept asset, not scientific data.</footer></main></body></html>'''
|
|
(here/'index.html').write_text(page,encoding='utf-8')
|
|
baseline=json.loads((here/'unchanged-baseline.json').read_text())
|
|
changed=[p for p,digest in baseline.items() if hashlib.sha256((here.parent/p).read_bytes()).hexdigest()!=digest]
|
|
assert not changed,changed
|
|
(here/'application-unchanged.json').write_text(json.dumps({'checkedFiles':len(baseline),'changedFiles':changed,'scope':'App source, Windows executable and DLL, and both saved projects.'},indent=2)+'\n')
|
|
print('Gallery created. Application and saved-project hashes match the baseline.')
|