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

Header Info Icons can be more flexible and customizable #67

Open
yunanwg opened this issue Oct 9, 2024 · 5 comments
Open

Header Info Icons can be more flexible and customizable #67

yunanwg opened this issue Oct 9, 2024 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@yunanwg
Copy link
Owner

yunanwg commented Oct 9, 2024

It seems to be a recurrent request to make the header icons more customizable (#63, #59, #28, #11), yet with current implementation it is harder than expected, because:

  1. Currently Typst's path handling functionality is very limited. With templating capabilities, users can not point to their right path unless hardcoding absolute paths; this make any img(Path) import impossible.
  2. The new metadata.toml is intended to keep textual metadata, but beyond that it's hard to invoke functions from it unless we use some really ugly hacks.
  3. I always intend to keep the template simple, structured and opinionated. There are requests that can be easily done (adding more hardcoded icons, more fields, etc), but one should balance between simplicity and versatility. It's not preferable to have a 2000-lines template just to cover every edge cases.

In this regard, I would like to keep this issue open so that we could find a more elegant way to handle this functionality.

@yunanwg yunanwg pinned this issue Oct 9, 2024
@munzirtaha
Copy link

What makes using the present approach better than your previous one? or maybe simply having one or two files where everything is exposed to the user? All that's required of a novice user is to update the placeholder text; no coding knowledge is required. Apart from a lot fewer lines of code, an experienced user would have all control. For example. As of right now, I've discovered that formatting my resume in this way suits me better. e.g.

#let header(name, font, size, color, title) = {
  grid(
    columns: (1fr, 13%),
    [
      #text(font: font, weight: "bold", size, name)
      #v(-2em)
      #set text(primary_color)
      #smallcaps(title)

       #link("tel:+00") |  #link("mailto:m@example.com") | #link("https://github.com/example")[ example] | #link("https://linkedin.com/in/example")[ example]
    ],
    [#box(clip: true, radius: 50%, image("assets/photo.jpg"))],
  )
}
#header(
  [John *Doe*],
  header_font,
  header_font_size,
  primary_color,
  "JOB TITLE",
)

It took me hours to replicate your nice template, but it's easier then. In all cases your work and attitude is very much appreciated and this is just one user perspective.

@yunanwg
Copy link
Owner Author

yunanwg commented Oct 10, 2024

Thanks @munzirtaha for your engagement too, really appreciated it!

My philosophy is kind of that templating should separate styles and contents as much as possible, though sometimes it can be paradoxal. Simplicity and flexibility is definitely another dilemma to take into account, and apparently I am falling more on the first one.

But still bravo for spending time and make your own template based on this one, your approach is indeed more flexible and customizable! If you want, I'd encourage you to share your forked version, I'd be happy to put it in my description saying that it's intended for those who love to have more fine-grained control on their template.

@munzirtaha
Copy link

Thanks for your kind words. If you think it could be useful I will make it available.

@munzirtaha
Copy link

As per your suggestion, I uploaded my approach to typst-cv. I hope it helps individuals that require their own customization, and I would be delighted to hear your opinions. Thanks again.

Repository owner deleted a comment Oct 24, 2024
@yunanwg yunanwg added the help wanted Extra attention is needed label Nov 2, 2024
@yunanwg
Copy link
Owner Author

yunanwg commented Nov 2, 2024

@munzirtaha you are welcome! I've added your repo on my README :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants