I think it needs to be .username[data-user-card='SomeFamousNick'] a
for that to work, but in any case.
I didn’t see a more direct way to use the widgets to add an icon for now, but you can use this (mildly clumsy) workaround (your users will need to have ‘Verified’ set as their primary group, or you can just target them individually via the data-user-card property if you wanted, although that seems tedious):
edit: just go with @DeanMarkTaylor’s solution below
In </head>
:
<script type="text/discourse-plugin" version="0.4">
api.decorateWidget('poster-name:after', helper => {
return helper.h('i.fa#poster-name-icon');
});
</script>
In CSS:
.group-Verified {
#poster-name-icon:before {
content: "\f0e7";
}
}
Replace "\f0e7"
with whatever FA icon you want, and you’ll need to fiddle with the CSS to get it positioned right, but it’s a start.
Edit - ah, this will show up after titles/names though (instead of right after the username, like the moderator shield), which might not be exactly what you want.
Ah and if instead (or in addition), you just want to do things like color the username of your verified users, put em all in a ‘Verified’ group, make it their primary group, and do something like this:
.group-Verified {
.names .username a {
color: green;
}
}
And there’s already a .poster-avatar-extra
div sitting below each avatar, so you could put stuff below the verified users’ avatars as well, if you wanted.