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

refactor social icon logic #256

Closed
regisphilibert opened this issue Feb 5, 2020 · 1 comment
Closed

refactor social icon logic #256

regisphilibert opened this issue Feb 5, 2020 · 1 comment
Assignees
Milestone

Comments

@regisphilibert
Copy link
Member

regisphilibert commented Feb 5, 2020

We should use the same code (with small alteration) for every social icon as this partial is getting out of hand :)

Something like:

{{ range $social_services }}
{{ with .Param .key }}
<a href="{{ .URL }}" target="_blank" class="link-transition medium link dib z-999 pt3 pt0-l mr1" title="{{ .title }} link" rel="noopener" aria-label="follow on Medium——Opens in a new window">
  {{ partial (printf "svg/%s.svg" ,.key }} (dict "size" $icon_size) }}
  {{- partial "new-window-icon.html" . -}}
</a>
{{ end }}
{{ end }}

Of course with checking that the svg partial exist and fallback on a default etc...

@regisphilibert
Copy link
Member Author

Closed in favor of #422

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant