cowboysmall-tools / hugo-devresume-theme

A free resume/CV template made for software developers.
MIT License
260 stars 128 forks source link

Allow disabling avatar #5

Closed cberez closed 4 years ago

cberez commented 4 years ago

Hi, nice idea to port! I'd like to be able to disable the avatar, made it available by default.

C.

cowboysmall commented 4 years ago

I'm going to reject and close this pull request as I don't see the need for this functionality to be supported.

I think if you want this functionality supported, you can add this within your own project by extending summary.html and adding the param to your config.toml.

If I was going to support something like this I would probably add this to summary.html:

{{ if .Site.Params.profile.avatar }}
<img class="resume-profile-image mb-3 mb-md-0 mr-md-5 ml-md-0 rounded mx-auto" src="{{ .Site.BaseURL }}assets/images/{{ .Site.Params.profile.avatar }}" alt="image">
{{ end }}

and then if there is no avatar param set in the config then the avatar will be disabled.

J.K.

cberez commented 4 years ago

Well I thought everybody doesn't want his face on his resume, it's not always customary depending on the country.

Your if implementation is way simpler, didn't think about it thanks.

Edit: quickly tried the impl locally, it's not working, img tag is still here and displays the alt.

C.

cowboysmall commented 4 years ago

Make sure you pull latest. I've added the functionality as described in the above comment. You don't need to override summary.html any longer - just comment out the avatar param.

J.K.

cowboysmall commented 4 years ago

And by the way, your comment is fair - thanks for your input.

J.K.

cberez commented 4 years ago

Updated my subrepo and it works, don't know why it didn't when I tested locally Thanks for taking the time and adding it to the theme

C.

cowboysmall commented 4 years ago

No problem. If you think of anything else then maybe create an issue. We can discuss, and if it makes sense I'll either make an enhancement, or suggest you submit a pull request.

Thanks again,

J.K.

p.s. I'm planning to add a blog theme from the same author soon - when I have the time.