From be19027edce462cacc25990ed6e3f59ccd1e805e Mon Sep 17 00:00:00 2001 From: BattleCh1cken Date: Sun, 28 Jan 2024 20:12:39 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20Gave=20up=20on=20the=20examples?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs.typ | 6 +++--- themes/radial/components/pro-con.typ | 25 +------------------------ 2 files changed, 4 insertions(+), 27 deletions(-) diff --git a/docs.typ b/docs.typ index a15e387..db5e54e 100644 --- a/docs.typ +++ b/docs.typ @@ -215,7 +215,7 @@ Minimal starting point: for name in names.pos() { read(predicate + name + ".typ") } -} +} === Components @@ -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( @@ -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( diff --git a/themes/radial/components/pro-con.typ b/themes/radial/components/pro-con.typ index ab0a831..d30e960 100644 --- a/themes/radial/components/pro-con.typ +++ b/themes/radial/components/pro-con.typ @@ -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