diff --git a/src/components/AboutFooter.astro b/src/components/AboutFooter.astro index e1eb195..64c5d7f 100644 --- a/src/components/AboutFooter.astro +++ b/src/components/AboutFooter.astro @@ -4,6 +4,30 @@ import * as config from '../config.yaml'; import core from '../core.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 +} + ---