Essayer d'utiliser les boîtes
This commit is contained in:
parent
75eabaf311
commit
497881703e
2 changed files with 20 additions and 4 deletions
4
epi.typ
4
epi.typ
|
@ -4,12 +4,12 @@
|
|||
|
||||
#let fiches = (
|
||||
libepi.card(name: "Défonceuse", instructions: "truc truc truc", protection_items:
|
||||
(libepi.Hearing, libepi.Shield), forbidden_items: (), referent: "cst1",
|
||||
(libepi.Hearing, libepi.Shield, libepi.Mask), forbidden_items: (), referent: "cst1",
|
||||
min_help: 1),
|
||||
|
||||
|
||||
libepi.card(name: "Perceuse à colonne", instructions: "", protection_items:
|
||||
(libepi.Gloves,)),
|
||||
(libepi.Gloves,), warning: [Ne surtout pas mettre de gants]),
|
||||
)
|
||||
|
||||
#show: doc => [
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
#import "@preview/gentle-clues:1.0.0": *
|
||||
|
||||
#let dummy(truc) = [truc]
|
||||
|
||||
// Builds a card from arguments
|
||||
#let card(name: none, protection_items: (), forbidden_items: (), referent:
|
||||
none,
|
||||
instructions: none, note: none, min_help: 0) = {
|
||||
instructions: none, note: none, warning: none, min_help: 0) = {
|
||||
(
|
||||
name: name,
|
||||
protection_items: protection_items,
|
||||
|
@ -11,7 +13,8 @@ instructions: none, note: none, min_help: 0) = {
|
|||
referent: referent,
|
||||
min_help: min_help,
|
||||
instructions: instructions,
|
||||
note: note
|
||||
note: note,
|
||||
warning: warning
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -72,6 +75,18 @@ instructions: none, note: none, min_help: 0) = {
|
|||
}
|
||||
])
|
||||
]
|
||||
|
||||
if card.warning != none {
|
||||
// TODO: Tidy this up
|
||||
linebreak()
|
||||
linebreak()
|
||||
linebreak()
|
||||
|
||||
text(size: 30pt, weight: "bold")[Avertissement]
|
||||
linebreak()
|
||||
text(size: 18pt)[#card.warning]
|
||||
warning(title: [Avertissement])[#card.warning]
|
||||
}
|
||||
|
||||
// TODO: Tidy this up
|
||||
linebreak()
|
||||
|
@ -81,6 +96,7 @@ instructions: none, note: none, min_help: 0) = {
|
|||
text(size: 30pt, weight: "bold")[Instructions]
|
||||
linebreak()
|
||||
text(size: 18pt)[#card.instructions]
|
||||
info(title: [#text(size:30pt)[Instructions]])[#text(size:18pt)[#card.instructions]]
|
||||
}
|
||||
|
||||
#let generate_cards(cards) = {
|
||||
|
|
Loading…
Reference in a new issue