Skip to content

Commit

Permalink
chore add party hat SVG image for creators' avatars
Browse files Browse the repository at this point in the history
  • Loading branch information
jagcruz committed Sep 11, 2024
1 parent b9211a4 commit b9d2d41
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 1 deletion.
60 changes: 60 additions & 0 deletions public/assets/images/party-hat.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 29 additions & 1 deletion src/components/Creator/Creator.astro
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,16 @@ const { name, description, avatar, direction, links } = Astro.props;

<article class=`creator ${direction}`>
<header>
<img src={`${BASE_URL}/assets/images/creators/${avatar}`} alt={name} class="avatar" />
<div
class:list={[
'avatar-wrapper',
{
party: avatar.includes('odracirdev')
}
]}
>
<img src={`${BASE_URL}/assets/images/creators/${avatar}`} alt={name} class="avatar" />
</div>

<div class="creator-card">
<h2>{name}</h2>
Expand Down Expand Up @@ -60,6 +69,25 @@ const { name, description, avatar, direction, links } = Astro.props;
align-items: center;
gap: 2rem;

& .avatar-wrapper {
position: relative;

&.party::after {
content: '';
width: 50%;
height: 50%;
position: absolute;
background-image: url('/ana-cards-web/assets/images/party-hat.svg');
background-size: contain;
background-position: center;
background-repeat: no-repeat;
rotate: 45deg;
z-index: 1;
inset-block-start: -4rem;
inset-inline-end: -4rem;
}
}

& .avatar {
object-fit: cover;
aspect-ratio: 1 / 1;
Expand Down

0 comments on commit b9d2d41

Please sign in to comment.