community footer: add core team and speakers

This commit is contained in:
tree🌴 2024-02-23 23:30:55 +01:00
parent f76b358530
commit db2641162d
2 changed files with 69 additions and 12 deletions

View file

@ -4,6 +4,30 @@ import * as config from '../config.yaml';
import core from '../core.json'; import core from '../core.json';
import contributors from '../contributors.json'; import contributors from '../contributors.json';
function findPerson(src) {
const p = core.people.find(p => src.refs?.twitter ? p.refs?.twitter === src.refs.twitter : (src.refs?.bsky ? p.refs.bsky === src.refs.bsky : {}))
if (p) {
p.ct = src
}
return p
}
function personLink(person) {
return person.refs?.twitter ? `https://twitter.com/${person.refs.twitter}` : (person.refs?.bsky ? `https://bsky.app/profile/${person.refs.bsky}` : '#')
}
function coreTeamGithubLink(person) {
return `https://github.com/${person.ct.refs.github}`
}
function filterCoreTeam(person) {
if (person.login) {
return !(core['core-team'].find(ctm => ctm.refs.github.toLowerCase() === person.login.toLowerCase()))
}
const res = core['core-team'].find(ctm => ctm.refs.twitter ? ctm.refs.twitter?.toLowerCase() === person.refs?.twitter?.toLowerCase() : ctm.refs?.bsky?.toLowerCase() === person.refs?.bsky?.toLowerCase())
return !res
}
--- ---
<div class="mt-20"> <div class="mt-20">
@ -34,9 +58,32 @@ import contributors from '../contributors.json';
<h1><a href="https://docs.web3privacy.info/get-involved">Join the Community</a></h1> <h1><a href="https://docs.web3privacy.info/get-involved">Join the Community</a></h1>
<div>{config.landing.community}</div> <div>{config.landing.community}</div>
<div class="flex gap-4 flex-wrap my-14 items-center"> <h2 class="my-6">Core Team</h2>
{contributors.items.map((contrib) => ( <div class="flex gap-4 flex-wrap mb-14 items-center">
<div><a href={contrib.html_url} target="_blank" title={contrib.login}><img src={contrib.avatar_url} class="w-16 rounded-full aspect-square"></a></div> {core['core-team'].map(findPerson).map((person) => (
<div>
<a href={coreTeamGithubLink(person)}>
<img src={person.imageUrl} title={person.name} class="w-14 rounded-full aspect-square" />
</a>
</div>
))}
</div>
<h2 class="my-6">Speakers</h2>
<div class="flex gap-4 flex-wrap mb-14 items-center">
{core.people.filter(filterCoreTeam).filter(p => p.imageUrl).map((person) => (
<div>
<a href={personLink(person)}>
<img src={person.imageUrl} title={person.name} class="w-14 rounded-full aspect-square" />
</a>
</div>
))}
</div>
<h2 class="my-6">Git Contributors</h2>
<div class="flex gap-4 flex-wrap mb-14 items-center">
{contributors.items.filter(filterCoreTeam).map((contrib) => (
<div><a href={contrib.html_url} target="_blank" title={contrib.login}><img src={contrib.avatar_url} class="w-14 rounded-full aspect-square"></a></div>
))} ))}
</div> </div>

View file

@ -18,6 +18,14 @@
"telegram": "https://t.me/web3privacynow" "telegram": "https://t.me/web3privacynow"
}, },
"core-team": [ "core-team": [
{
"name": "Mykola",
"refs": {
"github": "msiusko",
"twitter": "nicksvyaznoy",
"matrix": "k1983:matrix.org"
}
},
{ {
"name": "Tree", "name": "Tree",
"refs": { "refs": {
@ -27,14 +35,6 @@
"matrix": "tree:gwei.cz" "matrix": "tree:gwei.cz"
} }
}, },
{
"name": "Mykola",
"refs": {
"github": "msiusko",
"twitter": "nicksvyaznoy",
"matrix": "k1983:matrix.org"
}
},
{ {
"name": "PG", "name": "PG",
"refs": { "refs": {
@ -47,7 +47,8 @@
"name": "Coinmandeer", "name": "Coinmandeer",
"refs": { "refs": {
"github": "coinmandeer", "github": "coinmandeer",
"matrix": "coinmandeer:matrix.org" "matrix": "coinmandeer:matrix.org",
"twitter": "KeenOfCoin"
} }
} }
], ],
@ -132,6 +133,15 @@
} }
], ],
"people": [ "people": [
{
"id": "coinmandeer",
"name": "Coinmandeer",
"refs": {
"twitter": "KeenOfCoin",
"github": "coinmandeer"
},
"imageUrl": "https://data.web3privacy.info/img/people/coinmandeer.png"
},
{ {
"id": "jaromil", "id": "jaromil",
"name": "Denis Roio", "name": "Denis Roio",