summaryrefslogtreecommitdiff
path: root/smoke/astro.build-main/src/components/ContributorAvatar.astro
diff options
context:
space:
mode:
Diffstat (limited to 'smoke/astro.build-main/src/components/ContributorAvatar.astro')
-rw-r--r--smoke/astro.build-main/src/components/ContributorAvatar.astro61
1 files changed, 0 insertions, 61 deletions
diff --git a/smoke/astro.build-main/src/components/ContributorAvatar.astro b/smoke/astro.build-main/src/components/ContributorAvatar.astro
deleted file mode 100644
index 24debe31f..000000000
--- a/smoke/astro.build-main/src/components/ContributorAvatar.astro
+++ /dev/null
@@ -1,61 +0,0 @@
----
-const {obj, size, type} = Astro.props;
-let color, label;
-switch (type) {
- case 'staff':
- color= 'var(--color-red)';
- label= 'Staff';
- break;
- case 'l3':
- color= 'var(--color-purple)';
- label= 'Core';
- break;
- case 'l2':
- color= 'var(--color-blue)';
- label= 'Maintainer';
- break;
- default:
- color = 'none';
- break;
-}
----
-<a class="avatar" title={`@${obj.login}`} href={obj.html_url}>
- <div class="avatar-image-border" style={`
- box-shadow:
- 0px 0px 4px 0px ${color};`}>
- <div class="avatar-image" style={`
- width: ${size}px;
- height: ${size}px;
- background-image: url("${obj.avatar_url}"); `}>
- </div>
- </div>
- {label && <div class="badge" style={`background-color: ${color}`}>{label}</div>}
-</a>
-
-<style>
-.avatar {
- position: relative;
- display: block;
-}
-.avatar-image-border {
- overflow: hidden;
- border-radius: 50%;
-
-}
-.avatar-image {
- background-size: 100% 100%;
- background-position: center center;
- transition: background-size 400ms ease-out, filter 200ms ease-out;
-}
- .badge {
- position: absolute;
- right: -6px;
- bottom: 0;
- border-radius: 6px;
- background-color: limegreen;
- padding: 2px 6px;
- font-size: 11px;
- color: white;
- font-weight: bold;
- }
-</style> \ No newline at end of file