feat: ✨ add artist credit for profile picture
This commit is contained in:
parent
deceea3071
commit
b0b745b2eb
5 changed files with 43 additions and 5 deletions
|
@ -1,7 +1,10 @@
|
||||||
<aside webc:root="override">
|
<aside webc:root="override">
|
||||||
<div class="avatar">
|
<figure class="avatar">
|
||||||
<slot name="avatar"></slot>
|
<slot name="avatar"></slot>
|
||||||
</div>
|
<figcaption class="credit">
|
||||||
|
<slot name="credit"></slot>
|
||||||
|
</figcaption>
|
||||||
|
</figure>
|
||||||
<p class="name">
|
<p class="name">
|
||||||
<slot name="name"></slot>
|
<slot name="name"></slot>
|
||||||
</p>
|
</p>
|
||||||
|
@ -76,15 +79,35 @@
|
||||||
grid-template-columns: subgrid;
|
grid-template-columns: subgrid;
|
||||||
justify-items: center;
|
justify-items: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
margin: 0;
|
||||||
|
border-radius: 1em;
|
||||||
|
overflow: clip;
|
||||||
|
|
||||||
|
& > * {
|
||||||
|
grid-area: avatar;
|
||||||
|
}
|
||||||
|
|
||||||
& :where(picture, img) {
|
& :where(picture, img) {
|
||||||
display: block;
|
display: block;
|
||||||
width: var(--sidebar-avatar-size);
|
width: var(--sidebar-avatar-size);
|
||||||
height: var(--sidebar-avatar-size);
|
height: var(--sidebar-avatar-size);
|
||||||
aspect-ratio: 1/1;
|
aspect-ratio: 1/1;
|
||||||
border-radius: 1em;
|
border-radius: inherit;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
& .credit {
|
||||||
|
justify-self: stretch;
|
||||||
|
align-self: end;
|
||||||
|
|
||||||
|
background-color: oklch(from var(--clr-box-background) l c h/0.75);
|
||||||
|
|
||||||
|
font-size: 0.5em;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
margin: 0;
|
||||||
|
padding-block: 0.25em;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:host :where(.name, .species) {
|
:host :where(.name, .species) {
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
{
|
{
|
||||||
"layout": "character.webc",
|
"layout": "character.webc",
|
||||||
"language": "en_US"
|
"language": "en_US",
|
||||||
|
"avatar": {
|
||||||
|
"artist": "Wolfthings",
|
||||||
|
"href": "https://www.furaffinity.net/user/wolfthings"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,9 @@ layout: base.webc
|
||||||
:width="[100, 200, 300, 400, 500, 600]"
|
:width="[100, 200, 300, 400, 500, 600]"
|
||||||
sizes="(min-width: 120em) 250px, (min-width: 64em) 200px, 100px"
|
sizes="(min-width: 120em) 250px, (min-width: 64em) 200px, 100px"
|
||||||
></eleventy-image>
|
></eleventy-image>
|
||||||
|
<template webc:nokeep slot="credit">
|
||||||
|
© <a :href="$data.avatar.href" target="_blank" @text="$data.avatar.artist"></a>
|
||||||
|
</template>
|
||||||
<template webc:nokeep slot="name" @text="fullName"></template>
|
<template webc:nokeep slot="name" @text="fullName"></template>
|
||||||
<template webc:nokeep slot="species" @text="species"></template>
|
<template webc:nokeep slot="species" @text="species"></template>
|
||||||
<traits :@traits="$data.getTraits()"></traits>
|
<traits :@traits="$data.getTraits()"></traits>
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
{
|
{
|
||||||
"layout": "character.webc",
|
"layout": "character.webc",
|
||||||
"language": "en_US",
|
"language": "en_US",
|
||||||
|
"avatar": {
|
||||||
|
"artist": "RainbowT",
|
||||||
|
"href": "https://bsky.app/profile/rainbowt.bsky.social"
|
||||||
|
},
|
||||||
"galleryMuscle": [
|
"galleryMuscle": [
|
||||||
{
|
{
|
||||||
"alt": "Sebin looking aloof (but chill)",
|
"alt": "Sebin looking aloof (but chill)",
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
{
|
{
|
||||||
"layout": "character.webc",
|
"layout": "character.webc",
|
||||||
"language": "en_US"
|
"language": "en_US",
|
||||||
|
"avatar": {
|
||||||
|
"artist": "RyaxShark",
|
||||||
|
"href": "https://bsky.app/profile/ryaxshark.bsky.social"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue