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

Provide some guidelines in the README for adding social networks #26

Open
AngeloStavrow opened this issue Oct 18, 2018 · 2 comments
Open
Labels
feature proposal New feature or request good first issue Good for newcomers

Comments

@AngeloStavrow
Copy link
Owner

It's faster for users to find the account they want to add if the social networks are listed alphabetically in config.toml.example; this ordering should extend to the presentation of the icons in layout/partials/social.html as well.

We also have to think about the implications of how many social icons we add for readers on small screens. As it stands, the icon size is about as small as I'm comfortable with; how should we handle overflow?

@AngeloStavrow AngeloStavrow added feature proposal New feature or request good first issue Good for newcomers labels Oct 20, 2018
@dpflug
Copy link

dpflug commented Nov 2, 2018

Something I've done in my playing around with creating a theme was format the social network config like so:

[params.social.github]
  name = "GitHub"
  url = "https://github.com/dpflug"
  class = "u-url"
  icon = "/icons/github.svg"

[params.social.email]
  name = "E-mail"
  url = "mailto:user@host.email"
  class = "u-email"

etc, and then in the template, use:

{{ range $key, $value := .Site.Params.Social }}
<a rel="me" class="{{ $value.class }}" href="{{ $value.url }}">
  <img src="{{ $value.icon }}" alt="{{ $value.name }}">
</a>
{{ end }}

Don't know if that's the direction you want to go, but it works pretty well for me.

@AngeloStavrow
Copy link
Owner Author

That's an interesting idea. I like having some sensible defaults included as an example that users can copy as needed (e.g., your params.social.email and a params.social.github or some network that is IndieWeb/IndieAuth-friendly). I'll think on this some more, thanks for your input — and if you have any further thoughts, please do share!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature proposal New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants