mintyfrankie / brilliant-CV-Submodule

Apache License 2.0
17 stars 16 forks source link

feat(template): Make personalInfo flexible #18

Closed mimame closed 11 months ago

mimame commented 1 year ago

Hi, I'm in love with your template! I was reading this https://github.com/mintyfrankie/brilliant-CV-Submodule/issues/6 What do you think about something like this? Idea: medatada.typ

#import "@preview/fontawesome:0.1.0": *
#let personalInfo = (
  (icon: fa-phone(), text: "+33 7 77 77 77 77"),
  (icon: fa-square-github(), link: "https://github.com/mimame", text: "mimame"),
)

Thanks so much in advance, I hope to be useful

mintyfrankie commented 1 year ago

Hey @mimame thanks for bringing this up!

Yeah indeed such configuration would be of course more flexible, and I think it would be really great for more advanced users; yet I would like to list out two major drawbacks for us to leverage:

  1. The general users will have to read through FontAwesome docs for fixing each icon, which brings more complexity and "learning curve";
  2. This, of course, will bring a breaking change to the template.

Actually, I was hesitating between making a more "opinionated" template, as kind of it is right now, or a more universal one.

Any opinion is appreciated!

mimame commented 1 year ago

I think the equilibrium could be keep the predefined personalInfo and make only extraInfo flexible What do you think?

  1. Only needed to read FontAwesome for adding your specific extra fields
  2. Don't break the template because the personalInfood won't be touched
mintyfrankie commented 1 year ago

I would suggest that while keeping the personalInfo as a dict untouched, and when iterating through it, we can apply your logic to those pairs with the key containing custom; a quick example:

#let personalInfo = (
  github: "mintyfrankie",
  phone: "+33 6 12 34 56 78",
  email: "john.doe@me.org",
  linkedin: "johndoe",
  custom-1: (icon: fa-phone(), text: "+33 7 77 77 77 77"),
  gitlab: "mintyfrankie",
  homepage: "jd.me.org",
  orcid: "0000-0000-0000-0000",
  custom-2: (icon: fa-square-github(), link: "https://github.com/mimame", text: "mimame"),
  researchgate: "John-Doe",
  extraInfo: "",
)

This might be able not to bring a breaking change, and to apply a flexible functionality as well as flexible list order.

mimame commented 1 year ago

Wonderful @mintyfrankie, you're awesome!

Thanks so much again for creating this template!

mintyfrankie commented 1 year ago

My pleasure!

Would you like to work on a new commit for this PR following this idea? Otherwise I can work on it too when I am available.

mimame commented 1 year ago

Hi @mintyfrankie!

I'm quite busy this week and I think you have a better vision than me about the implementation.

What do you think?

In any case I'm here for supporting and reviewing if necessary

mintyfrankie commented 12 months ago

Hey @mimame I am not sure if I should commit in this branch, so I created another PR regarding the above idea. Feel free to check and tell me what you think!

Thanks a lot for your original idea, it was legit!