diff options
| author | Yuqian Yang <crupest@crupest.life> | 2026-01-23 23:16:45 +0800 |
|---|---|---|
| committer | Yuqian Yang <crupest@crupest.life> | 2026-01-23 23:16:45 +0800 |
| commit | 78e3e234877cb10ca1088df31e831b36fa4a12c0 (patch) | |
| tree | a4b86275895b33d47df4686e5ce8f98b57016f90 /www-2/src/components/Friend.astro | |
| parent | 3af5ef00b38c6962c6e3f63add0312fa6537b74b (diff) | |
| download | crupest-78e3e234877cb10ca1088df31e831b36fa4a12c0.tar.gz crupest-78e3e234877cb10ca1088df31e831b36fa4a12c0.tar.bz2 crupest-78e3e234877cb10ca1088df31e831b36fa4a12c0.zip | |
HALF WORK!
Diffstat (limited to 'www-2/src/components/Friend.astro')
| -rw-r--r-- | www-2/src/components/Friend.astro | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/www-2/src/components/Friend.astro b/www-2/src/components/Friend.astro new file mode 100644 index 0000000..d0de0ab --- /dev/null +++ b/www-2/src/components/Friend.astro @@ -0,0 +1,49 @@ +--- +import githubIcon from "../assets/img/github.png"; + +interface Props { + name: string; + url?: string; + githubUrl: string; + avatarUrl: string; + tag?: string; +} + +const { name, githubUrl, url = githubUrl, avatarUrl, tag } = Astro.props; +--- + +<div class="friend"> + <a rel="noopener noreferrer" href={url}> + <img + class="friend-avatar" + alt={`Friend ${name}'s avatar`} + src={avatarUrl} + width="80" + height="80" + /><br />{name}</a + > + <a rel="noopener noreferrer" href={githubUrl}> + <img class="friend-github" src={githubIcon.src} /> + </a><br /> + {tag && <span class="friend-tag">{tag}</span>} +</div> + +<style> +.friend a { + font-family: unset; +} + +.friend-avatar { + object-fit: cover; +} + +.friend-github { + width: 1em; + vertical-align: middle; + margin-right: -0.5em; +} + +.friend-tag { + font-size: 0.8em; +} +</style>
\ No newline at end of file |
