Skip to content

Commit 6daabdc

Browse files
committed
✨ Start the components
1 parent fc63051 commit 6daabdc

File tree

4 files changed

+55
-17
lines changed

4 files changed

+55
-17
lines changed
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#let glossary() = {}

themes/hereford/components/toc.typ

+24-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1-
#let toc() = {
1+
#import "/utils.typ"
22

3-
}
3+
#let toc() = utils.print-toc((_, body, _) => {
4+
set align(center)
5+
let line = table.vline(stroke: gray)
6+
table(
7+
stroke: none,
8+
columns: (1fr, 1fr, 2fr, 1fr), [*Page \#*],
9+
line,
10+
[*EDP Step*],
11+
line,
12+
[*Entry Description*],
13+
line,
14+
[*Date*],
15+
line,
16+
..for entry in body {
17+
(
18+
[#entry.page-number],
19+
[#entry.type],
20+
[#entry.title],
21+
[#entry.date.display("[month]/[day]/[year]")],
22+
)
23+
},
24+
)
25+
})

themes/hereford/entries.typ

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#import "./colors.typ": *
2+
#import "./format.typ": format-heading
23

34
#let entry-type-metadata = (
45
identify: (
@@ -49,6 +50,7 @@
4950
ctx: (:),
5051
body,
5152
) = {
53+
show heading: it => format-heading(it, surface-0)
5254
show: page.with(
5355
margin: (
5456
top: 5em,
@@ -88,6 +90,7 @@
8890
body,
8991
) = {
9092
let metadata = entry-type-metadata.at(ctx.type)
93+
show heading: it => format-heading(it, metadata.color.lighten(60%))
9194
show: page.with(
9295
header: {
9396
// background bar

themes/hereford/format.typ

+27-15
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,29 @@
1-
#let rules(
2-
doc,
3-
) = {
4-
set page(
5-
"us-letter",
6-
margin: (
7-
top: 2cm,
8-
x: 1.5cm,
9-
bottom: 1.5cm,
10-
),
11-
)
12-
set text(
13-
font: "Roboto",
14-
size: 11pt,
15-
)
1+
#import "./colors.typ": *
2+
3+
#let format-heading(it, color) = {
4+
//repr(it)
5+
6+
if it.level == 1 {
7+
set text(size: 13pt)
8+
set block(spacing: 1em)
9+
block(
10+
radius: 0.3em,
11+
outset: 7pt,
12+
width: 100%,
13+
fill: color,
14+
it.body
15+
)
16+
} else {
17+
set text(size: 12pt)
18+
it
19+
}
20+
21+
}
22+
23+
#let rules(doc) = {
24+
set page("us-letter", margin: (top: 2cm, x: 1.5cm, bottom: 1.5cm))
25+
set text(font: "Roboto", size: 11pt)
26+
//show heading: format-heading
27+
1628
doc
1729
}

0 commit comments

Comments
 (0)