ravenous_typst/chapters/changelog.typ

130 lines
3.4 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// A deliberately compact, data-driven overview of notable content changes.
#import "/setup/setup.typ": theme, theme-var
#let entries = yaml("/data/config/changelog.yaml").filter(
entry => entry.at("display", default: true),
)
#let category-order = ("new rule", "rework", "balance", "misc", "bugfix")
#let category-labels = (
"new rule": "Nouvelles règles",
rework: "Refontes",
balance: "Équilibrage",
misc: "Divers",
bugfix: "Corrections",
)
#let category-colors = (
"new rule": theme.heading,
rework: theme.gold,
balance: theme.heading-accent,
misc: theme.muted,
bugfix: theme.dark-gold,
)
#let revisions = entries.map(entry => entry.revision).dedup().sorted().rev()
#let participant-pill(name, accent) = box(
inset: (x: 0.45em, y: 0.16em),
radius: 999pt,
fill: accent.lighten(86%),
stroke: 0.4pt + accent.lighten(45%),
text(size: 7.2pt, weight: "medium", fill: accent.darken(8%), name),
)
#let change-entry(entry) = {
let accent = category-colors.at(entry.category)
let participants = entry.at("participants", default: ())
block(
width: 100%,
breakable: false,
inset: (left: 0.7em, top: 0.2em, bottom: 0.2em),
)[
#grid(
columns: (0.85em, 1fr),
column-gutter: 0.25em,
align: (center, top),
text(size: 8.5pt, weight: "bold", fill: accent)[●],
[
#text(size: 9.25pt)[#eval(entry.description, mode: "markup")]
#if participants.len() > 0 {
h(0.35em)
for (index, participant) in participants.enumerate() {
if index > 0 { h(0.18em) }
participant-pill(participant, accent)
}
}
],
)
]
}
#pagebreak(weak: true)
#align(center)[
#text(size: 25pt, weight: "bold", fill: theme.heading)[Journal des modifications]
#v(0.25em)
#text(size: 8.5pt, tracking: 0.08em, fill: theme.heading-accent)[
LES ÉVOLUTIONS ESSENTIELLES DE RAVENOUS
]
#v(0.4em)
#box(width: 3.4cm, height: 0.7pt, fill: theme.heading-accent)
]
#v(0.8em)
#block(
inset: 0.7em,
radius: 5pt,
fill: theme.parchment-accent,
stroke: 0.5pt + theme.border,
)[
#set par(first-line-indent: 0em, justify: false)
#text(size: 9pt, fill: theme.muted-ink)[
Ce journal résume les changements qui modifient sensiblement la lecture ou le jeu.
Les simples reports depuis l’ancienne version TeX et les corrections typographiques
isolées n’y sont volontairement pas détaillés.
]
]
#for revision in revisions {
block(above: 1em, below: 0.4em)[
#grid(
columns: (auto, 1fr),
column-gutter: 0.8em,
align: horizon,
box(
inset: (x: 0.8em, y: 0.35em),
radius: 999pt,
fill: theme.heading,
)[#text(size: 11pt, weight: "bold", fill: white)[#revision]],
line(length: 100%, stroke: 0.7pt + theme.border),
)
]
for category in category-order {
let changes = entries.filter(entry => (
entry.revision == revision and entry.category == category
))
if changes.len() > 0 {
block(above: 1.05em, below: 0.45em)[
#text(
size: 9.5pt,
weight: "bold",
fill: category-colors.at(category),
smallcaps(category-labels.at(category)),
)
#v(0.18em)
#line(
length: 100%,
stroke: 0.55pt + category-colors.at(category).lighten(38%),
)
]
for entry in changes {
change-entry(entry)
v(0.16em)
}
}
}
}