tfrere's picture
tfrere HF Staff
feat(editor): WYSIWYG NodeView for HfUser cards
7814104
/* ---------------------------------------------------------------------------
Hugging Face user profile card
Shared between editor (HfUserView NodeView) and publisher (HfUser
transformer). The DOM mirrors `app/src/components/HfUser.astro`
from the upstream research-article-template so the same authored
content renders identically in both places.
<div class="hf-user">
<div class="hf-user__left">
<img class="hf-user__avatar" .../>
<span class="hf-user__text">
<a class="hf-user__name">Display Name</a>
<span class="hf-user__row">
<a class="hf-user__username">@handle</a>
</span>
</span>
</div>
</div>
--------------------------------------------------------------------------- */
.hf-user {
display: inline-flex;
align-items: center;
gap: 10px;
padding: 10px 10px 10px 12px;
border-radius: 12px;
box-shadow: none;
}
.hf-user__left {
display: flex;
align-items: center;
gap: 10px;
text-decoration: none;
color: inherit;
}
.hf-user__avatar {
display: block;
width: 44px;
height: 44px;
border-radius: 50%;
object-fit: cover;
box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12) inset;
}
.hf-user__text {
display: flex;
flex-direction: column;
line-height: 1.1;
}
.hf-user__row {
display: inline-flex;
align-items: center;
white-space: nowrap;
}
.hf-user__name {
font-size: 14px;
font-weight: 700;
}
.hf-user__username {
font-size: 12px;
color: var(--muted-color);
text-decoration: underline !important;
text-underline-offset: 2px;
text-decoration-thickness: 0.06em;
text-decoration-color: var(--link-underline);
}
.hf-user a {
color: inherit;
text-decoration: none;
border-bottom: none;
}
.hf-user-list {
display: flex;
flex-wrap: wrap;
gap: 12px;
}