Add Quarto HTML+Typst business report templates.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
53
templates/typst/page.typ
Normal file
53
templates/typst/page.typ
Normal file
@@ -0,0 +1,53 @@
|
||||
#set page(
|
||||
paper: $if(papersize)$"$papersize$"$else$"a4"$endif$,
|
||||
$if(margin)$
|
||||
margin: ($for(margin/pairs)$$margin.key$: $margin.value$,$endfor$),
|
||||
$else$
|
||||
margin: (left: 2cm, right: 2cm, top: 2.5cm, bottom: 2.5cm),
|
||||
$endif$
|
||||
numbering: $if(page-numbering)$"$page-numbering$"$else$"۱"$endif$,
|
||||
header: context {
|
||||
if counter(page).get().first() > 1 [
|
||||
#set text(size: 11pt)
|
||||
#grid(
|
||||
columns: (auto, 1fr, auto),
|
||||
gutter: 8pt,
|
||||
align: (right, right, left),
|
||||
$if(logofile)$
|
||||
image("$logofile$", height: 16pt),
|
||||
$endif$
|
||||
$if(company)$
|
||||
[#h(6pt)$company$$if(subtitle)$ | $subtitle$$endif$],
|
||||
$else$
|
||||
[],
|
||||
$endif$
|
||||
[],
|
||||
)
|
||||
#line(length: 100%, stroke: 0.5pt)
|
||||
]
|
||||
},
|
||||
background: place(
|
||||
dx: -64%,
|
||||
dy: 73%,
|
||||
rotate(
|
||||
-90deg,
|
||||
{
|
||||
set text(size: 13pt$if(sidebarfont)$, font: ("$sidebarfont$",)$endif$)
|
||||
grid(
|
||||
columns: (30%, 30%, 5%),
|
||||
rows: 20pt,
|
||||
align: top,
|
||||
[#h(1fr) $if(title)$$title$$endif$ $if(destinations)$$for(destinations)$$destinations$$sep$ - $endfor$$endif$ #h(5fr)],
|
||||
[#h(1fr) $if(by-author)$$for(by-author)$$it.name.literal$$sep$ - $endfor$$endif$ #h(4fr)],
|
||||
grid.cell(
|
||||
fill: black,
|
||||
align: center,
|
||||
stroke: 1pt,
|
||||
text(fill: white, context counter(page).display("۱/۱", both: true)),
|
||||
),
|
||||
grid.hline(start: 0),
|
||||
)
|
||||
},
|
||||
),
|
||||
),
|
||||
)
|
||||
Reference in New Issue
Block a user