From 126c5401768517776f9597b82838bf150861e805 Mon Sep 17 00:00:00 2001 From: tree Date: Mon, 4 Mar 2024 02:38:21 +0100 Subject: [PATCH] research page rework --- src/components/AboutFooter.astro | 37 ++--- src/components/EventItem.astro | 12 +- src/components/PeopleCarousel.astro | 24 +++ src/components/ResearchItem.astro | 39 +++++ src/components/SpeakerList.astro | 2 +- src/core.json | 223 ++++++++++++++++++++++++---- src/lib/core.js | 18 +++ src/pages/research.astro | 50 ++++++- src/styles/base.css | 14 +- 9 files changed, 346 insertions(+), 73 deletions(-) create mode 100644 src/components/PeopleCarousel.astro create mode 100644 src/components/ResearchItem.astro create mode 100644 src/lib/core.js diff --git a/src/components/AboutFooter.astro b/src/components/AboutFooter.astro index 14fc72f..79b1dcc 100644 --- a/src/components/AboutFooter.astro +++ b/src/components/AboutFooter.astro @@ -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 -} - ---
@@ -58,20 +48,9 @@ function filterCoreTeam(person) {

Join the Community

{config.landing.community}
- -

Speakers

-
- {core.people.filter(filterCoreTeam).filter(p => p.imageUrl).map((person) => ( +
+ {core.people.filter(p => !core.teams['core-team'].includes(p.id)).filter(p => p.imageUrl).map((person) => (
@@ -80,14 +59,16 @@ function filterCoreTeam(person) { ))}
-
+

Git Contributors

-
- {contributors.items.filter(filterCoreTeam).map((contrib) => ( +
+ + { // filter(p => !core.teams['core-team'].includes(getPersonByGH(p.login)?.id)) + contributors.items.map((contrib) => (
))}
diff --git a/src/components/EventItem.astro b/src/components/EventItem.astro index 4977406..808ab5c 100644 --- a/src/components/EventItem.astro +++ b/src/components/EventItem.astro @@ -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)
-
+
{dateFormat(item.date)}
{item.days && item.days > 1 && @@ -53,14 +54,7 @@ const status = eventStatus(item)
{item.speakers && -
- {item.speakers.map(spId => getSpeaker(core, spId)).slice(0,7).map((speaker) => ( -
- ))} - {item.speakers.length > 7 && -
+{item.speakers.length - 7}
- } -
+ getSpeaker(core, spId))} /> } {ext && ext.guestCount > 0 &&
diff --git a/src/components/PeopleCarousel.astro b/src/components/PeopleCarousel.astro new file mode 100644 index 0000000..8f325c0 --- /dev/null +++ b/src/components/PeopleCarousel.astro @@ -0,0 +1,24 @@ +--- +import { personLink } from "../lib/core.js"; + +const { items, limit = 7 } = Astro.props; +let { size = 'w-8 h-8' } = Astro.props; +--- + + +
+
+ {items.slice(0, limit).filter(p => p).map((p) => ( +
+ + {p.name} + +
+ ))} + {items.length > limit && +
+ +{items.length - limit} +
+ } +
+
\ No newline at end of file diff --git a/src/components/ResearchItem.astro b/src/components/ResearchItem.astro new file mode 100644 index 0000000..a87a251 --- /dev/null +++ b/src/components/ResearchItem.astro @@ -0,0 +1,39 @@ +--- +import PeopleCarousel from './PeopleCarousel.astro'; +import { getPersonByGH } from '../lib/core.js'; + +const { item } = Astro.props; + +--- + + \ No newline at end of file diff --git a/src/components/SpeakerList.astro b/src/components/SpeakerList.astro index 24b270c..756870b 100644 --- a/src/components/SpeakerList.astro +++ b/src/components/SpeakerList.astro @@ -12,7 +12,7 @@ import core from "../core.json";
{item.speakers.map(spId => getSpeaker(core, spId)).map((speaker) => (
-
+
{speaker.name} diff --git a/src/core.json b/src/core.json index d86920d..f91d55c 100644 --- a/src/core.json +++ b/src/core.json @@ -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", diff --git a/src/lib/core.js b/src/lib/core.js new file mode 100644 index 0000000..524f3c7 --- /dev/null +++ b/src/lib/core.js @@ -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 '#' +} \ No newline at end of file diff --git a/src/pages/research.astro b/src/pages/research.astro index bb6c454..332722d 100644 --- a/src/pages/research.astro +++ b/src/pages/research.astro @@ -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");
-

Research ({research.length})

- - {research.map((item) => ( -
- {item.name} +
+
+

Delivered researches ({live.length})

+ {live.map((item) => ( + + ))}
- ))} + + +
+

Upcoming researches ({upcoming.length})

+ {upcoming.map((item) => ( + + ))} +
+ +
+ +
+

Research Backlog ({backlog.length})

+ {backlog.map((item) => ( + + ))} +
+ + {deprecated.length > 0 && +
+

Deprecated researches ({deprecated.length})

+ {deprecated.map((item) => ( + + ))} +
+ }

- Source repository + Source project

diff --git a/src/styles/base.css b/src/styles/base.css index 520205b..273e0b8 100644 --- a/src/styles/base.css +++ b/src/styles/base.css @@ -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; }