rbardini / jsonresume-theme-even

A flat JSON Resume theme, compatible with the latest resume schema
https://jsonresume-theme-even.rbrd.in
MIT License
27 stars 32 forks source link

Add ability to change ordering of sections #19

Closed anishg24 closed 11 months ago

anishg24 commented 1 year ago

TL;DR You can define a custom ordering of sections within the meta.order field of your resume.json like below:

{
  "meta": {
      "theme": "even",
      "colors": {
        "background": ["#ffffff", "#191e23"],
        "dimmed": ["#f3f4f5", "#23282d"],
        "primary": ["#191e23", "#fbfbfc"],
        "secondary": ["#6c7781", "#ccd0d4"],
        "accent": ["#0073aa", "#00a0d2"]
      },
      "order": [
        "work",
        "volunteer",
        "publications",
        "education",
        "projects",
        "awards",
        "certificates",
        "skills",
        "languages",
        "interests",
        "references"
      ]
    }
}

My reasoning for this change that I didn't like the default ordering of the theme, I wanted to make some sections appear first before others. Thanks to the modularity of this theme, it was a relatively simple fix. This fix shouldn't affect any current users, as if no order supplied, the default one provided by the maintainers will be used.

This fix also means that you can choose to omit certain sections altogether or (if you want) display the same section again and again.

Because of a little weirdness in newlines generating, I had to provide a new snapshot file, but you can see that the changes are minimal and only apply to a couple of newlines.

I have tested these changes to a success on my local resume, the sample resume, as well as if the order has an invalid/misspelt selection. By default, if the order contains a section that doesn't exist, it simply ignores it.

Lastly, I have modularized the code so that it fits the overall code-style of this repository.

Please let me know if you have any other questions, and hats off to the team for making these edits quite simple.

anishg24 commented 1 year ago

Great optimizations @rbardini, I forget the power of JavaScript sometimes. Thank you for taking the time to review!

cometsong commented 1 year ago

@anishg24 - Is this PR still active for you? If not, I'll take it on and make the needed changes. This mod of section ordering is an excellent idea!

anishg24 commented 1 year ago

@cometsong Unfortunately my courses started to kick it up a notch so I don't think I can finish this until my next break, but you are more than welcome to make the remaining changes!

cometsong commented 11 months ago

I've put the fixes to this into a new PR #20 😃

rbardini commented 11 months ago

Closing in favor of #20.