Skip to content

Commit

Permalink
🚧 Gave up on the examples
Browse files Browse the repository at this point in the history
  • Loading branch information
BattleCh1cken committed Feb 15, 2024
1 parent 195abbd commit be19027
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 27 deletions.
6 changes: 3 additions & 3 deletions docs.typ
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ Minimal starting point:
for name in names.pos() {
read(predicate + name + ".typ")
}
}
}

=== Components

Expand Down Expand Up @@ -263,7 +263,7 @@ Minimal starting point:
#create-body-entry(title: "Day 1", type: "identify", date: datetime(year: 1984, month: 1, day: 1))[
= Heading
#lorem(50)
#components.pro-con(
Expand All @@ -286,7 +286,7 @@ Minimal starting point:
#create-body-entry(title: "Day 2", type: "identify", date: datetime(year: 1984, month: 1, day: 2))[
= Another Heading
#lorem(50)
#components.decision-matrix(
Expand Down
25 changes: 1 addition & 24 deletions themes/radial/components/pro-con.typ
Original file line number Diff line number Diff line change
@@ -1,30 +1,7 @@
#import "../colors.typ": *
#include "../colors.typ"

/// A table displaying pros and cons.
///
/// #example(`pro-con(pros: lorem(20), cons: lorem(10))`, scale-preview: 100%)
/// - pros (content): The positive aspects
/// - cons (content): The negative aspects
/// -> content
#let pro-con(pros: [], cons: []) = [
#let cell = rect.with(width: 100%, inset: 5pt)
#grid(
columns: (1fr, 1fr),
column-gutter: 4pt,
cell(fill: green, radius: (top: 1.5pt))[*Pros*],
cell(fill: red, radius: (top: 1.5pt))[*Cons*],
cell(fill: green.lighten(80%), radius: (bottom: 1.5pt))[
#pros
],
cell(fill: red.lighten(80%), radius: (bottom: 1.5pt))[
#cons
],
)
]

/// A table displaying pros and cons.
///
/// #example(`pro-con(pros: lorem(20), cons: lorem(10))`, scale-preview: 100%)
/// - pros (content): The positive aspects
/// - cons (content): The negative aspects
/// -> content
Expand Down

0 comments on commit be19027

Please sign in to comment.