Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add further theming options #14

Merged
merged 14 commits into from
Feb 17, 2025
Merged

Conversation

das-kaesebrot
Copy link
Contributor

@das-kaesebrot das-kaesebrot commented Feb 3, 2025

Hi, first of all: thank you so much for your port of moderncv to typst!

To better customize (and get closer to the original moderncv TeX package), I have added a few more options and improvements to the library:

  • Optional emphasis #emph() of the subtitle and social links via a new option emphasize-header: true
  • Custom coloring of subtitle and social links via two new options subtitle-color and socials-color which both default to light-gray = rgb("#737373")
  • Removed the comma after the employer field, before the description is printed in cv-line since a comma at this position doesn't feel right in my opinion.
  • Decreased the size of the cv-line description (everything in the last dictionary item of elements) to 10.5pt. If text is being formatted by the user directly here its not affected:

The following would print "my text" with 10.5pt size:

#cv-entry(
  date: [since 2025],
  employer: [Workplace],
  title: [My Title],
  [#linebreak()my text],
)

...while this would print "my text" with 15pt size:

#cv-entry(
  date: [since 2025],
  employer: [Workplace],
  title: [My Title],
  [#linebreak()#text(size: 15pt, "my text")],
)
  • Tightened spacing above to 1pt for all blocks generated via _cv-line
  • Added a new socials field address without an icon or link for simply adding an address to the socials section.

I'd love to hear your opinions on this!

@Orbion-J
Copy link
Contributor

Nice improvements!

For the address entry, I am using rn a custom social with the house icon from fontawesome, maybe you would like to have something like that. I think it can be both nicer and useful as countries have different ways to write down addresses and if you have a bunch of text in a foreign language you cannot always identify right away that it is an address (most of the time it's clear or easy to guess but that can only be better).

About the size of the description, if the user wants to change the size of the whole document text (eg using a #set text(8pt) it would be really inconvenient to have to put a rule in each description. Maybe use em instead of pt ?

About the remove of the coma, it is a good idea I think but the linebreak should be automatic otherwise we get some text without any coma/space by default. This could be a parameter of the cv-entry with a default settable in the template call, I don't know if we want this to be that complicated.

Copy link
Owner

@pavelzw pavelzw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes look mostly good, sorry for the late review @das-kaesebrot

Copy link
Owner

@pavelzw pavelzw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, this is great! will create later today

@pavelzw pavelzw merged commit 1a3f40d into pavelzw:main Feb 17, 2025
2 checks passed
@pavelzw pavelzw added the enhancement New feature or request label Feb 17, 2025
@pavelzw pavelzw mentioned this pull request Feb 17, 2025
3 tasks
@das-kaesebrot
Copy link
Contributor Author

Great, thank you :)

@das-kaesebrot das-kaesebrot deleted the feature/theming branch February 17, 2025 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants