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

gravatar using id #2

Open
MasseGuillaume opened this issue Oct 20, 2012 · 3 comments
Open

gravatar using id #2

MasseGuillaume opened this issue Oct 20, 2012 · 3 comments

Comments

@MasseGuillaume
Copy link

<div id="gravatar_wrapper"><div id="gravatar_image"><img src={in} alt="Gravater" /></div></div>

please change id="gravatar_image" to class="gravatar" as id must be unique and you can use this widget multiple times in a single page.

@d6y
Copy link
Member

d6y commented Oct 20, 2012

Presumably we should do the same for gravatar_wrapper too?

Perhaps an idea would be to have a method on the object to just get the image URL so anyone can use the class to create whatever kind of mark up they like.

@MasseGuillaume
Copy link
Author

yes I think this widget should just create something like

private def html(in: String, alt: String, class: Option[String]): NodeSeq = {
    <img src={in} alt={alt} class={class} />
  }

@d6y
Copy link
Member

d6y commented Oct 20, 2012

If we want to change the behaviour, we should discuss that on the mailing list.

Adding additional behaviour may be nicer for anyone currently using the widget. This could do with some unit tests/specs too, to make sure we don't break compatibility.

Anyone using Gravatar/Widgets want to take this on? Otherwise, I'll get round to it at some point.

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

2 participants