-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 🚧 Added some components that I forgot about from my old template * 🚧 You really shouldn't be paying attention to whats happening here * ✨ Add the ability to calculate weighted properties to the decision matrix * 📝 Documented the label function * 🎨 Restructured the theme to reduce file count * 🎨 Update package import to new organization * 🐛 Fixed headings not being blocks * 🩹 Removed redundant comment * 📝 Added some missing documentation * 💄 Removed redundant linebreaks from the table of contents * 🩹 Removed missing witness and author lines * 🐛 Fixed the decision matrix not being able to check which choice was highest
- Loading branch information
1 parent
0b42734
commit 9bc5f0b
Showing
13 changed files
with
205 additions
and
130 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
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
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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,18 @@ | ||
#import "../colors.typ": * | ||
#import "../metadata.typ": * | ||
#import "/utils.typ" | ||
|
||
/// A label that corresponds with one of the entry types. | ||
/// | ||
/// - type (string): Any of the radial entry types | ||
/// - size (size): The size of the label | ||
/// -> content | ||
#let label(type, size: 0.7em) = { | ||
let data = entry-type-metadata.at(type) | ||
let colored-image = utils.change-icon-color(raw-icon: data.icon, fill: white) | ||
|
||
box(fill: data.color, outset: 3pt, radius: 1.5pt)[ | ||
#set align(center + horizon) | ||
#image.decode(colored-image, height: size) | ||
] | ||
} |
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,47 @@ | ||
#import "../colors.typ": * | ||
|
||
/// Display information about your team. | ||
/// | ||
/// Example Usage: | ||
/// ```typ | ||
/// #team( | ||
/// ( | ||
/// name: "Random Person", | ||
/// picture: image("./path-to-image.png", width: 90pt, height: 90pt), | ||
/// about: [ | ||
/// Likes Coding | ||
/// ], | ||
/// ), | ||
/// ) | ||
/// ``` | ||
/// - ..members (dictionary): A list of members in your team. Each dictionary must contain the following fields: | ||
/// - name `<string>`: The name of the team member | ||
/// - picture `<content>`: An image of the team member | ||
/// - about `<content>`: About the team member | ||
/// -> content | ||
#let team(..members) = { | ||
set align(center) | ||
grid( | ||
columns: (1fr, 1fr), | ||
gutter: 20pt, | ||
..for member in members.pos() { | ||
( | ||
rect( | ||
fill: surface-1, | ||
inset: 20pt, | ||
radius: 1.5pt, | ||
)[ | ||
* #member.name * | ||
#line(length: 100%, stroke: (cap: "round", dash: "solid", thickness: 1.5pt)) | ||
#v(8pt) | ||
#grid( | ||
columns: (1fr, 1fr), | ||
gutter: 20pt, | ||
align(center, member.picture), | ||
align(left, member.about), | ||
) | ||
], | ||
) | ||
}, | ||
) | ||
} |
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
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
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,76 @@ | ||
#import "/packages.typ": tablex | ||
#import tablex: * | ||
#import "./colors.typ": * | ||
|
||
#let table(it) = { | ||
tablex( | ||
columns: it.columns, | ||
auto-lines: false, | ||
inset: 10pt, | ||
fill: (_, row) => { | ||
if calc.odd(row) { surface-3 } | ||
if calc.even(row) { surface-1 } | ||
}, | ||
hlinex(stroke: (cap: "round", thickness: 2pt)), | ||
..for child in it.children { | ||
([#child],) | ||
}, | ||
hlinex(stroke: (cap: "round", thickness: 2pt)), | ||
) | ||
} | ||
|
||
#let heading(it) = { | ||
set block(below: 1em) | ||
|
||
let content = if it.level == 1 { | ||
set text(size: 15pt) | ||
box(fill: surface-3, outset: 0.5em, radius: 1.5pt, it.body) | ||
} else if it.level == 2 { | ||
set text(size: 14pt) | ||
it.body | ||
} else { | ||
set text(size: 11pt) | ||
it.body | ||
} | ||
|
||
block(content) | ||
} | ||
|
||
#let raw-not-block = box.with( | ||
fill: surface-2, | ||
inset: (x: 3pt, y: 0pt), | ||
outset: (y: 3pt), | ||
radius: 2pt, | ||
) | ||
|
||
#let raw-block(it) = { | ||
set par(justify: false); | ||
// the line counter | ||
let i = 0; | ||
let box-radius = 1.5pt; | ||
|
||
let detail-radius = 1.5pt; | ||
if (it.lang != none) { | ||
grid( | ||
columns: (100%, 100%), | ||
column-gutter: (-100%), | ||
block(width: 100%, inset: 1em, { | ||
for line in it.text.split("\n") { | ||
box(width: 0pt, align(right, str(i + 1) + h(2em))) | ||
hide(line) | ||
linebreak() | ||
i = i + 1; | ||
} | ||
}), | ||
block(radius: box-radius, fill: surface-1, width: 100%, inset: 1em, { | ||
place( | ||
top + right, | ||
box(fill: surface-3, radius: detail-radius, outset: 3pt, it.lang), | ||
) | ||
it | ||
}), | ||
) | ||
} else { | ||
block(radius: box-radius, fill: surface-2, width: 100%, inset: 1em, it) | ||
} | ||
} |
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,14 +1,14 @@ | ||
#import "./rules.typ": rules | ||
#import "./entries.typ": cover, frontmatter-entry, body-entry, appendix-entry | ||
#import "./components/components.typ" | ||
#import "./colors.typ" | ||
|
||
#let radial-theme = ( | ||
// Global show and set rules | ||
rules: rules, | ||
cover: cover, | ||
|
||
// Entry pages | ||
frontmatter-entry: frontmatter-entry, | ||
body-entry: body-entry, | ||
appendix-entry: appendix-entry | ||
appendix-entry: appendix-entry, | ||
) |
Oops, something went wrong.