research page rework

This commit is contained in:
tree🌴 2024-03-04 02:38:21 +01:00
parent 879ba0ad11
commit 126c540176
9 changed files with 346 additions and 73 deletions

View File

@ -3,6 +3,8 @@
import * as config from '../config.yaml';
import core from '../core.json';
import contributors from '../contributors.json';
import { getPersonByGH } from '../lib/core.js';
import PeopleCarousel from '../components/PeopleCarousel.astro';
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 : {}))
@ -16,18 +18,6 @@ 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">
@ -58,20 +48,9 @@ function filterCoreTeam(person) {
<h1><a href="https://docs.web3privacy.info/get-involved">Join the Community</a></h1>
<div>{config.landing.community}</div>
<!--h2 class="my-6">Core Team</h2>
<div class="flex gap-4 flex-wrap mb-14 items-center">
{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 items-center">
{core.people.filter(filterCoreTeam).filter(p => p.imageUrl).map((person) => (
<div class="flex gap-3 flex-wrap items-center">
{core.people.filter(p => !core.teams['core-team'].includes(p.id)).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" />
@ -80,14 +59,16 @@ function filterCoreTeam(person) {
))}
</div>
<div class="flex gap-4 lg:gap-6 pt-4 flex-wrap mt-4 mb-14">
<div class="flex gap-3 lg:gap-6 pt-4 flex-wrap mt-4 mb-14">
<a href={core.links.cfp} class="button inverted"><button>Submit your proposal (CfP)</button></a>
</div>
<h2 class="my-6">Git Contributors</h2>
<div class="flex gap-4 flex-wrap mb-4 items-center">
{contributors.items.filter(filterCoreTeam).map((contrib) => (
<div class="flex gap-3 flex-wrap mb-4 items-center">
{ // filter(p => !core.teams['core-team'].includes(getPersonByGH(p.login)?.id))
contributors.items.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>

View File

@ -5,6 +5,7 @@ import EventsExt from '../events-ext.json';
import core from "../core.json";
import { dateFormat, dateInfo, dateEnd, nameRenderer, ccRenderer, eventStatus, getSpeaker, findExt } from '../lib/events.js';
import SpeakerList from './SpeakerList.astro';
import PeopleCarousel from './PeopleCarousel.astro';
const ext = findExt(EventsExt, item)
const status = eventStatus(item)
@ -12,7 +13,7 @@ const status = eventStatus(item)
<div class="w3pn-event-item">
<div class="event-header flex">
<div class="header-base sm:flex gap-4 grow px-3 py-2.5 sm:px-4 sm:py-3 cursor-pointer">
<div class="header-base sm:flex gap-4 grow px-3 py-2.5 sm:px-4 sm:py-3">
<div class="w-full sm:w-28 flex sm:block sm:text-right leading-normal">
<div class="">{dateFormat(item.date)}</div>
{item.days && item.days > 1 &&
@ -53,14 +54,7 @@ const status = eventStatus(item)
<div class="py-1 grow text-right items-center flex gap-4">
<div class="grow"></div>
{item.speakers &&
<div class="flex -space-x-3">
{item.speakers.map(spId => getSpeaker(core, spId)).slice(0,7).map((speaker) => (
<div><img src={speaker.imageUrl} class="w-8 h-8 aspect-square object-fit rounded-full border-gray-800 border-2" /></div>
))}
{item.speakers.length > 7 &&
<div class="flex items-center justify-center w-8 h-8 rounded-full aspect-square border-2 border-gray-800 bg-gray-800 text-xs">+{item.speakers.length - 7}</div>
}
</div>
<PeopleCarousel items={item.speakers.map(spId => getSpeaker(core, spId))} />
}
{ext && ext.guestCount > 0 &&
<div>

View File

@ -0,0 +1,24 @@
---
import { personLink } from "../lib/core.js";
const { items, limit = 7 } = Astro.props;
let { size = 'w-8 h-8' } = Astro.props;
---
<!--div>{JSON.stringify(items)}</div-->
<div class="">
<div class="flex -space-x-3 flex-wrap">
{items.slice(0, limit).filter(p => p).map((p) => (
<div class="hover:z-0">
<a href={personLink(p)} class="aspect-square inline-block" class:list={[size]}>
<img src={p.imageUrl} class="w-full aspect-square object-cover rounded-full border-gray-800 border-2 hover:border-white" alt={p.name} title={p.name} />
</a>
</div>
))}
{items.length > limit &&
<div class="flex items-center justify-center rounded-full aspect-square border-2 border-gray-800 bg-gray-800 text-xs" class:list={[size]}>
+{items.length - limit}
</div>
}
</div>
</div>

View File

@ -0,0 +1,39 @@
---
import PeopleCarousel from './PeopleCarousel.astro';
import { getPersonByGH } from '../lib/core.js';
const { item } = Astro.props;
---
<div class="w3pn-project-item flex flex-wrap md:flex-nowrap">
<div class="p-6">
<div class="">
<span href={item.links.docs} class="text-white text-xl">{item.title}</span>
<a href={`https://github.com/web3privacy/research/issues/${item.issue}`} class="text-white/30 ml-1">#{item.issue}</span>
<div class="inline-block ml-1.5">
{item.labels.map(label => (
<span class="text-xs ml-2 text-black bg-white px-1 py-0.5 uppercase">{label}</span>
))}
</div>
</div>
{item.caption &&
<div class="mt-1">{item.caption}</div>
}
</div>
<div class="p-6 flex gap-6 justify-end grow">
{item.assignees.length > 0 &&
<PeopleCarousel items={item.assignees.map(getPersonByGH)} size="w-10 h-10" />
}
{(item.links?.docs || item.links?.web) &&
<div class="flex gap-3">
{item.links.docs &&
<a href={item.links.docs} class="button inverted"><button>Docs</button></a>
}
{item.links.web &&
<a href={item.links.web} class="button inverted"><button>View</button></a>
}
</div>
}
</div>
</div>

View File

@ -12,7 +12,7 @@ import core from "../core.json";
<div class="w3pn-speaker-list grid grid-cols-1 gap-6 mt-4">
{item.speakers.map(spId => getSpeaker(core, spId)).map((speaker) => (
<div class="flex gap-4">
<div><img class={`${thumbSize === 'big' ? 'w-16 h-16' : 'w-14 h-14'} aspect-square rounded-full object-contain`} src={speaker.imageUrl} /></div>
<div class={`${thumbSize === 'big' ? 'w-16 h-16' : 'w-14 h-14'}`}><img class={`${thumbSize === 'big' ? 'w-16 h-16' : 'w-14 h-14'} aspect-square rounded-full object-cover`} src={speaker.imageUrl} /></div>
<div>
<div>
<span class="text-white">{speaker.name}</span>

View File

@ -18,38 +18,200 @@
"telegram": "https://t.me/web3privacynow",
"cfp": "https://cfp.web3privacy.info"
},
"core-team": [
"teams": {
"core-team": [
"mykola-siusko",
"tree",
"pg",
"coinmandeer"
]
},
"research": [
{
"name": "Mykola",
"refs": {
"github": "msiusko",
"twitter": "nicksvyaznoy",
"matrix": "k1983:matrix.org"
"issue": 1,
"title": "ZK solutions DB",
"status": "live",
"sort": 1,
"labels": [
"db"
],
"assignees": [
"Msiusko"
],
"caption": "General DB aggregation focused on ZK for privacy.",
"links": {
"web": "https://github.com/web3privacy/web3privacy/tree/main/ZKprivacylandscape#readme",
"docs": "https://docs.web3privacy.info/research/zk-solutions"
}
},
{
"name": "Tree",
"refs": {
"github": "burningtree",
"bsky": "tree.fail",
"email": "tree@tree.fail",
"matrix": "tree:gwei.cz"
"issue": 2,
"title": "Privacy Use-Cases DB",
"status": "live",
"sort": 3,
"labels": [
"db"
],
"assignees": [
"Msiusko"
],
"caption": "Basic DB of the privacy-centric use-cases.",
"links": {
"web": "https://github.com/Msiusko/web3privacy/blob/main/Use-cases.md",
"docs": "https://docs.web3privacy.info/research/usecase-db"
}
},
{
"name": "PG",
"refs": {
"github": "EclecticSamurai",
"twitter": "PG_CDG",
"matrix": "pg_cdg:matrix.org"
"issue": 3,
"title": "Pagency Framework",
"status": "live",
"sort": 5,
"labels": [],
"assignees": [
"Msiusko"
],
"caption": "Pagency framework for facilitation privacy use-cases (privacy services modelling)",
"links": {
"web": "https://github.com/web3privacy/web3privacy/blob/main/Pagency/Pagency%20-%20privacy%20use-case%20facilitation%20framework.pdf",
"docs": "https://docs.web3privacy.info/research/pagency"
}
},
{
"name": "Coinmandeer",
"refs": {
"github": "coinmandeer",
"matrix": "coinmandeer:matrix.org",
"twitter": "KeenOfCoin"
"issue": 4,
"title": "Privacy Projects Hiring",
"status": "live",
"sort": 4,
"labels": [
"db"
],
"assignees": [
"Msiusko"
],
"caption": "Hiring snapshot across the market: total vacancies, grades, technical x non-technical positions, hiring scope within specific companies & domains.",
"links": {
"web": "https://docs.google.com/spreadsheets/d/1dN6bIWyOh01Dl-y1iZh-1TASZxKUefD098BUALcnUb8/edit?usp=sharing",
"docs": "https://docs.web3privacy.info/research/hiring"
}
},
{
"issue": 5,
"title": "Privacy Guides",
"status": "backlog",
"sort": 0,
"labels": [],
"assignees": [],
"links": {}
},
{
"issue": 6,
"title": "Hackathon Curation Pack",
"status": "backlog",
"sort": 2,
"labels": [],
"assignees": [
"EclecticSamurai",
"Msiusko"
],
"links": {}
},
{
"issue": 7,
"title": "Privacy Annual Report 2024",
"status": "backlog",
"sort": 3,
"labels": [],
"assignees": [
"EclecticSamurai",
"Msiusko"
],
"links": {}
},
{
"issue": 8,
"title": "Ethereum Privacy Ecosystem",
"status": "in-progress",
"sort": 0,
"labels": [],
"assignees": [
"Msiusko"
],
"caption": "Comprehensive privacy-centric research aimed to map Ethereum-centric privacy services, use-cases, product stages, missing areas (use-cases), funding landscape etc Supported by MolochDAO",
"links": {
"web": "https://github.com/web3privacy/web3privacy/blob/main/Market%20overview/Ethereum%20Ecosystem/Readme.md",
"docs": "https://docs.web3privacy.info/research/ethereum-privacy-ecosystem/"
}
},
{
"issue": 9,
"title": "Privacy use-cases DB 2.0 (major update)",
"status": "backlog",
"sort": 4,
"labels": [
"db"
],
"assignees": [],
"links": {}
},
{
"issue": 10,
"title": "Privacy features audit concept for security audit organizations & whitehackers",
"status": "backlog",
"sort": 1,
"labels": [],
"assignees": [
"Msiusko"
],
"links": {}
},
{
"issue": 11,
"title": "Scoring model for privacy-services",
"status": "in-progress",
"sort": 1,
"labels": [],
"assignees": [
"Msiusko"
],
"links": {}
},
{
"issue": 12,
"title": "Privacy market outlook (2022)",
"status": "live",
"sort": 2,
"labels": [],
"assignees": [
"Msiusko"
],
"caption": "150-pages report on the state of privacy x web3 from funding to key projects.",
"links": {
"web": "https://github.com/web3privacy/web3privacy/blob/main/Market%20overview/Privacy%20market%20outlook%20in%20Web3%20by%20Mykola%20Siusko%20(Jan%202023).pdf"
}
},
{
"issue": 13,
"title": "Privacy use-cases within the Ukrainian-Russian war",
"status": "live",
"sort": 6,
"labels": [],
"assignees": [
"Msiusko"
],
"caption": "Research how privacy tools can protect human rights, vulnerable audiences within the war, migration & cross-border relations. Supported by Zcash Foundation.",
"links": {
"web": "https://github.com/web3privacy/grants/blob/main/staticobjects/Privacy%20use%20cases%20with%20the%20focus%20on%20Zcash%20(privacy%20coins)_Siusko.pdf"
}
},
{
"issue": 14,
"title": "Privacy market DB",
"status": "live",
"sort": 0,
"labels": [],
"assignees": [],
"caption": "Privacy services x web3 initial market DB aggregation: segmentation, key links (web, git, docs), ecosystem, product liveliness etc. 600 projects in the DB.",
"links": {
"web": "https://github.com/web3privacy/web3privacy?tab=readme-ov-file#contents"
}
}
],
@ -139,7 +301,8 @@
"name": "Coinmandeer",
"refs": {
"twitter": "KeenOfCoin",
"github": "coinmandeer"
"github": "coinmandeer",
"matrix": "coinmandeer:matrix.org"
},
"imageUrl": "https://data.web3privacy.info/img/people/coinmandeer.png"
},
@ -209,7 +372,10 @@
"caption": "Orchestrating lunarpunk events [ETHBrno](https://ethbrno.cz) & [w3ps](https://github.com/web3privacy/w3ps) w/ [gwei.cz](https://gwei.cz)",
"country": "cz",
"refs": {
"bsky": "tree.fail"
"github": "burningtree",
"bsky": "tree.fail",
"email": "tree@tree.fail",
"matrix": "tree:gwei.cz"
},
"imageUrl": "https://data.web3privacy.info/img/people/tree.jpg"
},
@ -448,7 +614,9 @@
"caption": "Organizing [ETHRome](https://ethrome.org) w/ [urbe.eth](https://linktr.ee/urbe.eth), making sauce w/ [SpaghettETH](https://linktr.ee/spaghetteth)",
"country": "it",
"refs": {
"twitter": "PG_CDG"
"twitter": "PG_CDG",
"github": "EclecticSamurai",
"matrix": "pg_cdg:matrix.org"
},
"imageUrl": "https://data.web3privacy.info/img/people/pg.jpg"
},
@ -478,7 +646,9 @@
"caption": "Web3 privacy advocate behind [Web3Privacy Now](https://web3privacy.info/)",
"country": "es",
"refs": {
"twitter": "nicksvyaznoy"
"twitter": "nicksvyaznoy",
"github": "msiusko",
"matrix": "k1983:matrix.org"
},
"imageUrl": "https://data.web3privacy.info/img/people/mykola-siusko.png"
},
@ -866,6 +1036,7 @@
},
{
"id": "os24q2",
"issue": 28,
"type": "online-summit",
"name-extension": "Q2",
"date": "2024-06-23",

18
src/lib/core.js Normal file
View File

@ -0,0 +1,18 @@
import core from "../core.json";
export function getPersonByGH(user) {
return core.people.find(p => p.refs?.github?.toLowerCase() === user.toLowerCase())
}
export function personLink (p) {
if (p.refs?.twitter) {
return `https://twitter.com/${p.refs.twitter}`
}
if (p.refs?.bsky) {
return `https://bsky.app/profile/${p.refs.bsky}`
}
if (p.refs?.github) {
return `https://github.com/${p.refs.github}`
}
return '#'
}

View File

@ -2,8 +2,16 @@
import BaseLayout from '../layouts/base.astro';
import core from '../core.json';
import ResearchItem from '../components/ResearchItem.astro';
const research = core.projects.filter(x => x.type && x.type === "research");
function filterResearch(status) {
return core.research.filter(r => r.status === status).sort((x, y) => x.sort > y.sort ? 1 : -1)
}
const live = filterResearch('live')
const upcoming = filterResearch('in-progress')
const deprecated = filterResearch('deprecated')
const backlog = filterResearch('backlog')
---
@ -11,16 +19,42 @@ const research = core.projects.filter(x => x.type && x.type === "research");
<div class="middle-pane-medium mt-10">
<h1 id="upcoming">Research ({research.length})</h1>
{research.map((item) => (
<div class="w3pn-project-item">
<a href={item.links.docs} class="block p-6 text-white text-xl">{item.name}</a>
<div class="grid-cols-2 gap-4">
<div class="mb-12 row-span-2">
<h1 id="live">Delivered researches ({live.length})</h1>
{live.map((item) => (
<ResearchItem {item} />
))}
</div>
))}
<div class="mb-12">
<h1 id="upcoming">Upcoming researches ({upcoming.length})</h1>
{upcoming.map((item) => (
<ResearchItem {item} />
))}
</div>
</div>
<div class="mb-12">
<h1 id="backlog">Research Backlog ({backlog.length})</h1>
{backlog.map((item) => (
<ResearchItem {item} />
))}
</div>
{deprecated.length > 0 &&
<div class="mb-12">
<h1 id="deprecated">Deprecated researches ({deprecated.length})</h1>
{deprecated.map((item) => (
<ResearchItem {item} />
))}
</div>
}
<p class="mt-10">
<a href="https://github.com/web3privacy/data/tree/main/src/projects" class="hover:underline">Source repository</a>
<a href="https://github.com/orgs/web3privacy/projects/11" class="hover:underline">Source project</a>
</p>
</div>

View File

@ -152,15 +152,23 @@
.w3pn-project-item {
@apply w-full border border-[#202020] mb-3;
}
.w3pn-project-item:hover {
@apply bg-[#0f0f0f]/30;
}
.w3pn-project-item a:hover {
@apply bg-[#0f0f0f]/30;
@apply underline;
}
.w3pn-event-item {
@apply w-full border border-[#202020] mb-3;
}
.w3pn-event-item .event-header {
@apply cursor-zoom-in;
}
.w3pn-event-item .header-base:hover {
@apply bg-[#0f0f0f]/30;
}
@ -173,6 +181,10 @@
@apply bg-[#0f0f0f] px-4 py-3;
}
.w3pn-event-item:has(.detail:not(.hidden)) .event-header {
@apply cursor-zoom-out;
}
.w3pn-wgrid {
@apply grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-2;
}