Skip to content

Commit

Permalink
🎨 Formatted
Browse files Browse the repository at this point in the history
  • Loading branch information
BattleCh1cken committed Jul 14, 2024
1 parent 3ab479a commit 54dc386
Show file tree
Hide file tree
Showing 12 changed files with 188 additions and 111 deletions.
45 changes: 24 additions & 21 deletions docs/src/reference.typ
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,30 @@
#let def-arg(term, t, default: none, description) = {
if type(t) == str {
t = t.replace("?", "|none")
t = `<` + t.split("|").map(s => {
if s == "b" {
`boolean`
} else if s == "s" {
`string`
} else if s == "i" {
`integer`
} else if s == "f" {
`float`
} else if s == "c" {
`coordinate`
} else if s == "d" {
`dictionary`
} else if s == "a" {
`array`
} else if s == "n" {
`number`
} else {
raw(s)
}
}).join(`|`) + `>`
t = `<` + t
.split("|")
.map(s => {
if s == "b" {
`boolean`
} else if s == "s" {
`string`
} else if s == "i" {
`integer`
} else if s == "f" {
`float`
} else if s == "c" {
`coordinate`
} else if s == "d" {
`dictionary`
} else if s == "a" {
`array`
} else if s == "n" {
`number`
} else {
raw(s)
}
})
.join(`|`) + `>`
}

stack(
Expand Down
2 changes: 1 addition & 1 deletion entries.typ
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
date: date,
author: author,
witness: witness,
participants: participants
participants: participants,
),
body: final-body,
))
Expand Down
3 changes: 1 addition & 2 deletions gallery/radial.typ
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@
#grid(
columns: (1fr, 1fr),
gutter: 20pt,
components.admonition(type: "warning")[#lorem(20)],
lorem(20),
components.admonition(type: "warning")[#lorem(20)], lorem(20),
)

]
Expand Down
12 changes: 7 additions & 5 deletions internals.typ
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
/// - theme (theme):
/// -> content
#let print-entries(theme: (:)) = {
let print-helper(section, state) = context {
for entry in state.final() {
let entry-func = theme.at(section + "-entry")
entry-func(entry.body, ctx: entry.ctx)
let print-helper(section, state) = (
context {
for entry in state.final() {
let entry-func = theme.at(section + "-entry")
entry-func(entry.body, ctx: entry.ctx)
}
}
}
)

print-helper("frontmatter", globals.frontmatter-entries)
print-helper("body", globals.entries)
Expand Down
31 changes: 16 additions & 15 deletions themes/default/components.typ
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,23 @@
stack(
spacing: 0.5em,
..for entry in appendix {
(
[
#entry.title
#box(
width: 1fr,
line(
length: 100%,
stroke: (
dash: "dotted",
(
[
#entry.title
#box(
width: 1fr,
line(
length: 100%,
stroke: (
dash: "dotted",
),
),
),
)
#entry.page-number
],
)
})
)
#entry.page-number
],
)
},
)
})

/// Prints out the glossary.
Expand Down
4 changes: 2 additions & 2 deletions themes/linear/components/pro-con.typ
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
center,
text(size: 14pt, weight: "semibold", [Cons]),
),
pros,
cons,

pros, cons,
)
})
1 change: 1 addition & 0 deletions themes/radial/components/pro-con.typ
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
fill: red,
radius: (top: 1.5pt),
)[*Cons*],

cell(
fill: green.lighten(80%),
radius: (bottom: 1.5pt),
Expand Down
3 changes: 1 addition & 2 deletions themes/radial/components/team.typ
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@
#grid(
columns: (1fr, 1fr),
gutter: 20pt,
align(center, member.picture),
align(left, member.about),
align(center, member.picture), align(left, member.about),
)
],
)
Expand Down
5 changes: 3 additions & 2 deletions themes/radial/components/tournament.typ
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
[
#alliance.teams.at(0) \
#alliance.teams.at(1) \
], [
],
[
#set text(size: 15pt)
#set align(horizon + center)
#alliance.score
],

)
]
}
Expand All @@ -60,6 +60,7 @@
header-cell[*Blue Alliance*],
header-cell[*Auton Bonus*],
header-cell(radius: (top-right: 1.5pt))[*AWP*],

cell[#match.match],
alliance-info(alliance: match.red-alliance),
alliance-info(alliance: match.blue-alliance),
Expand Down
138 changes: 101 additions & 37 deletions themes/radial/entries.typ
Original file line number Diff line number Diff line change
Expand Up @@ -6,55 +6,119 @@
#import "./metadata.typ": entry-type-metadata

// TODO: make an actual cover
#let cover = utils.make-cover(ctx =>{
import components: label
let label = label.with(size: 4.7em, radius: 6pt)

align(center + horizon, text(size: 24pt)[
Radial Theme
])

place(dx: 90pt, dy: -340pt, label("identify"))
place(dx: 52pt, dy: -295pt, label("brainstorm"))

place(dx: 520pt, dy: 190pt, label("decide"))
place(dx: 490pt, dy: 240pt, label("build"))
place(dx: 460pt, dy: 290pt, label("test"))

place(dx: 150pt, dy: -160pt, rect(width: 50%, height: 300pt, fill: rgb("#eeeeeeff"), radius: (right: 20pt, left: 20pt)))

place(dx: 125pt, dy: -180pt, label("management"))
place(dx: 425pt, dy: 105pt, label("management"))
#let cover = utils.make-cover(ctx => {
import components: label
let label = label.with(size: 4.7em, radius: 6pt)

align(
center + horizon,
text(size: 24pt)[
Radial Theme
],
)

place(dx: 520pt, dy: -270pt, rect(width: 9%, height: 55pt, fill: rgb("#eeeeeeff"), radius: (right: 5pt, left: 5pt)))
place(dx: 455pt, dy: -335pt, rect(width: 9%, height: 55pt, fill: rgb("#eeeeeeff"), radius: (right: 5pt, left: 5pt)))
place(dx: 490pt, dy: -300pt, label("program"))
place(dx: 90pt, dy: -340pt, label("identify"))
place(dx: 52pt, dy: -295pt, label("brainstorm"))

place(dx: 520pt, dy: 190pt, label("decide"))
place(dx: 490pt, dy: 240pt, label("build"))
place(dx: 460pt, dy: 290pt, label("test"))

place(
dx: 150pt,
dy: -160pt,
rect(
width: 50%,
height: 300pt,
fill: rgb("#eeeeeeff"),
radius: (right: 20pt, left: 20pt),
),
)

place(dx: 55pt, dy: 205pt, rect(width: 9%, height: 55pt, fill: rgb("#eeeeeeff"), radius: (right: 5pt, left: 5pt)))
place(dx: 120pt, dy: 275pt, rect(width: 9%, height: 55pt, fill: rgb("#eeeeeeff"), radius: (right: 5pt, left: 5pt)))
place(dx: 90pt, dy: 240pt, label("notebook"))
place(dx: 125pt, dy: -180pt, label("management"))
place(dx: 425pt, dy: 105pt, label("management"))

place(
dx: 520pt,
dy: -270pt,
rect(
width: 9%,
height: 55pt,
fill: rgb("#eeeeeeff"),
radius: (right: 5pt, left: 5pt),
),
)
place(
dx: 455pt,
dy: -335pt,
rect(
width: 9%,
height: 55pt,
fill: rgb("#eeeeeeff"),
radius: (right: 5pt, left: 5pt),
),
)
place(dx: 490pt, dy: -300pt, label("program"))

place(
dx: 55pt,
dy: 205pt,
rect(
width: 9%,
height: 55pt,
fill: rgb("#eeeeeeff"),
radius: (right: 5pt, left: 5pt),
),
)
place(
dx: 120pt,
dy: 275pt,
rect(
width: 9%,
height: 55pt,
fill: rgb("#eeeeeeff"),
radius: (right: 5pt, left: 5pt),
),
)
place(dx: 90pt, dy: 240pt, label("notebook"))

place(dx: 165pt, dy: 200pt, line(length: 45%, stroke: 3.5pt + black))
place(dx: 165pt, dy: 200pt, line(length: 45%, stroke: 3.5pt + black))

place(dx: 165pt, dy: -215pt, line(length: 45%, stroke: 3.5pt + black))
place(dx: 165pt, dy: -215pt, line(length: 45%, stroke: 3.5pt + black))

place(dx: 250pt, dy: -280pt, text(size: 18pt)[
place(
dx: 250pt,
dy: -280pt,
text(size: 18pt)[
*Radial Theme*
])
],
)

place(dx: 225pt, dy: -250pt, text(size: 24pt)[
place(
dx: 225pt,
dy: -250pt,
text(size: 24pt)[
*[Game Season]*
])
],
)

place(dx: 235pt, dy: 165pt, text(size: 24pt)[
place(
dx: 235pt,
dy: 165pt,
text(size: 24pt)[
*[Team Name]*
])
],
)

place(
dx: 0pt,
dy: -370pt,
figure(
image("Mediamodifier-Design.svg", width: 118%),
),
)

place(dx: 0pt, dy: -370pt, figure(
image("Mediamodifier-Design.svg", width: 118%)
))



})

Expand Down
Loading

0 comments on commit 54dc386

Please sign in to comment.