From 26fee8006e9e139b38562578a8efd4d30d193136 Mon Sep 17 00:00:00 2001 From: tree Date: Thu, 23 Feb 2023 14:29:23 +0100 Subject: [PATCH] Reformat --- README.md | 1 + src/app.css | 8 +- src/app.html | 6 +- src/lib/components/PeopleList.svelte | 18 ++-- src/lib/config.yaml | 124 +++++++++++++-------------- src/lib/helpers.js | 98 +++++++++++---------- src/routes/+layout.svelte | 97 +++++++++++++-------- src/routes/+page.svelte | 67 +++++++++------ vite.config.js | 5 +- 9 files changed, 245 insertions(+), 179 deletions(-) diff --git a/README.md b/README.md index b3707e2..e243b97 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ Website and data repository for the Web3Privacy Summit #1 that will take place i - Twitter: [@web3privacy](http://twitter.com/web3privacy) JSON data about `w3ps1`: + - source: ([src/lib/config.yaml](src/lib/config.yaml)) - build: [prague.web3privacy.info/config.json](https://prague.web3privacy.info/config.json) diff --git a/src/app.css b/src/app.css index bea7abd..3b7e437 100644 --- a/src/app.css +++ b/src/app.css @@ -59,7 +59,8 @@ .table-custom th { @apply text-mild; } - .table-custom tbody tr:hover td, .table-custom tbody tr:hover td span { + .table-custom tbody tr:hover td, + .table-custom tbody tr:hover td span { @apply bg-white text-black; } .table-custom tbody tr:hover td .description { @@ -82,7 +83,10 @@ .person-item:hover img { @apply grayscale-0 invert-0 blur-none; } - .person-item:hover .text-mild, .person-item:hover .text-supermild, .topic-item:hover .text-mild, .topic-item:hover .text-supermild { + .person-item:hover .text-mild, + .person-item:hover .text-supermild, + .topic-item:hover .text-mild, + .topic-item:hover .text-supermild { @apply text-black; } } diff --git a/src/app.html b/src/app.html index 16e9eee..02db1d2 100644 --- a/src/app.html +++ b/src/app.html @@ -9,6 +9,10 @@
%sveltekit.body%
- + diff --git a/src/lib/components/PeopleList.svelte b/src/lib/components/PeopleList.svelte index 64d5ad5..a9adf26 100644 --- a/src/lib/components/PeopleList.svelte +++ b/src/lib/components/PeopleList.svelte @@ -1,7 +1,7 @@ {#each items.map(getPerson) as item} -
+
{item.name.toUpperCase()}
{#if item.caption}
diff --git a/src/lib/config.yaml b/src/lib/config.yaml index a70cc3c..5345bee 100644 --- a/src/lib/config.yaml +++ b/src/lib/config.yaml @@ -1,16 +1,16 @@ title: Web3Privacy Prague 2023 -shortname: "Web3Privacy Summit #1" +shortname: 'Web3Privacy Summit #1' date: 5. June 2023 venue: X10, Prague domain: prague.web3privacy.info -image: "/web3privacy.png" -logo: "/web3privacy-cropped.jpg" +image: '/web3privacy.png' +logo: '/web3privacy-cropped.jpg' twitter: web3privacy parent: Web3Privacy Now venueMapUrl: https://goo.gl/maps/VCSC7wcNueEKgt996 parentUrl: https://web3privacy.info desc: June 5, 2023 - A lunarpunk conference focused on privacy in the Web3 industry as a complement to the Web3Privacy Now research. -authors: "💛 Collaboration of [Web3Privacy Now](https://web3privacy.info) & [ETHBrno](https://ethbrno.cz) team" +authors: '💛 Collaboration of [Web3Privacy Now](https://web3privacy.info) & [ETHBrno](https://ethbrno.cz) team' license: This web is built with [SvelteKit](https://kit.svelte.dev/) and is [open-source](https://github.com/web3privacy/w3ps1) under CC0 license slogan: Diving into the culture of the Web3 privacy industry aggregator: Prague Blockchain Week 2023 @@ -18,15 +18,15 @@ aggregatorUrl: http://prgblockweek.com/ sponsorUrl: https://matrix.to/#/@tree:gwei.cz intro: | If privacy is a human right, then we need to protect it. - + Privacy advocates worldwide are coming together to discuss how to mainstream privacy within the Web3 industry. So it will become a cultural phenomenon embodying both decentralisation & anti-surveillance capitalism practices. - + The conference complements the research project [Web3Privacy Now](http://web3privacy.info/) and was created by joining forces with the production team of the privacy hackathon [ETHBrno](https://ethbrno.cz/). themes: - title: Regulations vs Privacy desc: 2023 will be a year of privacy regulations. Privacy coins will be banned, mixer's team become anon etc. How do we defend our rights for privacy? - title: MAINSTREAM ON-CHAIN PRIVACY - desc: Majority of privacy services are tech oriented. It's hard to use them among non-technical people. What should industry do help people onboard into privacy with ease? + desc: Majority of privacy services are tech oriented. It's hard to use them among non-technical people. What should industry do help people onboard into privacy with ease? - title: Human rights DAOs (pro-privacy) desc: How privacy-enhancing tools could protect DAOs working within non-democratic countries. - title: Identity (ID) @@ -37,15 +37,15 @@ themes: desc: We need resilient privacy-preserving, p2p communication layers for Web3, that allows free and uncensored human-to-human, machine-to-machine or hybrid communication. - title: Lunarpunk vs Solarpunk desc: For solarpunk to succeed it must integrate the lunarpunk unconscious. The only hope for solarpunk is to [go dark](https://www.egirlcapital.com/writings/107533289). Do you agree? - - title: "R&D: ZK, MPC, THE" + - title: 'R&D: ZK, MPC, THE' desc: There are many different cryptography technics for privacy preservation. How to balance them all & avoid 1-tool chokepoint? - title: Privacy readiness levels desc: Introduction of the privacy scoring mechanism to help non-tech people understand security level of the solution - title: Privacy wars desc: Why are privacy-blockchain socials so toxic? How could we stop hating each other & work together - title: Privacy workforce - - title: "Privacy activism" - desc: "Mapping down tools to protect privacy industry: from builders like Alexey Pertsev to projects." + - title: 'Privacy activism' + desc: 'Mapping down tools to protect privacy industry: from builders like Alexey Pertsev to projects.' - title: Network states (with a privacy focus) desc: Time ot imagine the network state-as-a-grassroots movement for privacy, freedom & better future. - title: Veksl @@ -58,22 +58,22 @@ tickets: - title: All-day Access price: €99 includes: - - All talks & panels - - Food and drinks included - - Web3Privacy t-shirt - - Networking drinks with speakers & attendees - - "#Lunarpunk party" + - All talks & panels + - Food and drinks included + - Web3Privacy t-shirt + - Networking drinks with speakers & attendees + - '#Lunarpunk party' hint: | [Apply for a discount →](https://attend.web3privacy.info)
(as independent developer, student, privacy advocate, open-source contributor..) - - title: "#Lunarpunk Party" + - title: '#Lunarpunk Party' price: €15 includes: - - 8pm - morning - - Prague rave from top DJs - - VJs and projections - - "\"Privacy experience\"" - - Networking with attendees, speakers & sponsors - note: "*Party access is included in the All-day Pass" + - 8pm - morning + - Prague rave from top DJs + - VJs and projections + - '"Privacy experience"' + - Networking with attendees, speakers & sponsors + note: '*Party access is included in the All-day Pass' faq: - title: What is Web3Privacy Now? text: | @@ -94,44 +94,44 @@ faq: - title: Will the talks be livestreamed and/or recorded? text: Yes, we're planning both. A livestream of the conference and recordings of the talks and panels will be publicly available after the conference. - title: I have another question, where can I contact you? - text: "You can contact the organizing team or the community around the event in our public Signal group: [chat.web3privacy.info](https://chat.web3privacy.info/)" + text: 'You can contact the organizing team or the community around the event in our public Signal group: [chat.web3privacy.info](https://chat.web3privacy.info/)' people: -- id: mykola - name: Mykola Siusko - twitter: nicksvyaznoy - img: mykola.png - caption: Web3 privacy advocate - country: es -- id: tree - name: Tree - twitter: treecz - img: tree.jpeg - caption: Creator of lunarpunk hackathons & events - country: cz -- id: juraj-bednar - name: Juraj Bednar - twitter: jurbed - img: juraj-bednar.jpeg - caption: Educator, writer, cryptoanarchist & biohacker - country: sk -- id: mario-havel - name: Mario Havel - twitter: TMIYChao - img: mario-havel.jpeg - caption: Hacker, Co-Founder of [Bordel Hackerspace](https://bordel.paralelnipolis.cz/#/) - country: cz -- id: guy-zyskind - name: Guy Zyskind - twitter: GuyZys - img: guy-zyskind.jpeg - caption: Founder of [Secret Network](https://scrt.network/), CEO [SCRT Labs](https://www.scrtlabs.com/) - country: is -- id: manu-alzuru - name: Manu Alzuru - twitter: ManuAlzuru - img: manu-alzuru.jpeg - caption: Humanist, solarpunk, Founder of [DoinGud](https://doingud.com/) & [ETH Barcelona](https://ethbarcelona.com/) - country: es + - id: mykola + name: Mykola Siusko + twitter: nicksvyaznoy + img: mykola.png + caption: Web3 privacy advocate + country: es + - id: tree + name: Tree + twitter: treecz + img: tree.jpeg + caption: Creator of lunarpunk hackathons & events + country: cz + - id: juraj-bednar + name: Juraj Bednar + twitter: jurbed + img: juraj-bednar.jpeg + caption: Educator, writer, cryptoanarchist & biohacker + country: sk + - id: mario-havel + name: Mario Havel + twitter: TMIYChao + img: mario-havel.jpeg + caption: Hacker, Co-Founder of [Bordel Hackerspace](https://bordel.paralelnipolis.cz/#/) + country: cz + - id: guy-zyskind + name: Guy Zyskind + twitter: GuyZys + img: guy-zyskind.jpeg + caption: Founder of [Secret Network](https://scrt.network/), CEO [SCRT Labs](https://www.scrtlabs.com/) + country: is + - id: manu-alzuru + name: Manu Alzuru + twitter: ManuAlzuru + img: manu-alzuru.jpeg + caption: Humanist, solarpunk, Founder of [DoinGud](https://doingud.com/) & [ETH Barcelona](https://ethbarcelona.com/) + country: es speakersNote: We keep adding more and more speakers, stay tuned ... speakers: - guy-zyskind @@ -154,7 +154,7 @@ program: - time: 9:30 - 9:35 title: Welcome to Web3Privacy speakers: - - name: TBA + - name: TBA desc: Welcoming visitors to our private-centric research, community and conference - time: 9:35 - 10:55 title: Talks I. - TBA @@ -181,7 +181,7 @@ program: title: Networking & Drinks type: other - time: 20:00 - 4:00 - title: "#Lunarpunk party" + title: '#Lunarpunk party' desc: Enjoy our afterparty in Lunarpunk style with quality Prague rave DJs, which will take place in the same venue until the morning (4am). second: - time: 09:35 - 10:55 @@ -200,4 +200,4 @@ program: title: 25min Coffee Break type: other - time: 16:10 - 18:30 - title: Workshops IV. \ No newline at end of file + title: Workshops IV. diff --git a/src/lib/helpers.js b/src/lib/helpers.js index a5b6f17..395c6aa 100644 --- a/src/lib/helpers.js +++ b/src/lib/helpers.js @@ -1,53 +1,65 @@ - -import removeMd from 'remove-markdown' +import removeMd from 'remove-markdown'; export function rand(length) { - let result = ''; - const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; - const charactersLength = characters.length; - let counter = 0; - while (counter < length) { - result += characters.charAt(Math.floor(Math.random() * charactersLength)); - counter += 1; - } - return result; + let result = ''; + const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; + const charactersLength = characters.length; + let counter = 0; + while (counter < length) { + result += characters.charAt(Math.floor(Math.random() * charactersLength)); + counter += 1; + } + return result; } -export function animateText (ev, interval = 50) { - if (!ev.target.getAttribute('data-text')) { - ev.target.setAttribute('data-text', ev.target.innerHTML) - } - if (ev.target.getAttribute('data-animate') === "1") { - return; - } - ev.target.setAttribute('data-animate', "1") - const orig = removeMd(ev.target.getAttribute('data-text')).replace('&', '&') - const steps = orig.length +export function animateText(ev, interval = 50) { + if (!ev.target.getAttribute('data-text')) { + ev.target.setAttribute('data-text', ev.target.innerHTML); + } + if (ev.target.getAttribute('data-animate') === '1') { + return; + } + ev.target.setAttribute('data-animate', '1'); + const orig = removeMd(ev.target.getAttribute('data-text')).replace('&', '&'); + const steps = orig.length; - const genRand = (pos = 0, len = null) => orig.substring(pos, len).split(' ').map(x => rand(x.length)).join(' ') - const random = genRand(0, orig.length) + const genRand = (pos = 0, len = null) => + orig + .substring(pos, len) + .split(' ') + .map((x) => rand(x.length)) + .join(' '); + const random = genRand(0, orig.length); - ev.target.innerHTML = random + ev.target.innerHTML = random; - for (let i = 0; i <= steps; i++) { - setTimeout(() => { - ev.target.innerHTML = orig.substring(0, i) + genRand(i, orig.length) - //console.log(ev.target.innerHTML) + for (let i = 0; i <= steps; i++) { + setTimeout(() => { + ev.target.innerHTML = orig.substring(0, i) + genRand(i, orig.length); + //console.log(ev.target.innerHTML) - if (i === steps) { - ev.target.setAttribute('data-animate', "0") - } - }, interval * i) - } + if (i === steps) { + ev.target.setAttribute('data-animate', '0'); + } + }, interval * i); + } } -export async function handleAnchorClick (event) { - event.preventDefault() - const link = event.currentTarget - const anchorId = new URL(link.href).hash.replace('#', '') - const anchor = document.getElementById(anchorId || 'intro') - return window.scrollTo({ - top: anchor.offsetTop, - behavior: 'smooth' - }) -} \ No newline at end of file +export async function handleAnchorClick(event) { + event.preventDefault(); + const link = event.currentTarget; + const anchorId = new URL(link.href).hash.replace('#', ''); + const anchor = document.getElementById(anchorId || 'intro'); + return window.scrollTo({ + top: anchor.offsetTop, + behavior: 'smooth' + }); +} + +export function animateSection(interval = 50) { + return (el) => { + for (const e of el.target.getElementsByClassName('animate-section')) { + animateText({ target: e }, interval); + } + }; +} diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 9219b09..6866119 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -3,10 +3,10 @@ export let data; import SvelteMarkdown from 'svelte-markdown'; - import { animateText, handleAnchorClick } from '$lib/helpers'; + import { animateText, animateSection, handleAnchorClick } from '$lib/helpers'; import { onMount } from 'svelte'; - let navbar = false; + let navbar = false; let choosed = null; let lastScrollTop = null; @@ -23,34 +23,34 @@ ]; const homepageAnimation = () => { - const collection = document.getElementsByClassName('animation-crypt') + const collection = document.getElementsByClassName('animation-crypt'); for (const el of collection) { - animateText({ target: el }) + animateText({ target: el }); } - } + }; - function locationHashUpdateTick () { - const scrollTop = document.documentElement.scrollTop || document.body.scrollTop + function locationHashUpdateTick() { + const scrollTop = document.documentElement.scrollTop || document.body.scrollTop; if (lastScrollTop === scrollTop) { return null; } else { - lastScrollTop = scrollTop + lastScrollTop = scrollTop; } - const arr = [] + const arr = []; for (const mi of menu) { if (mi.external) continue; - const el = document.getElementById(mi.title.toLowerCase()) - const pos = el.getBoundingClientRect() + const el = document.getElementById(mi.title.toLowerCase()); + const pos = el.getBoundingClientRect(); //console.log(mi.title, pos.top, pos.bottom) if (pos.top <= 100 && pos.bottom > 100) { - arr.push([ mi, pos.top, pos.bottom ]) + arr.push([mi, pos.top, pos.bottom]); } } - choosed = arr[arr.length-1] + choosed = arr[arr.length - 1]; if (choosed) { //console.log('choosed = ', choosed[0].title) - const currentHash = window.location.hash - const hash = choosed[0].url + const currentHash = window.location.hash; + const hash = choosed[0].url; if (hash !== currentHash) { if (hash === '') { history.replaceState(null, null, ' '); @@ -62,28 +62,38 @@ } onMount(async () => { - setTimeout(homepageAnimation, 0) // initial animation - setInterval(homepageAnimation, 10000) // every 10 seconds - setInterval(locationHashUpdateTick, 1000) // every 1 seconds + setTimeout(homepageAnimation, 0); // initial animation + setInterval(homepageAnimation, 10000); // every 10 seconds + setInterval(locationHashUpdateTick, 1000); // every 1 seconds }); - -
+
- {data.config.parent} + {data.config.parent}
- - {#each menu.filter(i => !i.hidden) as mi} + + {#each menu.filter((i) => !i.hidden) as mi} @@ -92,24 +102,35 @@
{#if navbar} -
- {#each menu.filter(i => !i.hidden) as mi} -
- navbar = false}> +
+ {#each menu.filter((i) => !i.hidden) as mi} + + {/each}
- {/each} -
{/if}
-
+
{data.config.shortname.toUpperCase()}
- {data.config.date} @ {data.config.venue}
+ {data.config.date} @ + {data.config.venue} +

{data.config.slogan}

@@ -132,11 +153,13 @@

- {data.config.parent} + {data.config.parent}
-
+ diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index f2abd8f..6293dbf 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,28 +1,20 @@ {data.config.title} | {data.config.date} - - - - + + + +
@@ -33,7 +25,10 @@
Key themes
{#each data.config.themes as ti} -
+
{ti.title.toUpperCase()}
@@ -76,7 +71,9 @@
{data.config.programNote}
{/if}
- {#each data.config.stages.map(s => ({ ...s, program: data.config.program[s.id]})).filter(s => s.program) as stage} + {#each data.config.stages + .map((s) => ({ ...s, program: data.config.program[s.id] })) + .filter((s) => s.program) as stage}
{stage.name}
@@ -90,14 +87,22 @@ {#each stage.program as pi} -
{@html pi.time .split('-') .map((x) => x) .join('')} -
{pi.title} {pi.speakers ? '― ' + pi.speakers[0]?.name : ''}
+
+ {pi.title} + {pi.speakers ? '― ' + pi.speakers[0]?.name : ''} +
{#if pi.desc}
@@ -120,8 +125,8 @@ @@ -135,12 +140,19 @@
{#each data.config.tickets as tt}
data.config.ticketing ? goto(data.config.ticketingUrl) : false} + on:click={() => (data.config.ticketing ? goto(data.config.ticketingUrl) : false)} > - - + +
    {#each tt.includes as ti}
  • {ti}
  • @@ -157,9 +169,12 @@
{#if data.config.ticketing} {/if} {#if data.config.ticketsNote} diff --git a/vite.config.js b/vite.config.js index e3085cc..2f6f8a7 100644 --- a/vite.config.js +++ b/vite.config.js @@ -3,8 +3,5 @@ import { defineConfig } from 'vite'; import ViteYaml from '@modyfi/vite-plugin-yaml'; export default defineConfig({ - plugins: [ - ViteYaml(), - sveltekit() - ] + plugins: [ViteYaml(), sveltekit()] });