Radar graphs
Build Successful The Ravenous rulebook was built successfully.
Ravenous/ravenous_typst/pipeline/head This commit looks good Details

This commit is contained in:
Dandaedre 2026-08-20 17:21:42 +02:00
parent 282b44dce0
commit 4d57b28e2e
Signed by: Dandaedre
GPG Key ID: 440C6592E8A26D99
2 changed files with 51 additions and 33 deletions

View File

@ -14,8 +14,8 @@
(field: "C.C", display: "Contrôle", aliases: ()),
(field: "Altérations", display: "Altérations", aliases: ()),
(field: "QoL", display: "Confort", aliases: ()),
(field: "AB", display: "Brise-armure", aliases: ()),
(field: "Compléxité", display: "Complexité", aliases: ("Complexité", "Compl")),
(field: "AB", display: "Armure", aliases: ()),
// (field: "Compléxité", display: "Complexité", aliases: ("Complexité", "Compl")),
)
// Canonical public class names and their data sources.
@ -108,7 +108,7 @@
// Render a class radar graph. `fields` can override `radar-fields` for a
// one-off graph while keeping the same field/display/aliases structure.
#let radar-graph(class-name, fields: radar-fields, size: 170pt) = {
#let radar-graph(class-name, fields: radar-fields, size: 155pt) = {
let name = canonical-class-name(class-name)
if name not in school-sources {
panic(
@ -138,8 +138,12 @@
theme: (
palette: (theme.blood,),
text-color: theme.ink,
border-color: theme.border,
text-color-light: theme.muted-ink,
axis-stroke: 0.7pt + theme.dark-gold.transparentize(32%),
grid-stroke: 0.7pt + theme.dark-gold.transparentize(32%),
marker-stroke: 0.6pt + theme.parchment-light,
background: none,
border: none,
show-grid: true,
base-size: 6pt,
base-gap: 4pt,

View File

@ -375,26 +375,55 @@
v(0.7em)
grid(
columns: (1fr, 1.35fr),
columns: (0.55fr, 1fr),
column-gutter: 1.2em,
align: top,
//----- Class profile / radar -----
[
#block(
fill: theme.parchment,
stroke: 0.7pt + theme.border,
inset: 0.65em,
)[
#align(center)[
#spacers.fantasy-section("PROFIL", theme-name: "warm")[
#if type(class_info.radar) == str {
image(class_info.radar, width: 82%)
} else {
class_info.radar
}
#context {
layout(cell => {
let side = cell.width
block(
width: side,
height: side,
clip: true,
fill: theme.parchment,
stroke: 0.7pt + theme.border,
inset: (top: 0.8em, left:0em, right: 0em),
)[
#grid(
rows: (auto, 1fr),
align: center,
[#spacers.fantasy-label("PROFIL", theme-name: "warm")],
[#align(center + horizon)[
#if type(class_info.radar) == str {
image(class_info.radar, width: 82%)
} else {
box(
height: 160pt,
clip: true,
class_info.radar,
)
}
]],
)
]
]
})
}
#v(0.7em)
//----- Display the class difficulty rating -----
#grid(
columns: (1fr, auto),
align: horizon,
)[
#spacers.fantasy-label("DIFFICULTÉ", theme-name: "warm")
][
#grid(
column-gutter: 0.25em,
)[ #macros.difficulty-stars(class_info.difficulty) ]
]
],
@ -435,21 +464,6 @@
]
]
#v(0.7em)
//----- Display the class difficulty rating -----
#grid(
columns: (1fr, auto),
align: horizon,
)[
#spacers.fantasy-label("DIFFICULTÉ", theme-name: "warm")
][
#grid(
// columns: repeat(5, 0.7em),
column-gutter: 0.25em,
)[ #macros.difficulty-stars(class_info.difficulty) ]
]
],
)