Compare commits

..
Author SHA1 Message Date
swaits 1b025afd8c feat(finely-crafted-cv): minor formatting, style updates
- default fonts changed to Adobe's Source Pro
- change size of headline (ie person's name at top of resume)
- tweaked weights/sizes/spacing of headline, headings
- changed headings to smallcaps
- added a "nudge up" for empty jobs
- changed header and table header row to use heading-font
- bump version to 0.2.0
2025-01-08 09:59:16 -07:00
swaits df889d8d72 feat(glossy): add sort: true parameter to glossary() 2024-12-21 22:27:07 -07:00
swaits c008b5bd86 feat(glossy): release 0.5.1 2024-12-20 12:48:19 -07:00
swaits 842166c211 fix(glossy): use codepoints (not bytes!) in article code
Fixes [#18](https://github.com/swaits/typst-collection/issues/18)
2024-12-20 12:37:21 -07:00
17 changed files with 129 additions and 28 deletions

No files matched your search

+1 -1
View File
@@ -15,7 +15,7 @@ education, experience, skills, and more.
To use this template, import it with the version number and utilize the `resume` or `cv` function:
```typst
#import "@preview/finely-crafted-cv:0.1.0": *
#import "@preview/finely-crafted-cv:0.2.0": *
#show: resume.with(
name: "Amira Patel",
+14 -10
View File
@@ -1,14 +1,14 @@
// Constants
#let SIZE_HUGE = 1.3em
#let SIZE_HUGE = 1.5em
#let SIZE_LARGE = 1.1em
#let SIZE_NORMAL = 1em
#let SIZE_SMALL = 0.9em
#let SIZE_TINY = 0.7em
#let BODY_FONT = "Libertinus Serif"
#let BODY_FONT = "Source Serif Pro"
#let BODY_SIZE = 11pt
#let BODY_WEIGHT = "light"
#let HEADING_FONT = "Libertinus Serif"
#let HEADING_FONT = "Source Sans Pro"
#let PAGE_MARGIN = 0.5in
@@ -20,25 +20,28 @@
#let FOOTER_TEXT_WEIGHT = "thin"
#let HEADLINE_NAME_SIZE = SIZE_HUGE
#let HEADLINE_NAME_WEIGHT = "black"
#let HEADLINE_NAME_WEIGHT = "bold"
#let HEADLINE_HRULE_STROKE = 1pt + black
#let TAGLINE_SIZE = SIZE_NORMAL
#let TAGLINE_STYLE = "italic"
#let TAGLINE_WEIGHT = "regular"
#let SECTION_HEADING_SIZE = 0.7em // TODO: this seems wrong, should be SIZE_NORMAL (etc)
#let SECTION_HEADING_WEIGHT = "bold"
#let SECTION_HEADING_HRULE_STROKE = 0.75pt + black.lighten(25%)
#let SECTION_HEADING_SIZE = 0.8em // TODO: this seems wrong, should be SIZE_NORMAL (etc)
#let SECTION_HEADING_WEIGHT = "semibold"
#let SECTION_HEADING_HRULE_STROKE = 0.75pt + navy.lighten(10%)
#let SECTION_HEADING_SPACE_ABOVE = 1em
#let SECTION_HEADING_SPACE_BELOW = 0.5em
#let SECTION_HEADING_BLOCK_FILL = luma(100%) //gradient.linear(blue.lighten(99%), luma(100%))
#let SECTION_HEADING_BLOCK_RADIUS = 2pt
#let SECTION_HEADING_BLOCK_OUTSET = 0.2em
#let COMPANY_ICON_SIZE = SIZE_NORMAL
#let COMPANY_ICON_SPACING = 0.25em
#let COMPANY_NAME_SIZE = SIZE_LARGE
#let COMPANY_NAME_WEIGHT = "bold"
#let COMPANY_NAME_WEIGHT = "semibold"
#let COMPANY_DATE_SIZE = COMPANY_NAME_SIZE
#let COMPANY_DATE_WEIGHT = "bold"
#let COMPANY_DATE_WEIGHT = "semibold"
#let COMPANY_BLOCK_BELOW = 1.3em
#let JOB_NAME_SIZE = SIZE_NORMAL
@@ -49,8 +52,9 @@
#let JOB_LOCATION_WEIGHT = "light"
#let JOB_BLOCK_ABOVE = 0.6em
#let JOB_BLOCK_BELOW = 1em
#let EMPTY_JOB_NUDGE = -0.75em
#let TABLE_HEADER_COLOR = blue.lighten(60%)
#let TABLE_HEADER_COLOR = blue.lighten(70%)
#let TABLE_ZEBRA_COLOR_0 = green.lighten(85%)
#let TABLE_ZEBRA_COLOR_1 = green.lighten(95%)
+14 -2
View File
@@ -32,6 +32,7 @@
header: context {
if here().page() == 1 {
text(
font: heading-font,
size: HEADER_SIZE,
grid(
columns: (1fr, auto, auto, auto, auto, auto),
@@ -79,12 +80,16 @@
block(
above: SECTION_HEADING_SPACE_ABOVE,
below: SECTION_HEADING_SPACE_BELOW,
fill: SECTION_HEADING_BLOCK_FILL,
radius: SECTION_HEADING_BLOCK_RADIUS,
outset: SECTION_HEADING_BLOCK_OUTSET,
breakable: false,
[
#text(size: SECTION_HEADING_SIZE, weight: SECTION_HEADING_WEIGHT, font: heading-font)[
#context counter(heading).display()
#upper(it.body)
#smallcaps(it.body)
]
#v(-0.25em)
#hrule(stroke: SECTION_HEADING_HRULE_STROKE)
]
)
@@ -103,6 +108,7 @@
}
},
)
show table.cell.where(y: 0): set text(font: heading-font)
// Save our settings needed in other functions
__set("heading-font", heading-font)
@@ -173,6 +179,12 @@
#let school-heading = company-heading
#let job-heading(title, location: none, start: none, end: none, comment: none, body) = {
// if we have an empty body, we need to nudge this up
let the-body = if repr(body) == "[]" {
v(EMPTY_JOB_NUDGE)
} else {
body
}
block(
above: JOB_BLOCK_ABOVE,
below: JOB_BLOCK_BELOW,
@@ -218,7 +230,7 @@
}
),
grid.cell(colspan: 5, body)
grid.cell(colspan: 5, the-body)
)
)
}
Binary file not shown.
+1 -1
View File
@@ -1,4 +1,4 @@
#import "@preview/finely-crafted-cv:0.1.0": *
#import "@preview/finely-crafted-cv:0.2.0": *
#show: resume.with(
name: "Amira Patel",
Binary file not shown.

Before

Width:  |  Height:  |  Size: 395 KiB

After

Width:  |  Height:  |  Size: 977 KiB

+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "finely-crafted-cv"
version = "0.1.0"
version = "0.2.0"
entrypoint = "lib.typ"
authors = ["Stephen Waits <steve@waits.net>"]
license = "MIT"
+4 -3
View File
@@ -41,7 +41,7 @@ different goals:
### Import the package
```typst
#import "@preview/glossy:0.5.0": *
#import "@preview/glossy:0.5.1": *
```
### Defining Glossary Terms
@@ -186,8 +186,9 @@ Display the glossary using the `glossary()` function:
```typst
#glossary(
title: "Web Development Glossary", // Optional: defaults to Glossary
theme: my-theme, // Optionaal: defaults to theme-twocol
title: "Web Development Glossary", // Optional: defaults to Glossary theme:
my-theme, // Optional: defaults to theme-academic
sort: true, // Optional: whether or not to sort the glossary
ignore-case: false, // Optional: ignore case when sorting terms
groups: ("Web") // Optional: Filter to specific groups
)
+12 -7
View File
@@ -541,6 +541,7 @@
#let glossary(
title: "Glossary",
theme: theme-academic,
sort: true,
ignore-case: false,
groups: (),
) = context {
@@ -601,13 +602,17 @@
group = if group == none { "" } else { group }
// sort entries by case insensitivity if requested
let sorted_entries = current_entries
// 1. create array of tuples with (lower [if ignore-case], entry)
.map(e => { if ignore-case { (lower(e.short), e) } else { (e.short, e) } })
// 2. sort the tuples (by first element then second)
.sorted(key: t => t.first())
// 3. strip away the tuple's first element, leaving an array of entries
.map(t => t.last())
let sorted_entries = if sort {
current_entries
// 1. create array of tuples with (lower [if ignore-case], entry)
.map(e => { if ignore-case { (lower(e.short), e) } else { (e.short, e) } })
// 2. sort the tuples (by first element then second)
.sorted() // NOTE: sorted() is NOT language-aware
// 3. strip away the tuple's first element, leaving an array of entries
.map(t => t.last())
} else {
current_entries
}
// add entries to this group's output map
output.insert(group, sorted_entries)
+2 -2
View File
@@ -203,7 +203,7 @@
if is_acronym {
// Use acronym rules
let first_char = upper_word.slice(0,1)
let first_char = upper_word.codepoints().slice(0,1).first()
if acronym_vowels.contains(first_char) {
"an"
} else {
@@ -211,7 +211,7 @@
}
} else {
// Non-acronym rules
let first_char = lower_word.slice(0,1)
let first_char = lower_word.codepoints().slice(0,1).first()
// Special cases for words matching a set of known 'silent h' prefixes
let silent_h_words = (
+23
View File
@@ -0,0 +1,23 @@
first:
short: "DAL"
long: "first"
second:
short: "cab"
long: "second"
third:
short: "delta"
long: "third"
fourth:
short: "COO"
long: "fourth"
fifth:
short: "cuckoo"
long: "fifth"
sixth:
short: "ČR"
long: "sixth"
Binary file not shown.

After

Width:  |  Height:  |  Size: 183 KiB

+13
View File
@@ -0,0 +1,13 @@
#import "/lib.typ":*
#show: init-glossary.with(yaml("glossary.yml"))
@first, @second, @third, @fourth, @fifth, @sixth
#glossary(ignore-case: false, sort: true)
#line(length: 20em)
#glossary(ignore-case: true, sort: true)
#line(length: 20em)
#glossary(ignore-case: false, sort: false)
#line(length: 20em)
#glossary(ignore-case: true, sort: false)
+23
View File
@@ -0,0 +1,23 @@
cab:
short: "cab"
long: "taxi cab"
coo:
short: "COO"
long: "Chief Operations Officer"
cuckoo:
short: "cuckoo"
long: "really crazy"
delta:
short: "delta"
long: "difference between two values"
dal:
short: "DAL"
long: "Delta Airlines"
čr:
short: "ČR"
long: "Česká Republika"
Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

+20
View File
@@ -0,0 +1,20 @@
#import "/lib.typ":*
#set text(lang: "cs", region: "CZ")
#show: init-glossary.with(yaml("glossary.yml"))
#glossary(ignore-case: true)
#line(length: 20em)
@čr
@cab
@coo
@cuckoo
@delta
@dal
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "glossy"
version = "0.5.0"
version = "0.5.1"
entrypoint = "lib.typ"
authors = ["Stephen Waits <steve@waits.net>"]
license = "MIT"