Last active
January 3, 2025 15:35
-
-
Save peterhellberg/8ab356001fea59cdc26d01d130bff17b to your computer and use it in GitHub Desktop.
Qwixx Score Sheet implemented in Typst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#let red = red.desaturate(70%); | |
#let yellow = yellow.desaturate(70%); | |
#let blue = blue.desaturate(70%); | |
#let green = green.desaturate(70%); | |
#let gray = gray.lighten(20%); | |
#let black = black.lighten(10%); | |
#let lightgray = gray.lighten(70%); | |
#show table.cell: it => { | |
if it.x > 0 and it.y == 5 { | |
set text(size: 8pt, weight: 600) | |
it | |
} else if it.x > 0 and it.y == 6 { | |
set text(size: 10pt, weight: 600) | |
it | |
} else { | |
it | |
} | |
} | |
#let ScoreSheet() = { | |
table( | |
columns: (3fr, 2fr, 2fr, 2fr, 2fr, 2fr, 2fr, 2fr, 2fr, 2fr, 2fr, 2fr, 2fr), | |
rows: (2fr, 2fr, 2fr, 2fr, 2fr, 1fr, 1.4fr, 4fr), | |
stroke: 0.06em + black, | |
fill: (x, y) => { | |
if x == 0 { | |
if y == 0 { red.saturate(30%) } | |
if y == 1 { yellow.saturate(30%) } | |
if y == 2 { blue.saturate(30%) } | |
if y == 3 { green.saturate(30%) } | |
} else { | |
if y == 0 { red } | |
if y == 1 { yellow } | |
if y == 2 { blue } | |
if y == 3 { green } | |
} | |
}, | |
[RÖD ],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11],[12],[~], | |
[GUL ],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11],[12],[~], | |
[BLÅ ],[12],[11],[10],[9],[8],[7],[6],[5],[4],[3],[2],[~], | |
[GRÖN],[12],[11],[10],[9],[8],[7],[6],[5],[4],[3],[2],[~], | |
table.cell(colspan: 9)[~], | |
table.cell(colspan: 4, inset: 0em)[ | |
#table( | |
columns: (1fr, 1fr, 1fr, 1fr), | |
rows: (1.8fr,2fr), | |
stroke: 0.06em + black, | |
table.cell(colspan: 4, fill: gray)[BOM -5], | |
table.cell(fill: lightgray)[~], | |
table.cell(fill: lightgray)[~], | |
table.cell(fill: lightgray)[~], | |
table.cell(fill: lightgray)[~], | |
) | |
], | |
[ANTAL],[1x],[2x],[3x],[4x],[5x],[6x],[7x],[8x],[9x],[10x],[11x],[12x], | |
[POÄNG],[1],[3],[6],[10],[15],[21],[28],[36],[45],[55],[66],[78], | |
table.cell(colspan: 13, inset: (top: 1em, left: 0em, right: 0em, bottom: 0em))[ | |
#table( | |
columns: (1fr, 1fr, 1fr, 1fr, 1fr, 1fr), | |
rows: (1fr, 1.5fr), | |
stroke: 0.06em + black, | |
table.cell(fill: red.saturate(30%))[RÖD], | |
table.cell(fill: yellow.saturate(30%))[GUL], | |
table.cell(fill: blue.saturate(30%))[BLÅ], | |
table.cell(fill: green.saturate(30%))[GRÖN], | |
table.cell(fill: gray)[BOM], | |
table.cell(fill: white)[SUMMA], | |
table.cell(fill: red)[~], | |
table.cell(fill: yellow, align: left + horizon, inset: 0em)[+], | |
table.cell(fill: blue, align: left + horizon, inset: 0em)[+], | |
table.cell(fill: green, align: left + horizon, inset: 0em)[+], | |
table.cell(fill: lightgray, align: left + horizon, inset: 0em)[-], | |
table.cell(fill: white, align: left + horizon, inset: 0em)[=], | |
) | |
], | |
) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "Qwixx.typ" | |
#set page( | |
paper: "a4", | |
margin: (x: 8mm, y: 8mm), | |
) | |
#set text( | |
font: "Inter", | |
weight: 600, | |
size: 7.2pt, | |
) | |
#set table( | |
align: center + horizon, | |
stroke: none, | |
) | |
#grid( | |
columns: 2, | |
gutter: 4em, | |
rows: 1fr, | |
Qwixx.ScoreSheet(), Qwixx.ScoreSheet(), | |
Qwixx.ScoreSheet(), Qwixx.ScoreSheet(), | |
Qwixx.ScoreSheet(), Qwixx.ScoreSheet(), | |
Qwixx.ScoreSheet(), Qwixx.ScoreSheet(), | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "Qwixx.typ" | |
#set page( | |
paper: "a7", | |
flipped: true, | |
margin: (x: 3mm, y: 3mm), | |
) | |
#set text( | |
font: "Inter", | |
weight: 600, | |
size: 7.2pt, | |
) | |
#set table( | |
align: center + horizon, | |
stroke: none, | |
) | |
#Qwixx.ScoreSheet() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment