-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add section for community contributors (#83)
This section will be populated by everyone not manually mentioned on credits page that has contributed to the project according to GitHub API Co-authored-by: Barnaby <[email protected]>
- Loading branch information
1 parent
b5ae577
commit 0024f71
Showing
3 changed files
with
123 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
--- | ||
import { Image } from "astro:assets"; | ||
import { community_contributors } from "../data/community-contributors.ts"; | ||
--- | ||
|
||
<div class="community-contributors"> | ||
{ | ||
community_contributors | ||
.map((contributor) => ( | ||
<div class="contributor"> | ||
<a href={contributor.url} target="_blank" aria-label={contributor.name}> | ||
<Image src={contributor.icon} alt="" inferSize /> | ||
</a> | ||
<span class="name tooltip">{contributor.name}</span> | ||
</div> | ||
)) | ||
} | ||
</div> | ||
|
||
<style> | ||
.community-contributors { | ||
display: flex; | ||
justify-content: center; | ||
width: 90%; | ||
margin-left: 5%; | ||
justify-items: center; | ||
align-items: center; | ||
flex-wrap: wrap; | ||
} | ||
|
||
.contributor { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
margin: 0.5em; | ||
padding: 0px; | ||
font-size: 0.9em; | ||
pointer-events: none; | ||
text-decoration: none; | ||
position: relative; | ||
} | ||
|
||
.contributor > a { | ||
height: 3em; | ||
width: 3em; | ||
align-self: center; | ||
border-radius: 100%; | ||
margin: 0.25em; | ||
pointer-events: all; | ||
cursor: pointer; | ||
transition: | ||
width 0.1s ease-in-out, | ||
height 0.1s ease-in-out, | ||
margin 0.1s ease-in-out, | ||
filter 0.1s ease-in-out; | ||
} | ||
|
||
.contributor > a > img { | ||
width: 100%; | ||
height: 100%; | ||
border-radius: 100%; | ||
} | ||
|
||
.contributor > a:hover { | ||
filter: brightness(50%); | ||
height: 3.5em; | ||
width: 3.5em; | ||
margin: 0em; | ||
} | ||
|
||
.tooltip { | ||
position: absolute; | ||
display: block; | ||
top: 100%; | ||
margin: 0.5em; | ||
padding: 0.5em; | ||
border-radius: 0.25em; | ||
opacity: 0; | ||
transition: opacity 0.2s ease-in-out; | ||
z-index: 2; | ||
background-color: rgba(0, 0, 0, 0.75); | ||
backdrop-filter: blur(0.25em); | ||
width: max-content; | ||
max-width: 50vw; /* prevent tooltip going off screen */ | ||
} | ||
.contributor > a:hover ~ .tooltip { | ||
opacity: 1; | ||
} | ||
|
||
.name { | ||
font-family: Titanfall; | ||
font-size: 1em; | ||
align-self: center; | ||
font-weight: light; | ||
white-space: wrap; | ||
} | ||
|
||
a { | ||
display: inline-block; | ||
vertical-align: middle; | ||
width: 16px; | ||
height: 16px; | ||
margin-right: 12px; | ||
pointer-events: none; | ||
margin-top: -2px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Auto-generated from Python script | ||
|
||
export interface CommunityContributor { | ||
url?: string; | ||
icon: string; | ||
name: string; | ||
} | ||
export const community_contributors: CommunityContributor[] = [ | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters