Show shared title block on HTML and align PDF table chrome.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Print / PDF styles matching typst-templates product_test_template.typ */
|
||||
/* Print / PDF styles (WeasyPrint); table chrome matches HTML report.css */
|
||||
|
||||
@font-face {
|
||||
font-family: "IRNazanin";
|
||||
@@ -30,8 +30,9 @@
|
||||
|
||||
:root {
|
||||
--text: #000000;
|
||||
--header-fill: #ebebeb; /* ~luma(235) */
|
||||
--text2: #57606a;
|
||||
--stroke: #000000;
|
||||
--fill: #f6f8fa;
|
||||
}
|
||||
|
||||
@page {
|
||||
@@ -301,19 +302,22 @@ li {
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
/* ===== Tables (typst: 0.5pt stroke, header luma fill, content-sized) ===== */
|
||||
/* ===== Tables (rounded chrome like HTML; black stroke) ===== */
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-collapse: separate;
|
||||
border-spacing: 0;
|
||||
width: auto;
|
||||
max-width: 100%;
|
||||
margin: 10pt auto;
|
||||
border: 0.5pt solid var(--stroke);
|
||||
border: 1pt solid var(--stroke);
|
||||
border-radius: 8pt;
|
||||
overflow: hidden;
|
||||
font-size: 12.5pt;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
th, td {
|
||||
border: 0.5pt solid var(--stroke);
|
||||
border: none;
|
||||
padding: 7pt 8pt;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
@@ -321,9 +325,15 @@ th, td {
|
||||
|
||||
thead th,
|
||||
tr:first-child th {
|
||||
background: var(--header-fill);
|
||||
background: var(--fill);
|
||||
font-weight: bold;
|
||||
color: var(--text);
|
||||
color: var(--text2);
|
||||
border-bottom: 1pt solid var(--stroke);
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
tbody tr + tr td {
|
||||
border-top: 1pt solid var(--stroke);
|
||||
}
|
||||
|
||||
table [dir="ltr"],
|
||||
@@ -333,11 +343,11 @@ table .ltr {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/* Summary box */
|
||||
/* Summary box — same chrome as HTML (soft stroke) */
|
||||
.summary-box {
|
||||
border: 0.5pt solid #d0d7de;
|
||||
border: 1pt solid #d0d7de;
|
||||
border-radius: 8pt;
|
||||
background: #f6f8fa;
|
||||
background: var(--fill);
|
||||
padding: 10pt 12pt;
|
||||
margin: 10pt 0;
|
||||
page-break-inside: avoid;
|
||||
|
||||
@@ -41,24 +41,65 @@ h1, h2, h3 {
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
h1.title {
|
||||
font-size: 1.75rem;
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
font-size: 1.1rem;
|
||||
color: #444;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
/* Quarto default title — replaced by .print-title-block (same as PDF) */
|
||||
#title-block-header,
|
||||
header#title-block-header,
|
||||
.quarto-title-block,
|
||||
.quarto-title,
|
||||
.quarto-title-meta,
|
||||
.quarto-title-meta-contents,
|
||||
header.quarto-title-block,
|
||||
h1.title,
|
||||
p.subtitle,
|
||||
p.author,
|
||||
.quarto-title-meta-author {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Screen header — same markup/layout as PDF .print-title-block */
|
||||
.print-title-block {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
width: 100%;
|
||||
margin: 0 0 1.5rem 0;
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
.print-title-block .title-text {
|
||||
direction: rtl;
|
||||
text-align: right;
|
||||
line-height: 1.15;
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
.print-title-block .company-line {
|
||||
font-size: 1.75rem;
|
||||
font-weight: bold;
|
||||
margin: 0;
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.print-title-block .company-line .subtitle {
|
||||
display: inline;
|
||||
font-size: 1.15rem;
|
||||
font-weight: normal;
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.print-title-block .report-title {
|
||||
font-size: 1.15rem;
|
||||
font-weight: bold;
|
||||
margin: 0.2rem 0 0 0;
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.print-title-block .logo {
|
||||
height: 3.4rem;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.report-meta {
|
||||
margin: 1.5rem 0;
|
||||
padding: 1rem 1.25rem;
|
||||
@@ -144,8 +185,10 @@ code {
|
||||
unicode-bidi: embed;
|
||||
}
|
||||
|
||||
/* Print chrome is injected for WeasyPrint PDF; hide on screen */
|
||||
/* Running header / sidebar are PDF-only; title block stays visible on screen */
|
||||
@media screen {
|
||||
.print-running-header,
|
||||
.print-sidebar,
|
||||
.print-only {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user