diff --git a/chapters/acknowledgements.typ b/chapters/acknowledgements.typ index a91edcc..e309fe4 100644 --- a/chapters/acknowledgements.typ +++ b/chapters/acknowledgements.typ @@ -1,4 +1,4 @@ -#import "../setup/setup.typ": colors, build_info +#import "../setup/setup.typ": theme, build_info // ───────────────────────────────────────────── // Title @@ -8,14 +8,14 @@ #text( size: 24pt, weight: "bold", - fill: colors.blood, + fill: theme.blood, )[À propos de cette édition] #v(0.4em) #text( size: 10pt, - fill: colors.gold, + fill: theme.gold, )[✦ ── ❖ ── ✦] ] @@ -26,7 +26,7 @@ // ───────────────────────────────────────────── #align(center)[ - #text(size: 9pt, fill: colors.muted)[ + #text(size: 9pt, fill: theme.muted)[ #emph[Copirightish#super[©] Dandaedre 2022–2024] ] @@ -34,7 +34,7 @@ #text( size: 7.5pt, - fill: colors.muted, + fill: theme.muted, )[ #emph[#build_info.build_commit] ] @@ -49,7 +49,7 @@ #let credit(label, content) = [ #text( weight: "bold", - fill: colors.blood, + fill: theme.blood, )[ #label ] #h(0.5em) #content @@ -80,7 +80,7 @@ #text( size: 12pt, weight: "bold", - fill: colors.blood, + fill: theme.blood, )[Palettes de couleurs] #v(0.5em) @@ -100,7 +100,7 @@ #text( size: 12pt, weight: "bold", - fill: colors.blood, + fill: theme.blood, )[Testeurs] #v(0.6em) @@ -110,11 +110,11 @@ columns: (auto, 1fr), column-gutter: 1em, row-gutter: 0.45em, - [#text(weight: "bold", fill: colors.gold)[Session 1]], [Gregzel, Durbin, El Fredo, Wulfran], - [#text(weight: "bold", fill: colors.gold)[Session 2]], [Gregzel, Durbin, Vicky, Wulfran, Vandole], - [#text(weight: "bold", fill: colors.gold)[Session 3]], [Gregzel, Durbin, Vicky, Wulfran, Disturbed, El Fredo], - [#text(weight: "bold", fill: colors.gold)[Session 4]], [Gregzel, Durbin, Vicky, Wulfran, Disturbed, Vandole, Ily'], - [#text(weight: "bold", fill: colors.gold)[Session 5]], [Gregzel, Durbin, Vicky, Wulfran, Disturbed, Vandole, Ily', El Fredo], + [#text(weight: "bold", fill: theme.gold)[Session 1]], [Gregzel, Durbin, El Fredo, Wulfran], + [#text(weight: "bold", fill: theme.gold)[Session 2]], [Gregzel, Durbin, Vicky, Wulfran, Vandole], + [#text(weight: "bold", fill: theme.gold)[Session 3]], [Gregzel, Durbin, Vicky, Wulfran, Disturbed, El Fredo], + [#text(weight: "bold", fill: theme.gold)[Session 4]], [Gregzel, Durbin, Vicky, Wulfran, Disturbed, Vandole, Ily'], + [#text(weight: "bold", fill: theme.gold)[Session 5]], [Gregzel, Durbin, Vicky, Wulfran, Disturbed, Vandole, Ily', El Fredo], ) #v(1.8em) @@ -138,8 +138,8 @@ #block( width: 100%, - fill: rgb("#EDE1C8"), - stroke: 0.7pt + colors.gold, + fill: theme.parchment, + stroke: 0.7pt + theme.gold, inset: 12pt, radius: 3pt, )[ @@ -147,7 +147,7 @@ #text( size: 9pt, weight: "bold", - fill: colors.blood, + fill: theme.blood, )[COPIE FOURNIE EN CADRE RESTREINT] ] @@ -173,7 +173,7 @@ #v(1em) #align(center)[ - #text(size: 7pt, fill: colors.muted)[ + #text(size: 7pt, fill: theme.muted)[ ✦ RAVENOUS · LIVRE DE RÈGLES ✦ ] ] diff --git a/chapters/title.typ b/chapters/title.typ index 4a51c7c..644d41a 100644 --- a/chapters/title.typ +++ b/chapters/title.typ @@ -1,10 +1,10 @@ -#import "../setup/setup.typ": colors +#import "../setup/setup.typ": theme #align(center + horizon)[ #text( size: 42pt, weight: "bold", - fill: colors.blood, + fill: theme.blood, )[ RAVENOUS ] @@ -14,7 +14,7 @@ #text( size: 18pt, tracking: 0.08em, - fill: colors.gold, + fill: theme.gold, )[ LIVRE DE RÈGLES ] diff --git a/setup/model.typ b/setup/model.typ index 2ecd2c7..af13e27 100644 --- a/setup/model.typ +++ b/setup/model.typ @@ -11,9 +11,13 @@ #let model( variables, document, - colors, + theme, ) = { + // --------------------------------------------------------------------------- + // Page & typography + // --------------------------------------------------------------------------- + set page( paper: "a4", margin: ( @@ -24,20 +28,30 @@ ), numbering: "1", ) + set text( font: "Libertinus Serif", size: 11pt, lang: "fr", + fill: theme.ink, ) + set par( justify: true, leading: 0.7em, first-line-indent: 1em, spacing: 0.9em, ) - set text(fill: colors.ink) + set heading(numbering: none) + + // --------------------------------------------------------------------------- + // Headings + // --------------------------------------------------------------------------- + + // Level 1 — Major section show heading.where(level: 1): set align(center) + show heading.where(level: 1): it => block( above: 2em, below: 1.2em, @@ -46,7 +60,7 @@ font: "Libertinus Serif", size: 22pt, weight: "bold", - fill: colors.blood, + fill: theme.heading, )[ #it.body ] @@ -54,18 +68,33 @@ #stack( dir: ltr, spacing: 0.4em, + [ - #box(width: 1.5cm, height: 0.5pt, fill: colors.gold) + #box( + width: 1.5cm, + height: 0.5pt, + fill: theme.heading-accent, + ) ], + [ - #text(size: 9pt, fill: colors.gold)[✦] + #text( + size: 9pt, + fill: theme.heading-accent, + )[✦] ], + [ - #box(width: 1.5cm, height: 0.5pt, fill: colors.gold) + #box( + width: 1.5cm, + height: 0.5pt, + fill: theme.heading-accent, + ) ], ) ] + // Level 2 — Section show heading.where(level: 2): it => block( above: 1.5em, below: 0.7em, @@ -73,10 +102,11 @@ #text( size: 16pt, weight: "bold", - fill: colors.blood, + fill: theme.heading, )[ #it.body ] ] + // Level 3 — Subsection show heading.where(level: 3): it => block( above: 1em, below: 0.4em, @@ -84,36 +114,80 @@ #text( size: 12pt, weight: "bold", - fill: colors.gold, + fill: theme.heading-accent, )[ #it.body ] ] + // Level 4 — Minor subsection + show heading.where(level: 4): it => block( + above: 0.8em, + below: 0.3em, + )[ + #text( + size: 11pt, + weight: "bold", + fill: theme.heading-subtle, + )[ #it.body ] + ] + + // Level 5 — Smallest heading + show heading.where(level: 5): it => block( + above: 0.6em, + below: 0.2em, + )[ + #text( + size: 10pt, + weight: "bold", + fill: theme.heading-subtle, + )[ #it.body ] + ] + + // --------------------------------------------------------------------------- + // Inline formatting + // --------------------------------------------------------------------------- + show strong: it => text( weight: "bold", - fill: colors.blood, - )[#it] + fill: theme.emphasis, + )[ #it ] show emph: it => text( style: "italic", - )[#it] + )[ #it ] - show link: set text(fill: colors.blood) + show link: set text( + fill: theme.link, + ) + + // --------------------------------------------------------------------------- + // Tables + // --------------------------------------------------------------------------- set table( - stroke: 0.5pt + rgb("#B8A98E"), + stroke: 0.5pt + theme.border, ) + // --------------------------------------------------------------------------- + // Glossary + // --------------------------------------------------------------------------- + show: make-glossary register-glossary(glossary) + document [= Glossaire] + print-glossary( glossary, entry-sortkey: x => x.long, - shorthands: ("plural", "capitalize", "capitalize-plural", "short", "long"), + shorthands: ( + "plural", + "capitalize", + "capitalize-plural", + "short", + "long", + ), show-all: true, ) } - -#let class_model() = { } diff --git a/setup/school_model.typ b/setup/school_model.typ index 52bf0f8..869a6b9 100644 --- a/setup/school_model.typ +++ b/setup/school_model.typ @@ -1,8 +1,7 @@ -#import "themes.typ": make-theme +#import "variables.typ": theme // ----------------------------------------------------------------------------- // Class presentation — Fantasy Codex // ----------------------------------------------------------------------------- -#let theme = make-theme(name: "warm") #let fantasy-label(body) = { text( @@ -558,7 +557,7 @@ )[ #block( clip: true, - stroke: 0.5pt + rgb("#b6a98e"), + stroke: 0.5pt + theme.border, )[ #image( class_info.illustration, diff --git a/setup/setup.typ b/setup/setup.typ index 7784000..3e8758d 100644 --- a/setup/setup.typ +++ b/setup/setup.typ @@ -1,27 +1,21 @@ // Project variables -#import "variables.typ": ravenous, colors +#import "variables.typ": ravenous, theme #import "../data/gen/build_info.typ": build_info #import "model.typ" as model -#import "themes.typ": make-theme // Re exposing internals #let ravenous = ravenous -#let colors = colors -#let theme = make-theme(name: "warm") +#let theme = theme #let build_info = build_info // Template for classes #let school_presentation = model.school_presentation -// // Document setup -// #import "./config.typ": conf - // Inner modules and functions - #let memo_box(title: "À retenir", content) = { block( - fill: rgb("#EDE1C8"), - stroke: 0.8pt + colors.gold, + fill: theme.parchment, + stroke: 0.8pt + theme.gold, inset: 12pt, radius: 3pt, )[ @@ -48,5 +42,5 @@ // Create a main document config for the ravenous project #let config_main(variables: ravenous, document) = { - show: model.model(ravenous, document, colors) + show: model.model(ravenous, document, theme) } diff --git a/setup/themes.typ b/setup/themes.typ index 2a5dabe..885895d 100644 --- a/setup/themes.typ +++ b/setup/themes.typ @@ -1,41 +1,66 @@ // ----------------------------------------------------------------------------- // Color themes // ----------------------------------------------------------------------------- - #let themes = ( warm: ( ink: rgb("#302c26"), muted-ink: rgb("#716957"), gold: rgb("#9b8050"), dark-gold: rgb("#70582f"), - parchment: rgb("#f7f3e9"), + parchment: rgb("#F4EBD8"), parchment-dark: rgb("#ece4d2"), parchment-light: rgb("#fbf9f3"), + parchment-accent: rgb("#EDE1C8"), border: rgb("#c9bda4"), + blood: rgb("#7A2424"), + muted: rgb("#756B5D"), + + heading: rgb("#7A2424"), + heading-accent: rgb("#9b8050"), + heading-subtle: rgb("#716957"), + emphasis: rgb("#7A2424"), + link: rgb("#7A2424"), ), steel: ( - ink: rgb("#292b32"), + ink: rgb("#292B32"), muted-ink: rgb("#626873"), - gold: rgb("#7187a0"), - dark-gold: rgb("#465a72"), - parchment: rgb("#eef1f3"), - parchment-dark: rgb("#dce2e7"), - parchment-light: rgb("#f7f9fa"), - border: rgb("#b8c2cc"), + gold: rgb("#7187A0"), + dark-gold: rgb("#465A72"), + parchment: rgb("#EEF1F3"), + parchment-dark: rgb("#DCE2E7"), + parchment-light: rgb("#F7F9FA"), + parchment-accent: rgb("#DCE3E8"), + border: rgb("#B8C2CC"), + blood: rgb("#526D85"), + muted: rgb("#69717C"), + + heading: rgb("#526D85"), + heading-accent: rgb("#7187A0"), + heading-subtle: rgb("#626873"), + emphasis: rgb("#526D85"), + link: rgb("#526D85"), ), sage: ( - ink: rgb("#29302a"), + ink: rgb("#29302A"), muted-ink: rgb("#687064"), - gold: rgb("#7f8f62"), - dark-gold: rgb("#53603d"), - parchment: rgb("#f1f2e8"), - parchment-dark: rgb("#e1e4d5"), - parchment-light: rgb("#fafbf5"), - border: rgb("#bdc3ae"), - ), + gold: rgb("#7F8F62"), + dark-gold: rgb("#53603D"), + parchment: rgb("#F1F2E8"), + parchment-dark: rgb("#E1E4D5"), + parchment-light: rgb("#FAFBF5"), + parchment-accent: rgb("#E3E5D4"), + border: rgb("#BDC3AE"), + blood: rgb("#536B45"), + muted: rgb("#6D7568"), + heading: rgb("#536B45"), + heading-accent: rgb("#7F8F62"), + heading-subtle: rgb("#687064"), + emphasis: rgb("#536B45"), + link: rgb("#536B45"), + ), bw: ( ink: rgb("#202020"), muted-ink: rgb("#666666"), @@ -44,7 +69,54 @@ parchment: rgb("#eeeeee"), parchment-dark: rgb("#dddddd"), parchment-light: rgb("#fafafa"), + parchment-accent: rgb("#E2E2E2"), border: rgb("#b5b5b5"), + blood: rgb("#444444"), + muted: rgb("#707070"), + + heading: rgb("#202020"), + heading-accent: rgb("#484848"), + heading-subtle: rgb("#666666"), + emphasis: rgb("#202020"), + link: rgb("#202020"), + ), + high-contrast: ( + // --------------------------------------------------------------------------- + // Core colors + // --------------------------------------------------------------------------- + + ink: rgb("#111111"), + muted-ink: rgb("#333333"), + + // Strong blue accent + gold: rgb("#005A9C"), + dark-gold: rgb("#003B66"), + + // Very high contrast paper tones + parchment: rgb("#FFFFFF"), + parchment-dark: rgb("#E6E6E6"), + parchment-light: rgb("#FFFFFF"), + parchment-accent: rgb("#FFF4CC"), + + // Strong neutral border + border: rgb("#555555"), + + // Strong red, still readable against white + blood: rgb("#A40000"), + + // Neutral muted text + muted: rgb("#444444"), + + // --------------------------------------------------------------------------- + // Semantic roles + // --------------------------------------------------------------------------- + + heading: rgb("#003B66"), + heading-accent: rgb("#005A9C"), + heading-subtle: rgb("#333333"), + + emphasis: rgb("#A40000"), + link: rgb("#003B66"), ), ) diff --git a/setup/variables.typ b/setup/variables.typ index 2b2465f..519a8b9 100644 --- a/setup/variables.typ +++ b/setup/variables.typ @@ -1,8 +1,7 @@ +#import "themes.typ": make-theme #let ravenous = (name: "Ravenous", title: "Ravenous", copyright: "Dandaedre", date: "2021") -#let colors = ( - ink: rgb("#29231D"), - blood: rgb("#7A2424"), - gold: rgb("#A47B38"), - parchment: rgb("#F4EBD8"), - muted: rgb("#756B5D"), -) +#let colors_scheme = "yosen" +#let theme = make-theme(name: colors_scheme) + +// ( +// )