Skip to content

Commit

Permalink
feat(component): Add bio to show user info
Browse files Browse the repository at this point in the history
Show its icon, name and description.
  • Loading branch information
5ouma committed Nov 8, 2024
1 parent 0fb0bd7 commit 165ecc0
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/components/Bio/Bio.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
import "../../styles/global.css";
import "./style.css";
export type Props = {
name: string;
description: string;
icon: string;
};
const props = Astro.props;
---

<div id="bio">
<div id="profile">
<img src={props.icon} alt="icon" loading="lazy" decoding="async" />
<span id="name">{props.name}</span>
</div>
<span id="description">{props.description}</span>
</div>
36 changes: 36 additions & 0 deletions src/components/Bio/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#bio {
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
gap: 0.3rem;
}

#profile {
display: flex;
align-items: center;
gap: 0.3rem;
}

img {
width: 6rem;
height: auto;
}

span {
font-family: "LINE Seed JP" sans-serif;
font-style: normal;
line-height: normal;
color: var(--foreground);
}

#name {
font-size: 2.5rem;
font-weight: bold;
}

#description {
font-size: 0.9rem;
font-weight: normal;
white-space: pre-line;
}

0 comments on commit 165ecc0

Please sign in to comment.