Welcome to Codidact Meta!
Codidact Meta is the "town hall" (meta-discussion site) for the Codidact community network and the Codidact software. Whether you have bug reports or feature requests, support questions or rule discussions that touch the whole network – this is the site for you.
A Codidact badge/flair for my profile on my web site?
I'd like to put a badge on my website showing details of my account and link Codidact. This is the thing to be displayed, but with my account details:
- Is there an URL I can embed in an iframe?
- An API to resolve the details as JSON?
Has anybody done such a thing yet? If so, how?
Thanks in advance!
2 answers
For comparison and discussion of what we do/don't want to be included, this sounds similar to what SE call "flair" (we don't need to use the same name here).
Note that the image in your question is of a user card, which appears under a post, and doesn't need as much context because it is already on a Codidact page. For displaying on an external website we might want some context such as the Codidact logo or name or both, or the logo or name of the specific community if it isn't an overall Codidact badge.
To demonstrate the potential differences, here is what my user card looks like under a Code Golf SE post:
Contrast this with my Code Golf SE flair for use on an external website:
There is also an overall SE flair showing multiple communities:
Hopefully we can do better than this in terms of use of space, treatment of long usernames, and consistency, but these show that we might want to have some differences from the user card that shows under a post.
In addition to having a community specific and an overall Codidact version, perhaps we could also have a few variations that a user can choose from, depending on what they want to emphasise. For example, Codidact puts less emphasis on the reputation score, so perhaps we could have a version that shows reputation and a version that does not, so a user can prioritise what to use the space for. Similarly we could have multiple sizes, with different amounts of information.
These could all be listed in a dedicated page, perhaps a tab on the user page, and each one could be accompanied by the raw text to paste into your website's HTML to display it.
On Codidact your profile is global (you have the same name and avatar everywhere), but the stats shown in that block are community-specific. I can imagine people wanting to generate these images both globally and for specific communities. For the latter, we'll need a way to indicate which community the image represents.
Regardless of what we do about per-community favicons, a compact logo for each community as suggested there might be part of the community-specific image here. We'd also want to get "Codidact" in there, either the logo or the name. Maybe something like this? (Not exactly this; I'm terrible at graphic design. But maybe we can move these elements around somehow?)

2 comment threads