From f09902770a817e0c647193d84b0559200f4bd555 Mon Sep 17 00:00:00 2001 From: Hugo Date: Thu, 9 Nov 2023 11:00:56 -0700 Subject: [PATCH] Load sessions schedule from streameth API (#30) * Load sessions schedule from streameth API * Show rooms in different tabs, make fonts bigger for talk names and time, add links to program and streameth --- assets/css/main.css | 242 +++++++++++++++ assets/js/main.js | 110 +++++++ assets/speakers.json | 202 +++++++++++++ generate_speaker_code.py | 78 +++++ .../{leo_alt.jpg => leonardo_alt.jpg} | Bin index.html | 30 +- scripts/generate_speaker_code.py | 286 ------------------ 7 files changed, 653 insertions(+), 295 deletions(-) create mode 100644 assets/speakers.json create mode 100644 generate_speaker_code.py rename images/speakers/{leo_alt.jpg => leonardo_alt.jpg} (100%) delete mode 100644 scripts/generate_speaker_code.py diff --git a/assets/css/main.css b/assets/css/main.css index bc20c0c..dc0bed6 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -2219,6 +2219,248 @@ input, select, textarea { } +/* Sessions */ + + .sessions { + display: -moz-flex; + display: -webkit-flex; + display: -ms-flex; + display: flex; + -moz-flex-wrap: wrap; + -webkit-flex-wrap: wrap; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + border-radius: 0.25em; + border: solid 1px rgba(255, 255, 255, 0.15); + background: rgba(255, 255, 255, 0.05); + margin: 0 0 2em 0; + } + + .sessions section { + padding: 3.5em 3em 1em 7em ; + width: 100%; + border-top: solid 1px rgba(255, 255, 255, 0.15); + position: relative; + } + + .sessions section:nth-child(2n) { + border-left: solid 1px rgba(255, 255, 255, 0.15); + } + + .sessions section .icon { + -moz-transition: opacity 0.5s ease, -moz-transform 0.5s ease; + -webkit-transition: opacity 0.5s ease, -webkit-transform 0.5s ease; + -ms-transition: opacity 0.5s ease, -ms-transform 0.5s ease; + transition: opacity 0.5s ease, transform 0.5s ease; + -moz-transition-delay: 1s; + -webkit-transition-delay: 1s; + -ms-transition-delay: 1s; + transition-delay: 1s; + -moz-transform: scale(1); + -webkit-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); + position: absolute; + left: 3em; + top: 3em; + opacity: 1; + } + + .sessions section:nth-child(1) .icon { + -moz-transition-delay: 0.15s; + -webkit-transition-delay: 0.15s; + -ms-transition-delay: 0.15s; + transition-delay: 0.15s; + } + + .sessions section:nth-child(2) .icon { + -moz-transition-delay: 0.3s; + -webkit-transition-delay: 0.3s; + -ms-transition-delay: 0.3s; + transition-delay: 0.3s; + } + + .sessions section:nth-child(3) .icon { + -moz-transition-delay: 0.45s; + -webkit-transition-delay: 0.45s; + -ms-transition-delay: 0.45s; + transition-delay: 0.45s; + } + + .sessions section:nth-child(4) .icon { + -moz-transition-delay: 0.6s; + -webkit-transition-delay: 0.6s; + -ms-transition-delay: 0.6s; + transition-delay: 0.6s; + } + + .sessions section:nth-child(5) .icon { + -moz-transition-delay: 0.75s; + -webkit-transition-delay: 0.75s; + -ms-transition-delay: 0.75s; + transition-delay: 0.75s; + } + + .sessions section:nth-child(6) .icon { + -moz-transition-delay: 0.9s; + -webkit-transition-delay: 0.9s; + -ms-transition-delay: 0.9s; + transition-delay: 0.9s; + } + + .sessions section:nth-child(7) .icon { + -moz-transition-delay: 1.05s; + -webkit-transition-delay: 1.05s; + -ms-transition-delay: 1.05s; + transition-delay: 1.05s; + } + + .sessions section:nth-child(8) .icon { + -moz-transition-delay: 1.2s; + -webkit-transition-delay: 1.2s; + -ms-transition-delay: 1.2s; + transition-delay: 1.2s; + } + + .sessions section:nth-child(9) .icon { + -moz-transition-delay: 1.35s; + -webkit-transition-delay: 1.35s; + -ms-transition-delay: 1.35s; + transition-delay: 1.35s; + } + + .sessions section:nth-child(10) .icon { + -moz-transition-delay: 1.5s; + -webkit-transition-delay: 1.5s; + -ms-transition-delay: 1.5s; + transition-delay: 1.5s; + } + + .sessions section:nth-child(11) .icon { + -moz-transition-delay: 1.65s; + -webkit-transition-delay: 1.65s; + -ms-transition-delay: 1.65s; + transition-delay: 1.65s; + } + + .sessions section:nth-child(12) .icon { + -moz-transition-delay: 1.8s; + -webkit-transition-delay: 1.8s; + -ms-transition-delay: 1.8s; + transition-delay: 1.8s; + } + + .sessions section:nth-child(13) .icon { + -moz-transition-delay: 1.95s; + -webkit-transition-delay: 1.95s; + -ms-transition-delay: 1.95s; + transition-delay: 1.95s; + } + + .sessions section:nth-child(14) .icon { + -moz-transition-delay: 2.1s; + -webkit-transition-delay: 2.1s; + -ms-transition-delay: 2.1s; + transition-delay: 2.1s; + } + + .sessions section:nth-child(15) .icon { + -moz-transition-delay: 2.25s; + -webkit-transition-delay: 2.25s; + -ms-transition-delay: 2.25s; + transition-delay: 2.25s; + } + + .sessions section:nth-child(16) .icon { + -moz-transition-delay: 2.4s; + -webkit-transition-delay: 2.4s; + -ms-transition-delay: 2.4s; + transition-delay: 2.4s; + } + + .sessions section:nth-child(17) .icon { + -moz-transition-delay: 2.55s; + -webkit-transition-delay: 2.55s; + -ms-transition-delay: 2.55s; + transition-delay: 2.55s; + } + + .sessions section:nth-child(18) .icon { + -moz-transition-delay: 2.7s; + -webkit-transition-delay: 2.7s; + -ms-transition-delay: 2.7s; + transition-delay: 2.7s; + } + + .sessions section:nth-child(19) .icon { + -moz-transition-delay: 2.85s; + -webkit-transition-delay: 2.85s; + -ms-transition-delay: 2.85s; + transition-delay: 2.85s; + } + + .sessions section:nth-child(20) .icon { + -moz-transition-delay: 3s; + -webkit-transition-delay: 3s; + -ms-transition-delay: 3s; + transition-delay: 3s; + } + + .sessions.inactive section .icon { + -moz-transform: scale(0.5); + -webkit-transform: scale(0.5); + -ms-transform: scale(0.5); + transform: scale(0.5); + opacity: 0; + } + + @media screen and (max-width: 980px) { + + .sessions { + display: block; + } + + .sessions section { + border-top-width: 1px !important; + border-left-width: 0 !important; + width: 100%; + } + + .sessions section:first-child { + border-top-width: 0 !important; + } + + } + + @media screen and (max-width: 736px) { + + .sessions section { + padding: 2.5em 1.5em 0.1em 5.5em ; + } + + .sessions section .icon { + left: 1.5em; + top: 2em; + } + + } + + @media screen and (max-width: 480px) { + + .sessions section { + padding: 2em 1.5em 0.1em 1.5em ; + } + + .sessions section .icon { + left: 0; + position: relative; + top: 0; + } + + } + + + /* Form */ form { diff --git a/assets/js/main.js b/assets/js/main.js index 87c8cc8..9664716 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -189,6 +189,116 @@ })(jQuery); +function getIstanbulTime(input_date) { + var local_time = input_date.toLocaleString('en-US', { timeZone: 'Europe/Istanbul' }).split(" "); + var am_pm = local_time[2]; + var result = local_time[1].split(":"); + result.pop(); + return result.join(":") + " " + am_pm; +} + +function getNameIds() { + var name_ids = {}; + $.ajax({ + 'async': false, + 'global': false, + 'url': "/assets/speakers.json", + 'dataType': "json", + 'success': function (data) { + name_ids = data; + } + }); + return name_ids; +} + +function getSessionHtml(session, name_ids) { + var session_name = session.name; + var session_description = session.description; + var session_start_time = session.start; + var session_end_time = session.end; + var session_speakers = session.speakers; + var session_speaker_names = []; + var session_start = new Date(session_start_time); + var session_end = new Date(session_end_time); + for (var j = 0; j < session_speakers.length; j++) { + var session_speaker = session_speakers[j]; + var session_speaker_name = session_speaker.name; + session_speaker_names.push(session_speaker_name); + } + var session_speaker_names_string = session_speaker_names.join(", "); + var session_start_time = getIstanbulTime(session_start); + var session_end_time = getIstanbulTime(session_end); + var times = session_start_time + " - " + session_end_time; + var session_html = "

" + session_name + "

" + times + "

" + + for (var j = 0; j < session_speakers.length; j++) { + var session_speaker = session_speakers[j]; + var session_speaker_id = session_speaker.id; + var session_speaker_name = session_speaker.name; + + // TODO: Remove this when API returns the correct name + if (session_speaker_name == "Simi Vera") { + session_speaker_name = "Smriti Verma"; + session_speaker_id = "smriti_verma"; + session_speaker_names_string = session_speaker_names_string.replace("Simi Vera", "Smriti Verma"); + } + + if (session_speaker_name in name_ids) { + session_speaker_id = name_ids[session_speaker_name].picture; + } + session_html += "\"""; + } + + session_html +="

" + session_speaker_names_string + "

" + session_description + "

"; + return session_html; +} + +function loadSessions() { + var name_ids = getNameIds(); + + $.ajax({ + url: "https://app.streameth.org/api/organizations/devconnect/events/evm_summit/sessions?stage=emirgan_1" + }).then(function(sessions) { // Main Stage + $("#sessions-main").append("

Emirgan 1

"); + for (var i = 0; i < sessions.length; i++) { + var session = sessions[i]; + session_html = getSessionHtml(session, name_ids); + $("#sessions-main").append(session_html); + } + }); + + $.ajax({ + url: "https://app.streameth.org/api/organizations/devconnect/events/evm_summit/sessions?stage=emirgan_2" + }).then(function(sessions) { // Breakout Stage + $("#sessions-breakout").append("

Emirgan 2

"); + for (var i = 0; i < sessions.length; i++) { + var session = sessions[i]; + session_html = getSessionHtml(session, name_ids); + $("#sessions-breakout").append(session_html); + } + }); +} + +function showSessions(room) { + var main_stage = document.getElementById("sessions-main"); + var breakout_stage = document.getElementById("sessions-breakout"); + var main_room_button = document.getElementById("emirgan1-button"); + var breakout_room_button = document.getElementById("emirgan2-button"); + + if (room == "emirgan1") { + main_stage.style.display = "block"; + breakout_stage.style.display = "none"; + breakout_room_button.classList.remove("disabled"); + main_room_button.classList.add("disabled"); + } else { + main_stage.style.display = "none"; + breakout_stage.style.display = "block"; + breakout_room_button.classList.add("disabled"); + main_room_button.classList.remove("disabled"); + } +} + + function showMenu() { var x = document.getElementById("navLinks"); if (x.style.display === "block") { diff --git a/assets/speakers.json b/assets/speakers.json new file mode 100644 index 0000000..08aa1f0 --- /dev/null +++ b/assets/speakers.json @@ -0,0 +1,202 @@ +{ + "Andrei Maiboroda": { + "project": "Ipsilon - Ethereum Foundation", + "bio": "", + "picture": "andrei_maiboroda" + }, + "Ansgar Dietrichs": { + "project": "Ethereum Foundation", + "bio": "Researcher at Ethereum Foundation", + "picture": "ansgar_dietrichs" + }, + "Alex Beregszaszi": { + "project": "Ipsilon - Ethereum Foundation", + "bio": "", + "picture": "alex_beregszaszi" + }, + "Alex Gluchowski": { + "project": "Matter Labs", + "bio": "Alex Gluchowski is the Co-founder and CEO of Matter Labs, creators of zkSync.\nAs the world's most Ethereum-aligned Layer-2 solution, zkSync is on a mission to accelerate the mass adoption of crypto for personal sovereignty.\nAlex is a highly experienced software architect and 3x founder with 15+ years of startup and engineering experience.\nPrior to founding Matter Labs, he was the founding CTO of PaulCamper, the largest online camper-sharing platform in Europe.", + "picture": "alex_gluchowski" + }, + "Ayman Bouchareb": { + "project": "Nethermind", + "bio": "Ayman is a 24 years old software engineer from Morocco, joined Nethermind last year as part of the core team, and mostly focus on EVM related topics (since Ayman likes VMs), and now Ayman works on small EIPs that touchs the EVM for Shanghai and Cancun forks as well as working on the full EOF update for the EVM.", + "picture": "ayman_bouchareb" + }, + "Ben Livshitz": { + "project": "Matter Labs", + "bio": "Ben is the VP of Research at Matter Labs and an associate professor at Imperial College London.\nBen is a computer scientist with a Ph.D. in computer science from Stanford University, with an h-index of 57 and over 10,000 citations to his papers. He is an inventor skilled at translating academic research into industrial practice, a research manager leading high-performance applied research teams, and a professor. Most of his work has direct industrial applications.\nCurrently, he serves as the VP of Research at Matter Labs. Previously, he led teams as the CEO of Zilliqa Research, a layer-1 blockchain, and as the Chief Scientist at Brave Software, leading innovative development across cryptography, machine learning, performance, security, privacy, and other domains. For many years, he worked as a researcher at Microsoft Research in Seattle.\nHe has also taught at UW, MIT, and Imperial College London. He has also filed dozens of patents based on his inventions.", + "picture": "ben_livshitz" + }, + "Carlos Matallana": { + "project": "Polygon zkEVM", + "bio": "Protocol blockchain engineer focused on L2 solutions.\nStarted working on Iden3 and then switch to develop the PoC of a rollup back in 2019.\nThen Carlos started on Hermez network as a protocol engineer which became polygon zkEVM", + "picture": "carlos_matallana" + }, + "CPerezz": { + "project": "Privacy&Scaling Explorations - Ethereum Foundation", + "bio": "Working at PSE for 3+years. One of the main contributors of the ZKEVM and Halo2-PSE & halo2curves mantainer (among others).\nCurrently working on folding among any other random things that pickup my interest.", + "picture": "cperezz" + }, + "Daniel Kirchner": { + "project": "Solidity - Ethereum Foundation", + "bio": "", + "picture": "daniel_kirchner" + }, + "Daniel Marzec (dmarz)": { + "project": "Flashbots", + "bio": "SUAVE Protocol R&D", + "picture": "daniel_marzec" + }, + "David Pearce": { + "project": "Consensys", + "bio": "David is a research engineer in the Trustworthy Smart Contracts Team at ConsenSys.\nDavid's current focus is on the application of formal methods to smart contracts.\nBefore that, David was an Associate Professor in the School of Engineering and Computer Science at Victoria University of Wellington, NZ.\nDavid graduated from the Department of Computing at Imperial College London, and moved to New Zealand in 2004.\nDavid's research interests are in programming languages, compilers, static analysis and formal verification. David is the author of the Whiley programming language which (like Dafny) supports formal verification of functional specifications (i.e. preconditions / postconditions).", + "picture": "david_pearce" + }, + "David Weisiger": { + "project": "Taiko Labs", + "bio": "Head of DevRel @ Taiko Labs", + "picture": "david_weisiger" + }, + "Danno Ferrin": { + "project": "Hyperledger Besu", + "bio": "Danno is Principal Software Engineer at Hedera Hashgraph, where he integrates the EVM into the Hedera network.\nPreviously he was Lead Protocol Engineer at ConsenSys Software Inc on their Ethereum Mainnet team, where he chose to go \"full crypto\" after leaving Google.\nDanno also worked at McDonalds as a crew member in his youth, so he is fully hedged against any DeFi downturn.\nDanno is a maintainer for the Hyperledger Besu project.", + "picture": "danno_ferrin" + }, + "Dragan Rakita": { + "project": "Paradigm", + "bio": "Reth core dev, revm author.", + "picture": "dragan_rakita" + }, + "Eduard Sanou": { + "project": "PSE", + "bio": "Learned zk in iden3 (now Polygon Hermez) while developing a decentralized identity protocol, and later a zkRollup.\nNow working on the zkEVM CE project in PSE (EF) for nearly 2 years", + "picture": "eduard_sanou" + }, + "Federico Kunze Küllmer": { + "project": "Evmos", + "bio": "Founder of Evmos, CEO at Altiplanic. Previously IBC & Cosmos Core Engineer", + "picture": "federico_kunze_kullmer" + }, + "Greg Colvin": { + "project": "", + "bio": "", + "picture": "greg_colvin" + }, + "Harikrishnan Mulackal": { + "project": "", + "bio": "", + "picture": "harikrishnan_mulackal" + }, + "Jacek Glen": { + "project": "Gas Cost Estimator - Imapp", + "bio": "Jacek have almost 20 years of experience developing and designing systems in industries spanning from banking to finance to big data to insurance.\nIn recent years, Jacek have focused on all aspects of blockchain technologies. Jacek is involved in developing Ethereum clients, smart contracts and web3 apps.", + "picture": "jacek_glen" + }, + "John Toman": { + "project": "Certora Inc.", + "bio": "Dr. John Toman is the VP of R&D at Certora Inc.\nHe leads the development of the Certora Prover and specializes in static analysis.\nHe received his PhD in 2019 from the University of Washington.\nDr. Toman’s research focuses on bringing the power of automated verification to real-world, industrial settings. His award-winning, impact-focused research has been published at several top conferences in the field.", + "picture": "john_toman" + }, + "Jordi Baylina": { + "project": "Polygon", + "bio": "", + "picture": "jordi_baylina" + }, + "José Pedro Sousa": { + "project": "Aztec Labs", + "bio": "A musician and teacher became Developer Relations Engineer at Aztec.\nPreviously at Polygon and Mindera, this fellow geek loves web3 and its private solutions, and is a serious candidate for \"jack of all trades, master of none\".", + "picture": "jose_pedro_sousa" + }, + "Leonardo Alt": { + "project": "powdr", + "bio": "Leo currently works on powdr building zkVM tooling.\nBefore that he worked on Formal Verification and Solidity at the Ethereum Foundation for many years, mostly doing research and building tools for formal verification of smart contracts and zk circuits.\nLeo also holds a PhD in Computer Science, focused on SMT solving and software verification.", + "picture": "leonardo_alt" + }, + "Lightclient": { + "project": "Geth - Ethereum Foundation", + "bio": "", + "picture": "lightclient" + }, + "Mamy André-Ratsimbazafy": { + "project": "Taiko", + "bio": "Mamy has been an Ethereum core dev for 5 years, developing the Nimbus consensus client. After the success of The Merge, he now focuses on scaling Ethereum, by leading the ZK engineering team at Taiko.", + "picture": "mamy_andre_ratsimbazafy" + }, + "Marius van der Wijden": { + "project": "Geth - Ethereum Foundation", + "bio": "Marius is a developer at the Ethereum Foundation as a member of the Geth client team.", + "picture": "marius_van_der_wijden" + }, + "Morgan Weaver": { + "project": "OpenZeppelin", + "bio": "Morgan came to Web3 in early 2022, from the fields of deep learning, DevOps, and distributed systems within the Web2 landscape.\nThroughout this transition, Morgan has enjoyed building knowledge in Solidity, smart contract auditing, and systems-level Web3 security.\nWhile their work at OpenZeppelin has heavily focused on onchain monitoring and automation as well as proof of concept work, it has also included contributions to security standards with the Ethereum Enterprise Alliance, and participation in many hackathons, communities and events.\nMorgan lives and works in Lisbon, and intends to help Web3 make a positive disruption is the existing social, financial, and operational structures of Web2.", + "picture": "morgan_weaver" + }, + "Neville Grech": { + "project": "Dedaub", + "bio": "Neville is the Director and co-founder of Dedaub. Neville expertise is focused on program analysis, mostly applied to security applications.\nBefore Dedaub Neville had a mostly academic career. Have authored the first work that applies static analysis to the security of smart contracts, this work was subsequently highlighted by ACM SIGPLAN and Communications of the ACM.\nThroughout Naville's career also developed novel techniques and tools in the areas of energy efficient software development, smart contracts, semantics and generative programming.\nSome popular tools Naville have codeveloped include decompilers and security analyzers for the Ethereum platform (MadMax and Gigahorse) and Java pointer and taint analysis frameworks (Doop, P/Taint and HeapDL).\nPreviously, Naville was Reach High Fellow at the University of Athens, a Senior Research Associate at the University of Bristol, and have worked in industry as a Data Scientist and Software Engineer.\nNaville hold a PhD from the University of Southampton.", + "picture": "neville_grech" + }, + "Niklas Kunkel": { + "project": "Chronicle Labs - Chronicle Protocol - MakerDAO", + "bio": "Founder of Chronicle Labs, the developers of Chronicle Protocol.\nNik began his crypto journey at IBM Research, where he worked on the Hyperledger blockchain and early supply chain finance applications.\nIn 2017 he joined MakerDAO to create Dai, the first decentralized stablecoin on Ethereum.\nNik is responsible for creating DSProxy. An industry-standard account abstraction primitive, OasisDEX, the first decentralized exchange on Ethereum with an order matching engine, as well as Chronicle Oracle Protocol, which secures over $10B of assets locked in MakerDAO.", + "picture": "niklas_kunkel" + }, + "Orest Tarasiuk": { + "project": "Scroll", + "bio": "Old-school computer scientist and founder-CTO. Now working on scaling blockchains using ZK.", + "picture": "orest_tarasiuk" + }, + "Paweł Bylica": { + "project": "Ipsilon - Ethereum Foundation", + "bio": "", + "picture": "pawel_bylica" + }, + "Radosław Zagórowicz": { + "project": "Ipsilon - Ethereum Foundation", + "bio": "", + "picture": "radoslaw_zagorowicz" + }, + "Rami Khalil": { + "project": "Zeth (RISC Zero)", + "bio": "", + "picture": "rami_khalil" + }, + "Raul Jordan": { + "project": "Offchain Labs", + "bio": "Raul Jordan is a senior software engineer at Offchain Labs and a maintainer of the Prysm Ethereum consensus client.\nHes an avid fan of programming languages and onboarding a lot more developers outside of blockchain into the exciting world of Ethereum technology.", + "picture": "raul_jordan" + }, + "Remco": { + "project": "Nomic Foundation", + "bio": "Remco is the tech lead on Nomic Foundation's EDR team, where he works on the open-source building blocks that empower developers to create new dev tools for the Ethereum ecosystem.", + "picture": "remco" + }, + "Raoul Schaffranek": { + "project": "Runtime Verification", + "bio": "Raoul Schaffranek studied Computer Science at RWTH Aachen University, Germany, where he obtained B.Sc. and M.Sc. degrees.\nHe wrote his master thesis about compositional modeling and fully automated verification of distributed systems and formalized his findings with the Isabelle proof assistant.\nBefore joining RV, Raoul worked for more than eight years as a software engineer for the German software company graphodata AG.\nRaoul considers programming a human-centric rather than machine-centric activity, and he firmly believes that we should build modern programming languages and verification tools upon this perspective.", + "picture": "raoul_schaffranek" + }, + "Smriti Verma": { + "project": "OpenZeppelin", + "bio": "Smriti has been working at OpenZeppelin as a Blockchain Security Engineer, since 2020.\nPrior to transition into web3 security, she was working as a blockchain solutions engineer. She comes from a software development background, and has a masters in Data Analytics.", + "picture": "smriti_verma" + }, + "Tim Beiko": { + "project": "Ethereum Foundation", + "bio": "Tim runs the AllCoreDevs call for Ethereum", + "picture": "tim_beiko" + }, + "Ujval Misra": { + "project": "UC Berkeley; Specular", + "bio": "Ujval is a CS PhD student at UC Berkeley, advised by Dawn Song.\nHis research interests broadly lie in security and privacy—particularly in the context of decentralized trust.\nHis recent focus has been on decentralization problems in Ethereum-based L2 systems.", + "picture": "ujval_misra" + }, + "Ulaş Erdoğan": { + "project": "Clave", + "bio": "Ulaş is a Blockchain developer based in Istanbul. Currently a member of the Clave team which is building an AA-based wallet solution utilizing secure elements for signature abstraction in the mobile devices. Ulaş is also Head of Development in the Ethylene Studio and ex-president of ITU Blockchain, which is the first and biggest university blockchain society in Turkey.", + "picture": "ulas_erdogan" + } +} diff --git a/generate_speaker_code.py b/generate_speaker_code.py new file mode 100644 index 0000000..6fedc41 --- /dev/null +++ b/generate_speaker_code.py @@ -0,0 +1,78 @@ +#!/usr/bin/env python3 +import os +import sys +import json + + +if __name__ == "__main__": + SPACING = " " * 15 + + original_file = "index.html" + if not os.path.exists(original_file): + print(f"ERROR: index.html not found") + exit(1) + + original_content = open(original_file, "r").read() + original_content_begin = original_content.split(f"{SPACING}\n")[0] + original_content_end = original_content.split(f"{SPACING}\n")[1] + + speakers = json.loads(open("assets/speakers.json", "r").read()) + + i = 0 + debug=False + generated_code = "" + + if len(sys.argv) == 2 and sys.argv[1] == "debug": + debug=True + + generated_code+=f"{SPACING}\n" + for name in speakers.keys(): + i += 1 + + bio = speakers[name]['bio'].replace('\n', '

') + picture = speakers[name]['picture'] + project = speakers[name]['project'] + + image_path = f"./images/speakers/{picture}.jpg" + if not os.path.exists(image_path): + picture = "default" + if debug: + print(f"{image_path} not found") + + if debug: + print(f"{name}") + print(f"{image_path}") + print(f"{picture}") + + generated_code += f"""{SPACING}

+ {SPACING}{name} + {SPACING}

{name}

+ {SPACING}

{project}

+ """ + + if bio != "": + generated_code += f""" + {SPACING} + {SPACING} + """ + + generated_code += f""" + {SPACING}
\n""" + + if i % 2 == 1: + generated_code += f"{SPACING}
\n" + + generated_code+= f"{SPACING}\n" + + new_content = f"{original_content_begin}{generated_code}{original_content_end}" + new_content_file = open(original_file, "w") + new_content_file.write(new_content) + new_content_file.close() + diff --git a/images/speakers/leo_alt.jpg b/images/speakers/leonardo_alt.jpg similarity index 100% rename from images/speakers/leo_alt.jpg rename to images/speakers/leonardo_alt.jpg diff --git a/index.html b/index.html index 7abd02c..9b97e6f 100644 --- a/index.html +++ b/index.html @@ -12,7 +12,7 @@ - +
@@ -102,6 +102,8 @@

Location

@@ -288,8 +290,8 @@

Solidity - Ethereum Foundation

- Daniel Marzec -

Daniel Marzec

+ Daniel Marzec (dmarz) +

Daniel Marzec (dmarz)

Flashbots

- Jose Pedro Sousa -

Jose Pedro Sousa

+ José Pedro Sousa +

José Pedro Sousa

Aztec Labs

- Leo Alt -

Leo Alt

+ Leonardo Alt +

Leonardo Alt

powdr