-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: let data-flow graph aware theme settings
- Loading branch information
1 parent
4654a4f
commit a077d28
Showing
5 changed files
with
62 additions
and
46 deletions.
There are no files selected for viewing
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
#import "data-flow.typ": data-flow-graph | ||
|
||
#set page(height: auto, width: auto, margin: 0.5em) | ||
#set text(fill: white) | ||
#show link: underline | ||
|
||
#figure( | ||
data-flow-graph(stroke: white, bg-color: rgb(13, 17, 23)), | ||
caption: [Browser-side module needed: $dagger$: compiler; $dagger.double$: renderer. ], | ||
numbering: none, | ||
) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
|
||
#import "data-flow.typ": data-flow-graph | ||
|
||
#set page(height: auto, width: auto, margin: 0.5em, fill: white) | ||
#set page(height: auto, width: auto, margin: 0.5em) | ||
#show link: underline | ||
|
||
#figure( | ||
data-flow-graph(), | ||
data-flow-graph(stroke: black, bg-color: white), | ||
caption: [Browser-side module needed: $dagger$: compiler; $dagger.double$: renderer. ], | ||
numbering: none, | ||
) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,47 @@ | ||
#import "/contrib/typst/diagram.typ": node, arr, commutative_diagram | ||
#import "/docs/cookery/templates/page.typ": main-color, background-color | ||
|
||
#let arr = arr.with(stroke: main-color) | ||
|
||
#let data-flow-graph() = commutative_diagram( | ||
node_padding: (70pt, 50pt), | ||
bg-color: background-color, | ||
node((0, 0), [ | ||
Typst Documents | ||
]), | ||
node((0, 2), [ | ||
Preprocessed Artifact | ||
]), | ||
node((1, 1), [ | ||
#link("https://developer.mozilla.org/en-US/docs/Web/SVG")[SVG Document] ( `<svg/>` ) | ||
]), | ||
node((2, 1), [ | ||
#link("https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas")[Canvas] ( `<canvas/>` ) | ||
]), | ||
arr((0, 0), (0, 2), [ | ||
#set text(fill: green) | ||
`precompile with theme and screen settings` | ||
]), | ||
arr((0, 0), (1, 1), label_pos: 0.8em, { | ||
set text(fill: green) | ||
rotate(17deg)[ | ||
`compile to svg` | ||
#set text(fill: blue) | ||
#h(-0.5em) $space^dagger$ | ||
] | ||
}), | ||
arr((0, 0), (2, 1), label_pos: -0.6em, curve: -25deg, { | ||
set text(fill: blue) | ||
rotate(35deg)[`directly render` #h(-0.5em) $ space^(dagger dot.c dagger.double)$] | ||
}), | ||
arr((0, 2), (1, 1), label_pos: -0.8em, { | ||
set text(fill: blue) | ||
rotate(-17deg)[`render to svg` #h(-0.5em) $ space^dagger.double$] | ||
}), | ||
arr((1, 1), (2, 1), []), | ||
arr((0, 2), (2, 1), label_pos: 0.6em, curve: 25deg, { | ||
set text(fill: blue) | ||
rotate(-35deg)[`render to canvas` #h(-0.5em) $ space^(dagger.double)$] | ||
}), | ||
) | ||
#let data-flow-graph(stroke: main-color, bg-color: background-color) = { | ||
let arr = arr.with(stroke: stroke) | ||
commutative_diagram( | ||
node_padding: (70pt, 50pt), | ||
bg-color: bg-color, | ||
node((0, 0), [ | ||
Typst Documents | ||
]), | ||
node((0, 2), [ | ||
Preprocessed Artifact | ||
]), | ||
node((1, 1), [ | ||
#link("https://developer.mozilla.org/en-US/docs/Web/SVG")[SVG Document] ( `<svg/>` ) | ||
]), | ||
node((2, 1), [ | ||
#link("https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas")[Canvas] ( `<canvas/>` ) | ||
]), | ||
arr((0, 0), (0, 2), [ | ||
#set text(fill: green) | ||
`precompile with theme and screen settings` | ||
]), | ||
arr((0, 0), (1, 1), label_pos: 0.8em, { | ||
set text(fill: green) | ||
rotate(17deg)[ | ||
`compile to svg` | ||
#set text(fill: blue) | ||
#h(-0.5em) $space^dagger$ | ||
] | ||
}), | ||
arr((0, 0), (2, 1), label_pos: -0.6em, curve: -25deg, { | ||
set text(fill: blue) | ||
rotate(35deg)[`directly render` #h(-0.5em) $ space^(dagger dot.c dagger.double)$] | ||
}), | ||
arr((0, 2), (1, 1), label_pos: -0.8em, { | ||
set text(fill: blue) | ||
rotate(-17deg)[`render to svg` #h(-0.5em) $ space^dagger.double$] | ||
}), | ||
arr((1, 1), (2, 1), []), | ||
arr((0, 2), (2, 1), label_pos: 0.6em, curve: 25deg, { | ||
set text(fill: blue) | ||
rotate(-35deg)[`render to canvas` #h(-0.5em) $ space^(dagger.double)$] | ||
}), | ||
) | ||
} |