fix: align HTML sheet with printed layout
This commit is contained in:
@@ -2885,7 +2885,7 @@ def render_main_html(data: dict) -> str:
|
||||
*{box-sizing:border-box} html{scroll-behavior:smooth} body{margin:0;background:var(--desk);color:var(--ink);font-family:Georgia,"Times New Roman",serif;line-height:1.42}
|
||||
.topbar{position:sticky;top:0;z-index:20;background:rgba(245,245,245,.94);border-bottom:1px solid #d0d0d0;padding:8px 14px;font-family:system-ui,-apple-system,Segoe UI,sans-serif}
|
||||
.topbar details{max-width:1120px;margin:0 auto}.topbar summary{cursor:pointer;font-weight:650}.toc-links{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.toc-links a{font-size:13px;color:#333;text-decoration:none;border:1px solid #ccc;background:white;border-radius:4px;padding:3px 7px}
|
||||
.paper{padding:18px 12px 44px;overflow-x:auto}.sheet{width:210mm;min-height:297mm;margin:0 auto 18px;background:var(--paper);box-shadow:0 2px 12px rgba(0,0,0,.13);display:grid;grid-template-columns:22mm minmax(0,1fr) 22mm;column-gap:4mm;align-content:start;padding:13mm 21.5mm 11mm}.resource-header-enabled .sheet{padding-top:9mm;row-gap:6mm}
|
||||
.paper{padding:18px 12px 44px;overflow-x:auto}.sheet{width:210mm;min-height:297mm;margin:0 auto 18px;background:var(--paper);box-shadow:0 2px 12px rgba(0,0,0,.13);display:grid;grid-template-columns:22mm minmax(0,1fr) 22mm;column-gap:4mm;align-content:start;padding:13mm 21.5mm 11mm}.resource-header-enabled .sheet{padding-top:5mm;row-gap:0}
|
||||
.pdf-main{min-width:0}.running-header{display:flex;justify-content:space-between;gap:18px;align-items:flex-end;border-bottom:1px solid #111;padding-bottom:3px;margin-bottom:26px;font-size:15px}.running-header span{white-space:nowrap}
|
||||
.hero h1{font-size:24px;line-height:1.15;margin:0 0 4px;border-bottom:1px solid #111;padding-bottom:4px}.hero .byline{float:right;margin-top:-31px;font-size:15px}
|
||||
.meta{clear:both;display:grid;grid-template-columns:148px minmax(0,1fr);gap:4px 18px;padding:34px 0 24px;border-bottom:1px solid #111;font-size:17px}.meta dt{color:#333}.meta dd{margin:0;font-family:"Latin Modern Mono",ui-monospace,SFMono-Regular,Consolas,monospace}
|
||||
@@ -3244,6 +3244,7 @@ def render_page_header_html(data: dict, page: int, total: int) -> str:
|
||||
f'{datum("Poziom", card.get("level", ""), "resource-level")}'
|
||||
'</div>'
|
||||
'<div class="resource-urls">'
|
||||
f'{source_link}'
|
||||
f'<a class="resource-url" href="{html_escape(url)}"><span>HTML</span>{html_escape(url or "brak URL")}</a>'
|
||||
'</div>'
|
||||
'</div>'
|
||||
@@ -3252,10 +3253,9 @@ def render_page_header_html(data: dict, page: int, total: int) -> str:
|
||||
f'{datum("Status", card.get("status", ""))}'
|
||||
f'{datum("Karta", card_number)}'
|
||||
f'{datum("Wersja", card.get("version", ""))}'
|
||||
f'{datum("Arkusz", sheet_number)}'
|
||||
f'{datum("Autor", card.get("author", ""))}'
|
||||
f'{datum("Arkusz", sheet_number)}'
|
||||
f'{datum("UUID", card.get("uuid", ""), "resource-uuid")}'
|
||||
f'{source_link}'
|
||||
'</div>'
|
||||
f'{page_qr_html}'
|
||||
'</header>'
|
||||
@@ -3266,7 +3266,7 @@ def page_resource_header_css() -> str:
|
||||
return r"""
|
||||
.page-resource-header{grid-column:1/-1;width:100%;height:30mm;min-height:30mm;max-height:30mm;border:1px solid #1c1c1a;display:grid;grid-template-columns:minmax(0,1fr) 47mm 24mm;background:#fff;color:#111;overflow:hidden;font-family:system-ui,-apple-system,"Segoe UI",sans-serif;line-height:1.12}.page-resource-header--dual{grid-template-columns:24mm minmax(0,1fr) 39mm 24mm}
|
||||
.resource-qr{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.35mm;border-right:1px solid #aaa;padding:.65mm .8mm;color:#555;text-decoration:none;font-size:7px}.resource-qr-page{border-right:0}.resource-qr .title-qr{display:block;width:22mm;height:22mm;max-width:22mm;max-height:22mm;flex:none}.resource-qr-label{font:700 5px/1 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.08em;color:#444}.resource-qr-empty{text-align:center}.resource-qr-empty span,.resource-qr-empty strong{display:block;font:600 5.5px/1.15 ui-monospace,SFMono-Regular,Consolas,monospace}
|
||||
.resource-primary{min-width:0;display:grid;grid-template-rows:auto 1fr auto;padding:.9mm 1.5mm;border-right:1px solid #aaa}.resource-title{display:grid;grid-template-rows:auto auto;border-bottom:1px solid #ddd;padding-bottom:.45mm;min-width:0}.resource-title span{font:600 5.2px/1.05 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.06em;color:#555;white-space:nowrap}.resource-title strong{font:700 10px/1.05 Georgia,"Times New Roman",serif;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}.resource-details{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-content:center;column-gap:2mm;row-gap:.3mm;min-width:0}.resource-datum{display:grid;grid-template-columns:auto minmax(0,1fr);gap:.8mm;align-items:baseline;min-width:0}.resource-datum span{font:500 5.5px/1.05 ui-monospace,SFMono-Regular,Consolas,monospace;text-transform:uppercase;color:#666;white-space:nowrap}.resource-datum strong{font:600 6.8px/1.08 ui-monospace,SFMono-Regular,Consolas,monospace;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.resource-level{grid-column:1/-1}.resource-url{font:500 5.2px/1.05 ui-monospace,SFMono-Regular,Consolas,monospace;color:#222;text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-top:1px solid #eee;padding-top:.4mm}.resource-urls{min-width:0}.resource-url{display:block}.resource-url span{display:inline-block;width:8mm;font-weight:700;color:#666}.resource-meta{padding:.8mm 1.1mm;border-right:1px solid #aaa;display:grid;grid-template-columns:1fr 1fr;gap:.3mm 1mm;align-content:center;min-width:0}.resource-meta .resource-datum{display:block}.resource-meta .resource-datum span,.resource-meta .resource-datum strong{display:block}.resource-meta .resource-datum strong{font-size:6.2px}.resource-meta .resource-uuid{grid-column:1/-1;border-top:1px solid #ddd;padding-top:.35mm}.resource-meta .resource-uuid strong{font-size:4.9px;overflow-wrap:anywhere;white-space:normal}.resource-meta .resource-repository-url{grid-column:1/-1;font-size:4.2px;line-height:1.05;white-space:normal;overflow-wrap:anywhere;max-height:2.4em}.resource-meta .resource-repository-url span{width:7mm}
|
||||
.resource-primary{min-width:0;display:flex;flex-direction:column;justify-content:center;padding:1mm;border-right:1px solid #aaa;font:600 5.3px/1.2 ui-monospace,SFMono-Regular,Consolas,monospace}.resource-title{display:flex;flex-direction:column;min-width:0}.resource-title span,.resource-title strong{font:inherit;color:#111;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.resource-details{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.72fr);column-gap:1mm;min-width:0}.resource-datum{display:flex;gap:.7mm;align-items:baseline;min-width:0}.resource-datum span,.resource-datum strong{font:inherit;color:#111;white-space:nowrap}.resource-datum span{text-transform:uppercase}.resource-datum strong{overflow:hidden;text-overflow:ellipsis}.resource-details .resource-datum:nth-child(2)::before,.resource-meta .resource-datum:nth-child(2)::before,.resource-meta .resource-datum:nth-child(4)::before{content:"·"}.resource-details .resource-datum:nth-child(3),.resource-level{grid-column:1/-1}.resource-urls{min-width:0}.resource-url{display:block;font:inherit;color:#111;text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.resource-url span{display:inline-block;width:8mm;font-weight:inherit}.resource-meta{padding:1mm;border-right:1px solid #aaa;display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:.7mm;align-content:center;min-width:0;font:600 5.3px/1.2 ui-monospace,SFMono-Regular,Consolas,monospace}.resource-meta .resource-datum{font:inherit}.resource-meta .resource-datum:nth-child(n+5){grid-column:1/-1}.resource-meta .resource-uuid strong{font:inherit;overflow:visible;text-overflow:clip}.resource-repository-url{min-width:0}
|
||||
"""
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user