-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlib.typ
More file actions
73 lines (67 loc) · 1.63 KB
/
lib.typ
File metadata and controls
73 lines (67 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#let cheatsheet(
title: "",
logo_source: "",
docs: none,
version: "",
updated: none,
body,
) = {
set document(title: title)
set text(font: "Inter")
set page(
paper: "us-letter",
flipped: true,
margin: 0.5in,
columns: 3,
footer: grid(
columns: (1fr, auto),
align: (left + bottom, right + bottom),
image("assets/columnar.svg", height: 10pt),
[
#set text(size: 6pt)
© 2025 Columnar Technologies Inc.
• #link("https://creativecommons.org/licenses/by-sa/4.0/")[CC BY-SA 4.0]
• #link("https://columnar.tech/")[columnar.tech]
• Learn more at #docs
• #version
• Updated: #updated.display("[year]-[month]")
],
),
)
show heading: it => {
line(length: 100%, stroke: 1pt + gray)
text(weight: "medium")[#it.body]
}
let code_background = luma(240)
show raw: set text(font: "JetBrains Mono")
show raw.where(block: false): box.with(
fill: code_background,
inset: (x: 3pt, y: 0pt),
outset: (y: 3pt),
radius: 2pt,
)
show raw.where(block: true, lang: "console"): it => block(
fill: code_background,
inset: 6pt,
radius: 2pt,
width: 100%,
[#text(fill: code_background.darken(33%))[\$] #it.text],
)
place(
top,
float: true,
scope: "parent",
clearance: 1.5em,
{
let text_size = 20pt
set text(size: text_size)
grid(
columns: (1fr, auto),
align: (left, right),
text(weight: "light")[#title : : ] + text(size: 0.8em, weight: "medium")[CHEATSHEET],
image(logo_source, height: text_size),
)
},
)
body
}