From dc5b78b1ba481edbd159c8f422f8799080061160 Mon Sep 17 00:00:00 2001 From: tree Date: Sat, 2 Mar 2024 17:00:23 +0100 Subject: [PATCH] event filter --- src/components/EventItem.astro | 20 +- src/components/EventsPage.astro | 129 ++++ src/core.json | 745 ++++++++++++----------- src/lib/events.js | 28 + src/pages/event/[id].astro | 20 +- src/pages/events.astro | 79 +-- src/pages/events/[type].astro | 14 + src/pages/events/country/[country].astro | 24 + 8 files changed, 623 insertions(+), 436 deletions(-) create mode 100644 src/components/EventsPage.astro create mode 100644 src/pages/events/[type].astro create mode 100644 src/pages/events/country/[country].astro diff --git a/src/components/EventItem.astro b/src/components/EventItem.astro index 1b35f0e..1e6539f 100644 --- a/src/components/EventItem.astro +++ b/src/components/EventItem.astro @@ -31,13 +31,19 @@ const status = eventStatus(item)
- -
- {item.city}, {item.country.toUpperCase()} - {item.coincidence && -  - {ccRenderer(item)} - } -
+ {item.type !== 'online-summit' && + +
+ {item.city}, {item.country.toUpperCase()} + {item.coincidence && +  - {ccRenderer(item)} + } +
+ } + {item.type === 'online-summit' && + +
Online
+ }
diff --git a/src/components/EventsPage.astro b/src/components/EventsPage.astro new file mode 100644 index 0000000..bf26bbe --- /dev/null +++ b/src/components/EventsPage.astro @@ -0,0 +1,129 @@ +--- + +import BaseLayout from '../layouts/base.astro'; +import core from '../core.json'; +import EventItem from '../components/EventItem.astro'; +import { isFuture } from 'date-fns'; +import { types, countryNames } from '../lib/events.js'; + +const { type: selectedType } = Astro.props; +const { country: selectedCountry } = Astro.props; + +let typeObj = selectedType ? types.find(t => t.id === selectedType) : null +let events = core.events; + +if (selectedType) { + events = core.events.filter(ev => ev.type === selectedType) +} +if (selectedCountry) { + events = core.events.filter(ev => ev.country === selectedCountry) +} + +function eventsFilter (year, future=true) { + return function (x) { + if (!x.date.match(new RegExp(`^${year}`))) { + return false + } + const isDate = x.date.match(/^\d{4}-\d{2}-\d{2}$/) + if (!isDate) { + return false + } + return future ? isFuture(new Date(x.date)) : !isFuture(new Date(x.date)) + } +} + +const currentYear = "2024"; +const pastYears = [ 2023, 2024 ]; +const upcoming = events.filter(x => x.date.match(/^2024/)) + +const past = {} +for (const year of pastYears.reverse()) { + past[year] = events.filter(eventsFilter(year, false)).reverse() +} + +let places = [{ id: '', country: 'All countries', num: core.events.length }]; +for (const ev of core.events) { + const found = places.find(p => p.country === ev.country) + if (found) { + found.num++; + continue; + } + if (!ev.country) { + continue; + } + places.push({ + id: ev.country?.toLowerCase(), + country: ev.country, + num: 1, + }) +} +places = places.sort((x, y) => x.num < y.num ? 1 : -1) +--- + + + +
+ + + + + +

Upcoming {selectedType ? ` ${typeObj.plural} ` : ''}({upcoming.length})

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

Past {selectedType ? ` ${typeObj.plural} ` : ''}({events.length-upcoming.length})

+ {pastYears.map((year) => ( + past[year].length > 0 && +

{year} ({past[year].length})

+
+ {past[year]?.map((event) => ( + + ))} +
+ ))} + +

+ Source repository +

+
+ + + +
\ No newline at end of file diff --git a/src/core.json b/src/core.json index 7091592..1d449c9 100644 --- a/src/core.json +++ b/src/core.json @@ -135,136 +135,10 @@ ], "people": [ { - "id": "coinmandeer", - "name": "Coinmandeer", - "refs": { - "twitter": "KeenOfCoin", - "github": "coinmandeer" - }, - "imageUrl": "https://data.web3privacy.info/img/people/coinmandeer.png" - }, - { - "id": "jaromil", - "name": "Denis Roio", - "nickname": "Jaromil", - "caption": "Founder of [Dyne.org](https://dyne.org/)", - "refs": { - "twitter": "jaromil" - }, - "imageUrl": "https://data.web3privacy.info/img/people/jaromil.jpeg" - }, - { - "id": "vaclav-pavlin", - "name": "Václav Pavlín", - "caption": "Core contributor @ [Status](https://status.app/), [Logos](https://logos.co/about), [Waku](https://waku.org/)", - "country": "cz", - "refs": { - "twitter": "vpavlin" - }, - "imageUrl": "https://data.web3privacy.info/img/people/vaclav-pavlin.jpeg" - }, - { - "id": "max-hampshire", - "name": "Max Hampshire", - "caption": "Senior devrel of [Nym](https://nymtech.net/), Co-founder of [terra0](https://terra0.org/)", - "country": "at", - "refs": { - "twitter": "_wjth" - }, - "imageUrl": "https://data.web3privacy.info/img/people/max-hampshire.jpg" - }, - { - "id": "alex-kampa", - "name": "Alex Kampa", - "caption": "Director at [Aragon ZK Research](https://research.aragon.org/)", - "country": "lu", - "refs": { - "linkedin": "alex-kampa" - }, - "imageUrl": "https://data.web3privacy.info/img/people/alex-kampa.jpg" - }, - { - "id": "dcbuilder", - "name": "dcbuilder.eth", - "caption": "Research engineer at [Worldcoin](https://worldcoin.org/), ZKML & Rust enthusiast", - "country": "cz", - "refs": { - "twitter": "DCbuild3r" - }, - "imageUrl": "https://data.web3privacy.info/img/people/dcbuilder.jpg" - }, - { - "id": "tree", - "name": "Tree", - "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" - }, - "imageUrl": "https://data.web3privacy.info/img/people/tree.jpg" - }, - { - "id": "guy-zyskind", - "name": "Guy Zyskind", - "caption": "Founder of [Secret Network](https://scrt.network/), CEO [SCRT Labs](https://www.scrtlabs.com/)", - "country": "is", - "refs": { - "twitter": "GuyZys" - }, - "imageUrl": "https://data.web3privacy.info/img/people/guy-zyskind.jpg" - }, - { - "id": "marcel-kolaja", - "name": "Marcel Kolaja", - "caption": "Member of the European Parliament", - "country": "cz", - "refs": { - "twitter": "PiratKolaja" - }, - "imageUrl": "https://data.web3privacy.info/img/people/marcel-kolaja.jpeg" - }, - { - "id": "oliver-gale", - "name": "Oliver Gale", - "caption": "CEO of [Panther Protocol](https://www.pantherprotocol.io/)", - "refs": { - "twitter": "OriginalOlii" - }, - "imageUrl": "https://data.web3privacy.info/img/people/oliver-gale.jpeg" - }, - { - "id": "gabari", - "name": "Bryce", - "nickname": "gabari", - "caption": "[Brume Wallet](https://brume.money/) co-founder & [MangroveDAO](https://mangrovedao.earth/) Core", - "refs": { - "twitter": "bryce_gabari" - }, - "imageUrl": "https://data.web3privacy.info/img/people/gabari.jpeg" - }, - { - "id": "merula", - "name": "Merula", - "caption": "Software engineer and cryptographer Circles Entropy", - "imageUrl": "https://data.web3privacy.info/img/people/merula.jpeg" - }, - { - "id": "wslyvh", - "name": "Wesley", - "caption": "Events @ Ethereum 🛠️ Indie Maker", - "refs": { - "twitter": "wslyvh" - }, - "imageUrl": "https://data.web3privacy.info/img/people/wslyvh.png" - }, - { - "id": "steffen-kux", - "name": "Steffen Kux", - "caption": "CEO dm3", - "refs": { - "twitter": "SteffenKux" - }, - "imageUrl": "https://data.web3privacy.info/img/people/steffen-kux.jpeg" + "id": "andrea-togni", + "name": "Andrea Togni", + "caption": "Philosopher, Monero policy workgroup", + "imageUrl": "https://data.web3privacy.info/img/people/andrea-togni.jpg" }, { "id": "vincenzo-iovino", @@ -276,6 +150,224 @@ }, "imageUrl": "https://data.web3privacy.info/img/people/vincenzo-iovino.jpg" }, + { + "id": "pg", + "name": "PG", + "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" + }, + "imageUrl": "https://data.web3privacy.info/img/people/pg.jpg" + }, + { + "id": "carlo-chialastri", + "name": "Carlo Avv. Chialastri", + "caption": "Urbe.eth lawyer", + "country": "it", + "refs": { + "linkedin": "carlo-avv-chialastri-8456a544" + }, + "imageUrl": "https://data.web3privacy.info/img/people/carlo-chialastri.jpeg" + }, + { + "id": "limone-eth", + "name": "limone.eth", + "caption": "Serial hacker and community builder | core [urbeEth](https://twitter.com/urbeeth) & [ETHRome](https://www.ethrome.org/)", + "country": "it", + "refs": { + "twitter": "limone_eth" + }, + "imageUrl": "https://data.web3privacy.info/img/people/limone-eth.jpeg" + }, + { + "id": "tim-bansemer", + "name": "Tim Bansemer", + "caption": "[Aqua Protocol](https://aqua-protocol.org/)", + "refs": { + "twitter": "tim_bansemer" + }, + "imageUrl": "https://data.web3privacy.info/img/people/tim-bansemer.jpeg" + }, + { + "id": "steffen-kux", + "name": "Steffen Kux", + "caption": "CEO dm3", + "refs": { + "twitter": "SteffenKux" + }, + "imageUrl": "https://data.web3privacy.info/img/people/steffen-kux.jpeg" + }, + { + "id": "nick-almond", + "name": "Nick Almond", + "caption": "Building next generation DAOs with [FactoryDAO](https://www.factorydao.xyz/)", + "country": "gb", + "refs": { + "twitter": "DrNickA" + }, + "imageUrl": "https://data.web3privacy.info/img/people/nick-almond.jpg" + }, + { + "id": "radek-svarz", + "name": "Radek Švarz", + "country": "cz", + "caption": "Visionary, architect, connecting business and IT", + "refs": { + "twitter": "radk" + }, + "imageUrl": "https://data.web3privacy.info/img/people/radek-svarz.webp" + }, + { + "id": "eleanore-blanc", + "name": "Eléonore Blanc", + "caption": "Crypto Educator & Founder of [CryptoCanal](https://www.cryptocanal.org/), [ETHDam](https://www.ethdam.com/) organiser", + "country": "nl", + "refs": { + "twitter": "blockblanc" + }, + "imageUrl": "https://data.web3privacy.info/img/people/eleanore-blanc.jpeg" + }, + { + "id": "oliver-gale", + "name": "Oliver Gale", + "caption": "CEO of [Panther Protocol](https://www.pantherprotocol.io/)", + "refs": { + "twitter": "OriginalOlii" + }, + "imageUrl": "https://data.web3privacy.info/img/people/oliver-gale.jpeg" + }, + { + "id": "vaclav-pavlin", + "name": "Václav Pavlín", + "caption": "Core contributor @ [Status](https://status.app/), [Logos](https://logos.co/about), [Waku](https://waku.org/)", + "country": "cz", + "refs": { + "twitter": "vpavlin" + }, + "imageUrl": "https://data.web3privacy.info/img/people/vaclav-pavlin.jpeg" + }, + { + "id": "alan-scott", + "name": "Alan Scott", + "caption": "Co-founder of [Railgun](https://www.railgun.org/)", + "country": "us", + "refs": { + "twitter": "tsu_kareta" + }, + "imageUrl": "https://data.web3privacy.info/img/people/alan-scott.jpeg" + }, + { + "id": "alex-zaidelson", + "name": "Alex Zaidelson", + "caption": "CEO [SCRT Labs](https://www.scrtlabs.com/)", + "refs": { + "twitter": "azaidelson" + }, + "imageUrl": "https://data.web3privacy.info/img/people/alex-zaidelson.jpeg" + }, + { + "id": "merula", + "name": "Merula", + "caption": "Software engineer and cryptographer Circles Entropy", + "imageUrl": "https://data.web3privacy.info/img/people/merula.jpeg" + }, + { + "id": "jaromil", + "name": "Denis Roio", + "nickname": "Jaromil", + "caption": "Founder of [Dyne.org](https://dyne.org/)", + "refs": { + "twitter": "jaromil" + }, + "imageUrl": "https://data.web3privacy.info/img/people/jaromil.jpeg" + }, + { + "id": "antoni-zolciak", + "name": "Antoni Zolciak", + "caption": "Co-founder of [Aleph Zero](https://alephzero.org/) & [Cardinal](https://cardinal.co/)", + "country": "pl", + "refs": { + "twitter": "AntoniZolciak" + }, + "imageUrl": "https://data.web3privacy.info/img/people/antoni-zolciak.jpg" + }, + { + "id": "coinmandeer", + "name": "Coinmandeer", + "refs": { + "twitter": "KeenOfCoin", + "github": "coinmandeer" + }, + "imageUrl": "https://data.web3privacy.info/img/people/coinmandeer.png" + }, + { + "id": "guy-zyskind", + "name": "Guy Zyskind", + "caption": "Founder of [Secret Network](https://scrt.network/), CEO [SCRT Labs](https://www.scrtlabs.com/)", + "country": "is", + "refs": { + "twitter": "GuyZys" + }, + "imageUrl": "https://data.web3privacy.info/img/people/guy-zyskind.jpg" + }, + { + "id": "r-prokh", + "name": "Roma", + "nickname": "r_prokh", + "caption": "Growth Lead @ [Questbook](https://questbook.app/)", + "country": "pt", + "refs": { + "twitter": "r_prokh" + }, + "imageUrl": "https://data.web3privacy.info/img/people/r-prokh.jpeg" + }, + { + "id": "tibor-csoka", + "name": "Tibor Csóka", + "caption": "Software Engineer at [HOPR](https://hoprnet.org/)", + "imageUrl": "https://data.web3privacy.info/img/people/tibor-csoka.jpg" + }, + { + "id": "catsnaks", + "name": "Catsnaks", + "caption": "[PSE](https://pse.dev/)" + }, + { + "id": "serinko", + "name": "Serinko", + "caption": "Privacy Researcher", + "refs": { + "twitter": "serinko13" + }, + "imageUrl": "https://data.web3privacy.info/img/people/serinko.jpeg" + }, + { + "id": "marcel-kolaja", + "name": "Marcel Kolaja", + "caption": "Member of the European Parliament", + "country": "cz", + "refs": { + "twitter": "PiratKolaja" + }, + "imageUrl": "https://data.web3privacy.info/img/people/marcel-kolaja.jpeg" + }, + { + "id": "althea", + "name": "Althea", + "caption": "Head of Comms, Privacy & Scaling Exploration", + "imageUrl": "https://data.web3privacy.info/img/people/althea.jpeg" + }, + { + "id": "dcbuilder", + "name": "dcbuilder.eth", + "caption": "Research engineer at [Worldcoin](https://worldcoin.org/), ZKML & Rust enthusiast", + "country": "cz", + "refs": { + "twitter": "DCbuild3r" + }, + "imageUrl": "https://data.web3privacy.info/img/people/dcbuilder.jpg" + }, { "id": "mario-havel", "name": "Mario Havel", @@ -286,6 +378,25 @@ }, "imageUrl": "https://data.web3privacy.info/img/people/mario-havel.jpg" }, + { + "id": "kieran-mesquita", + "name": "Kieran Mesquita", + "caption": "Chief scientist [Railgun DAO](https://www.railgun.org/)", + "refs": { + "twitter": "mesquka" + }, + "imageUrl": "https://data.web3privacy.info/img/people/kieran-mesquita.jpeg" + }, + { + "id": "manu-alzuru", + "name": "Manu Alzuru", + "caption": "Humanist, solarpunk, Founder of [DoinGud](https://doingud.com/) & [ETH Barcelona](https://ethbarcelona.com/)", + "country": "es", + "refs": { + "twitter": "ManuAlzuru" + }, + "imageUrl": "https://data.web3privacy.info/img/people/manu-alzuru.jpg" + }, { "id": "ameen-soleimani", "name": "Ameen Soleimani", @@ -296,6 +407,114 @@ }, "imageUrl": "https://data.web3privacy.info/img/people/ameen-soleimani.jpg" }, + { + "id": "alona-shevchenko", + "name": "Alona Shevchenko", + "caption": "Unapologetic Ukrainian behind [Ukraine DAO](https://ukrainedao.love/) & [Kyiv Tech Summit](https://www.kyivtechsummit.com/)", + "country": "ua", + "refs": { + "twitter": "cryptodrftng" + }, + "imageUrl": "https://data.web3privacy.info/img/people/alona-shevchenko.jpg" + }, + { + "id": "wslyvh", + "name": "Wesley", + "caption": "Events @ Ethereum 🛠️ Indie Maker", + "refs": { + "twitter": "wslyvh" + }, + "imageUrl": "https://data.web3privacy.info/img/people/wslyvh.png" + }, + { + "id": "juraj-bednar", + "name": "Juraj Bednar", + "caption": "Educator, writer, cryptoanarchist & biohacker ([blog](https://juraj.bednar.io/))", + "country": "sk", + "refs": { + "twitter": "jurbed" + }, + "imageUrl": "https://data.web3privacy.info/img/people/juraj-bednar.jpg" + }, + { + "id": "alex-kampa", + "name": "Alex Kampa", + "caption": "Director at [Aragon ZK Research](https://research.aragon.org/)", + "country": "lu", + "refs": { + "linkedin": "alex-kampa" + }, + "imageUrl": "https://data.web3privacy.info/img/people/alex-kampa.jpg" + }, + { + "id": "tree", + "name": "Tree", + "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" + }, + "imageUrl": "https://data.web3privacy.info/img/people/tree.jpg" + }, + { + "id": "edward-fricker", + "name": "Edward P. Fricker", + "caption": "right to privacy foundation, deficon, railgun dao, lobsterdao", + "refs": { + "twitter": "itsthefuture" + }, + "imageUrl": "https://data.web3privacy.info/img/people/edward-fricker.jpg" + }, + { + "id": "rik-krieger", + "name": "Rik Krieger", + "nickname": "rikzrh", + "caption": "Co-founder of [HOPR](https://hoprnet.org/)", + "country": "ch", + "refs": { + "twitter": "rikzrh" + }, + "imageUrl": "https://data.web3privacy.info/img/people/rik-krieger.jpg" + }, + { + "id": "rachel-rose-oleary", + "name": "Rachel-Rose O'Leary", + "caption": "[DarkFi](https://dark.fi/) core dev, writer", + "refs": { + "twitter": "lunar_mining" + }, + "imageUrl": "https://data.web3privacy.info/img/people/rachel-rose-oleary.jpg" + }, + { + "id": "gabari", + "name": "Bryce", + "nickname": "gabari", + "caption": "[Brume Wallet](https://brume.money/) co-founder & [MangroveDAO](https://mangrovedao.earth/) Core", + "refs": { + "twitter": "bryce_gabari" + }, + "imageUrl": "https://data.web3privacy.info/img/people/gabari.jpeg" + }, + { + "id": "joshua-davila", + "name": "Joshua Davila", + "caption": "Blog & podcast \"[The Blockchain Socialist](https://linktr.ee/theblockchainsocialist)\"", + "refs": { + "twitter": "TBSocialist", + "bsky": "tbsocialist.bsky.social" + }, + "imageUrl": "https://data.web3privacy.info/img/people/joshua-davila.jpg" + }, + { + "id": "costanza-gallo", + "name": "Costanza Gallo", + "caption": "Head of partnerships at the [The Swarm Foundation](https://www.ethswarm.org/foundation)", + "country": "it", + "refs": { + "twitter": "costgallo" + }, + "imageUrl": "https://data.web3privacy.info/img/people/costanza-gallo.jpeg" + }, { "id": "afri-schoedon", "name": "Afri Schoedon", @@ -318,185 +537,14 @@ "imageUrl": "https://data.web3privacy.info/img/people/pavol-luptak.jpeg" }, { - "id": "andrea-togni", - "name": "Andrea Togni", - "caption": "Philosopher, Monero policy workgroup", - "imageUrl": "https://data.web3privacy.info/img/people/andrea-togni.jpg" - }, - { - "id": "alona-shevchenko", - "name": "Alona Shevchenko", - "caption": "Unapologetic Ukrainian behind [Ukraine DAO](https://ukrainedao.love/) & [Kyiv Tech Summit](https://www.kyivtechsummit.com/)", - "country": "ua", + "id": "max-hampshire", + "name": "Max Hampshire", + "caption": "Senior devrel of [Nym](https://nymtech.net/), Co-founder of [terra0](https://terra0.org/)", + "country": "at", "refs": { - "twitter": "cryptodrftng" + "twitter": "_wjth" }, - "imageUrl": "https://data.web3privacy.info/img/people/alona-shevchenko.jpg" - }, - { - "id": "antoni-zolciak", - "name": "Antoni Zolciak", - "caption": "Co-founder of [Aleph Zero](https://alephzero.org/) & [Cardinal](https://cardinal.co/)", - "country": "pl", - "refs": { - "twitter": "AntoniZolciak" - }, - "imageUrl": "https://data.web3privacy.info/img/people/antoni-zolciak.jpg" - }, - { - "id": "serinko", - "name": "Serinko", - "caption": "Privacy Researcher", - "refs": { - "twitter": "serinko13" - }, - "imageUrl": "https://data.web3privacy.info/img/people/serinko.jpeg" - }, - { - "id": "carlo-chialastri", - "name": "Carlo Avv. Chialastri", - "caption": "Urbe.eth lawyer", - "country": "it", - "refs": { - "linkedin": "carlo-avv-chialastri-8456a544" - }, - "imageUrl": "https://data.web3privacy.info/img/people/carlo-chialastri.jpeg" - }, - { - "id": "manu-alzuru", - "name": "Manu Alzuru", - "caption": "Humanist, solarpunk, Founder of [DoinGud](https://doingud.com/) & [ETH Barcelona](https://ethbarcelona.com/)", - "country": "es", - "refs": { - "twitter": "ManuAlzuru" - }, - "imageUrl": "https://data.web3privacy.info/img/people/manu-alzuru.jpg" - }, - { - "id": "nick-almond", - "name": "Nick Almond", - "caption": "Building next generation DAOs with [FactoryDAO](https://www.factorydao.xyz/)", - "country": "gb", - "refs": { - "twitter": "DrNickA" - }, - "imageUrl": "https://data.web3privacy.info/img/people/nick-almond.jpg" - }, - { - "id": "costanza-gallo", - "name": "Costanza Gallo", - "caption": "Head of partnerships at the [The Swarm Foundation](https://www.ethswarm.org/foundation)", - "country": "it", - "refs": { - "twitter": "costgallo" - }, - "imageUrl": "https://data.web3privacy.info/img/people/costanza-gallo.jpeg" - }, - { - "id": "rachel-rose-oleary", - "name": "Rachel-Rose O'Leary", - "caption": "[DarkFi](https://dark.fi/) core dev, writer", - "refs": { - "twitter": "lunar_mining" - }, - "imageUrl": "https://data.web3privacy.info/img/people/rachel-rose-oleary.jpg" - }, - { - "id": "r-prokh", - "name": "Roma", - "nickname": "r_prokh", - "caption": "Growth Lead @ [Questbook](https://questbook.app/)", - "country": "pt", - "refs": { - "twitter": "r_prokh" - }, - "imageUrl": "https://data.web3privacy.info/img/people/r-prokh.jpeg" - }, - { - "id": "rik-krieger", - "name": "Rik Krieger", - "nickname": "rikzrh", - "caption": "Co-founder of [HOPR](https://hoprnet.org/)", - "country": "ch", - "refs": { - "twitter": "rikzrh" - }, - "imageUrl": "https://data.web3privacy.info/img/people/rik-krieger.jpg" - }, - { - "id": "pg", - "name": "PG", - "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" - }, - "imageUrl": "https://data.web3privacy.info/img/people/pg.jpg" - }, - { - "id": "althea", - "name": "Althea", - "caption": "Head of Comms, Privacy & Scaling Exploration", - "imageUrl": "https://data.web3privacy.info/img/people/althea.jpeg" - }, - { - "id": "tim-bansemer", - "name": "Tim Bansemer", - "caption": "[Aqua Protocol](https://aqua-protocol.org/)", - "refs": { - "twitter": "https://twitter.com/tim_bansemer" - }, - "imageUrl": "https://data.web3privacy.info/img/people/tim-bansemer.jpeg" - }, - { - "id": "catsnaks", - "name": "Catsnaks", - "caption": "[PSE](https://pse.dev/)" - }, - { - "id": "mykola-siusko", - "name": "Mykola Siusko", - "caption": "Web3 privacy advocate behind [Web3Privacy Now](https://web3privacy.info/)", - "country": "es", - "refs": { - "twitter": "nicksvyaznoy" - }, - "imageUrl": "https://data.web3privacy.info/img/people/mykola-siusko.png" - }, - { - "id": "tibor-csoka", - "name": "Tibor Csóka", - "caption": "Software Engineer at [HOPR](https://hoprnet.org/)", - "imageUrl": "https://data.web3privacy.info/img/people/tibor-csoka.jpg" - }, - { - "id": "radek-svarz", - "name": "Radek Švarz", - "country": "cz", - "caption": "Visionary, architect, connecting business and IT", - "refs": { - "twitter": "radk" - }, - "imageUrl": "https://data.web3privacy.info/img/people/radek-svarz.webp" - }, - { - "id": "juraj-bednar", - "name": "Juraj Bednar", - "caption": "Educator, writer, cryptoanarchist & biohacker ([blog](https://juraj.bednar.io/))", - "country": "sk", - "refs": { - "twitter": "jurbed" - }, - "imageUrl": "https://data.web3privacy.info/img/people/juraj-bednar.jpg" - }, - { - "id": "alex-zaidelson", - "name": "Alex Zaidelson", - "caption": "CEO [SCRT Labs](https://www.scrtlabs.com/)", - "refs": { - "twitter": "azaidelson" - }, - "imageUrl": "https://data.web3privacy.info/img/people/alex-zaidelson.jpeg" + "imageUrl": "https://data.web3privacy.info/img/people/max-hampshire.jpg" }, { "id": "odysseas", @@ -508,43 +556,14 @@ "imageUrl": "https://data.web3privacy.info/img/people/odysseas.jpeg" }, { - "id": "limone-eth", - "name": "limone.eth", - "caption": "Serial hacker and community builder | core [urbeEth](https://twitter.com/urbeeth) & [ETHRome](https://www.ethrome.org/)", - "country": "it", + "id": "mykola-siusko", + "name": "Mykola Siusko", + "caption": "Web3 privacy advocate behind [Web3Privacy Now](https://web3privacy.info/)", + "country": "es", "refs": { - "twitter": "limone_eth" + "twitter": "nicksvyaznoy" }, - "imageUrl": "https://data.web3privacy.info/img/people/limone-eth.jpeg" - }, - { - "id": "alan-scott", - "name": "Alan Scott", - "caption": "Co-founder of [Railgun](https://www.railgun.org/)", - "country": "us", - "refs": { - "twitter": "tsu_kareta" - }, - "imageUrl": "https://data.web3privacy.info/img/people/alan-scott.jpeg" - }, - { - "id": "eleanore-blanc", - "name": "Eléonore Blanc", - "caption": "Crypto Educator & Founder of [CryptoCanal](https://www.cryptocanal.org/), [ETHDam](https://www.ethdam.com/) organiser", - "country": "nl", - "refs": { - "twitter": "blockblanc" - }, - "imageUrl": "https://data.web3privacy.info/img/people/eleanore-blanc.jpeg" - }, - { - "id": "kieran-mesquita", - "name": "Kieran Mesquita", - "caption": "Chief scientist [Railgun DAO](https://www.railgun.org/)", - "refs": { - "twitter": "mesquka" - }, - "imageUrl": "https://data.web3privacy.info/img/people/kieran-mesquita.jpeg" + "imageUrl": "https://data.web3privacy.info/img/people/mykola-siusko.png" } ], "events": [ @@ -758,7 +777,8 @@ "ligi" ], "speakers": [ - "afri-schoedon" + "afri-schoedon", + "joshua-davila" ], "slots": 3, "links": { @@ -787,6 +807,7 @@ "speakers": [ "pavol-luptak", "gabari", + "radek-svarz", "mykola-siusko" ] }, @@ -839,9 +860,18 @@ "rsvp": "https://lu.ma/w3pn-meetup-ljubljana1" }, "speakers": [ + "joshua-davila", "mykola-siusko" ] }, + { + "id": "os24q2", + "type": "online-summit", + "name-extension": "Q2", + "date": "2024-06-23", + "lead": "Tree", + "slots": 8 + }, { "id": "m24bcn", "issue": 20, @@ -851,7 +881,10 @@ "country": "es", "coincidence": "ETHBarcelona", "slots": 3, - "optional": true + "optional": true, + "speakers": [ + "joshua-davila" + ] }, { "id": "m24bru", @@ -870,6 +903,8 @@ "rsvp": "https://lu.ma/w3pn-meetup-bru1" }, "speakers": [ + "edward-fricker", + "joshua-davila", "mykola-siusko" ] }, @@ -885,6 +920,14 @@ "slots": 3, "optional": true }, + { + "id": "os24q3", + "type": "online-summit", + "name-extension": "Q3", + "date": "2024/Sep", + "lead": "Tree", + "slots": 8 + }, { "id": "m24cph", "issue": 18, @@ -957,6 +1000,7 @@ }, "speakers": [ "juraj-bednar", + "radek-svarz", "mykola-siusko", "pg", "tree" @@ -985,7 +1029,18 @@ "slots": 5, "links": { "rsvp": "https://lu.ma/w3pn-meetup-devcon7" - } + }, + "speakers": [ + "edward-fricker" + ] + }, + { + "id": "os24q4", + "type": "online-summit", + "name-extension": "Q4", + "date": "2024/Dec", + "lead": "Tree", + "slots": 8 } ] } \ No newline at end of file diff --git a/src/lib/events.js b/src/lib/events.js index 1aad46e..1f5b912 100644 --- a/src/lib/events.js +++ b/src/lib/events.js @@ -1,5 +1,30 @@ import { format, compareAsc, addDays, isFuture } from 'date-fns'; +export const types = [ + { id: "", plural: 'All events'}, + { id: "meetup", name: 'Meetup', plural: 'Meetups' }, + { id: "summit", name: 'Summit', plural: 'Summits' }, + { id: "privacy-corner", name: 'Privacy Corner', plural: 'Privacy Corners' }, + { id: "online-summit", name: 'Online Summit', plural: 'Online Summits' }, +] + +export const countryNames = { + cz: 'Czechia', + it: 'Italy', + de: 'Germany', + es: 'Spain', + si: 'Slovenia', + dk: 'Denmark', + pl: 'Poland', + be: 'Belgium', + pt: 'Portugal', + ee: 'Estonia', + nl: 'Netherlands', + ro: 'Romania', + gr: 'Greece', + th: 'Thailand', +} + export function dateInfo (item) { const isDate = item.date.match(/^\d{4}-\d{2}-\d{2}$/) const future = isDate && !isFuture(new Date(item.date)); @@ -45,6 +70,9 @@ export function nameRenderer (item, full = false) { case 'privacy-corner': return `Privacy Corner at `+ (item.coincidenceFull ? item.coincidenceFull : `${item.coincidence} ${date.year}`) break; + case 'online-summit': + return "ONLINE Summit" + (item['name-extension'] ? ' ' + item['name-extension'] : '') + (full ? ` ${date.year}` : ''); + break; } } diff --git a/src/pages/event/[id].astro b/src/pages/event/[id].astro index fca7291..bed49ab 100644 --- a/src/pages/event/[id].astro +++ b/src/pages/event/[id].astro @@ -30,13 +30,19 @@ const ext = findExt(EventsExt, item)

W3PN {nameRenderer(item, true)}

- -
- {item.city}, {item.country.toUpperCase()} - {item.coincidence && -  - {ccRenderer(item)} - } -
+ {item.type !== 'online-summit' && + +
+ {item.city}, {item.country.toUpperCase()} + {item.coincidence && +  - {ccRenderer(item)} + } +
+ } + {item.type === 'online-summit' && + +
Online
+ }
diff --git a/src/pages/events.astro b/src/pages/events.astro index ad5ced7..0fd6d79 100644 --- a/src/pages/events.astro +++ b/src/pages/events.astro @@ -1,82 +1,7 @@ --- -import BaseLayout from '../layouts/base.astro'; -import core from '../core.json'; -import EventItem from '../components/EventItem.astro'; -import { isFuture } from 'date-fns'; - -const events = core.events; - -function eventsFilter (year, future=true) { - return function (x) { - if (!x.date.match(new RegExp(`^${year}`))) { - return false - } - const isDate = x.date.match(/^\d{4}-\d{2}-\d{2}$/) - if (!isDate) { - return false - } - return future ? isFuture(new Date(x.date)) : !isFuture(new Date(x.date)) - } -} - -const currentYear = "2024"; -const pastYears = [ 2023, 2024 ]; -const upcoming = events.filter(x => x.date.match(/^2024/)) - -const past = {} -for (const year of pastYears.reverse()) { - past[year] = events.filter(eventsFilter(year, false)).reverse() -} +import EventsPage from '../components/EventsPage.astro'; --- - - -
- - - -

Upcoming ({upcoming.length})

- -
- {upcoming.map((event) => ( - - ))} -
- -

Past events ({events.length-upcoming.length})

- {pastYears.map((year) => ( - past[year].length > 0 && -

{year} ({past[year].length})

-
- {past[year]?.map((event) => ( - - ))} -
- ))} - -

- Source repository -

-
- - - -
\ No newline at end of file + \ No newline at end of file diff --git a/src/pages/events/[type].astro b/src/pages/events/[type].astro new file mode 100644 index 0000000..a581912 --- /dev/null +++ b/src/pages/events/[type].astro @@ -0,0 +1,14 @@ +--- + +import EventsPage from '../../components/EventsPage.astro'; +import { types } from '../../lib/events.js'; + +const { type } = Astro.params; + +export async function getStaticPaths() { + return types.filter(obj => obj.id).map(obj => ({ params: { type: obj.id }})); +} + +--- + + \ No newline at end of file diff --git a/src/pages/events/country/[country].astro b/src/pages/events/country/[country].astro new file mode 100644 index 0000000..64a5fbf --- /dev/null +++ b/src/pages/events/country/[country].astro @@ -0,0 +1,24 @@ +--- + +import EventsPage from '../../../components/EventsPage.astro'; +import { types } from '../../../lib/events.js'; +import core from '../../../core.json'; + +const { country } = Astro.params; + +export async function getStaticPaths() { + const countries = [] + for (const ev of core.events) { + if (!ev.country) { + continue + } + if (!countries.includes(ev.country)) { + countries.push(ev.country) + } + } + return countries.map(country => ({ params: { country }})); +} + +--- + + \ No newline at end of file