diff options
author | braxtonhall | 2022-10-24 04:08:22 +0000 |
---|---|---|
committer | braxtonhall | 2022-10-24 04:08:22 +0000 |
commit | 383b5fe9374f580ef2d1eb3a450cb8b755ad54d4 (patch) | |
tree | 08a0e37672c50e35ce9cc8210f4f6862bedadec6 | |
parent | e2dbb1327f5264080ceb87659ad3cb57b2a0042c (diff) |
Migrate contributors to static html
-rw-r--r-- | README.md | 43 | ||||
-rw-r--r-- | index.html | 93 | ||||
-rw-r--r-- | people.json | 172 |
3 files changed, 265 insertions, 43 deletions
@@ -4,49 +4,6 @@ Can you please give me a Fibonacci function? Ideally (but not necessarily) one t For a submission to the upcoming "Reclaim your space" exhibition at [Hatch Art Gallery](https://www.instagram.com/hatch_artgallery). -### [`adirar111`](https://github.com/adirar111) -- [`y86`](./entries/adirar111/y86/fib.s) - -### [`braxtonhall`](https://github.com/braxtonhall) -- [`adam`](./entries/braxtonhall/adam/main.py) (WIP) -- [`express`](./entries/braxtonhall/express/index.js) -- [`homework`](./entries/braxtonhall/homework/fib.cpp) -- [`types`](./entries/braxtonhall/types/index.ts) -<!-- - `smt` compiles to SMT, and the solver gives you the fib sequence --> -<!-- - `imperitive-church` imperitive implementation in the lambda calculus --> - -### [`ionathanch`](https://github.com/ionathanch) -- [`agda`](./entries/ionathanch/Fib.agda) -- [`fortran`](./entries/ionathanch/fib.f90) - -### [`funemy`](https://github.com/funemy) -- [`agda`](./entries/funemy/agda/fib1.agda) -- [`z3`](./entries/funemy/z3/z3fib.sh) - -### [`jyoo980`](https://github.com/jyoo980) -- [`scala`](./entries/jyoo980/scala/Fib.scala) - -### [`margoseltzer`](https://github.com/margoseltzer) -- [`efficiency`](./entries/margoseltzer/efficiency.c) - -### [`Metroxe`](https://github.com/Metroxe) -- [`html`](./entries/Metroxe/index.html) - -### [`nritschel`](https://github.com/nritschel) -- [`fib-java`](./entries/nritschel/fib-java/src) - -### [`rtholmes`](https://github.com/rtholmes) -- [`stack-overflow`](./entries/rtholmes/Fibonacci%20series%20in%20JavaScript%20-%20Stack%20Overflow.webloc) - -### [`shayanh`](https://github.com/shayanh) -- [`matrix`](./entries/shayanh/matrix.go) - -### [`Tarcisio-Teixeira`](https://github.com/Tarcisio-Teixeira) -- [`logn?`](./entries/Tarcisio-Teixeira/fib.py) - -### [`wilbowma`](https://github.com/wilbowma) -- [`fib-lang`](https://github.com/wilbowma/fib-lang/tree/2ec2d1dfd141220882d824cf3dac5b374ed291f3) - ## Contributing To contribute just make a PR into the `main` branch! diff --git a/index.html b/index.html new file mode 100644 index 0000000..3755c55 --- /dev/null +++ b/index.html @@ -0,0 +1,93 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <title>fib</title> + <style> + .person { + margin-bottom: 1em; + } + .person-pic { + width: 50px; + } + .person-header { + display: flex; + align-items: end; + } + .person-header > * { + margin: 0.5em; + } + .person-name { + margin-bottom: 0; + } + .person-title { + margin-top: 0; + font-size: 80%; + } + .person > p { + margin: 0; + margin-left: 0.5em; + } + #contributors-container { + margin-top: 3em; + } + </style> + <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> +</head> +<body> + <h1><code>fib</code></h1> + <p>Can you please give me a Fibonacci function? Ideally (but not necessarily) one that only you would give me.</p> + + <p>For a submission to the upcoming "Reclaim your space" exhibition at <a href="https://www.instagram.com/hatch_artgallery">Hatch Art Gallery</a>.</p> + + <div id="contributors-container"> + <h3>Contributors</h3> + <div id="contributors"></div> + </div> +<script> + const getContributors = _ => fetch("/people.json").then(res => res.json()); + + const toPersonNode = person => $("<div>", {class: "person"}).append( + toPersonHeader(person), + ...person.entries.sort(cmpEntry).map(toPersonEntryNode), + ); + + const toPersonImage = github => github + ? $("<img>", {class: "person-pic", src: `https://github.com/${github}.png`, alt: github}) + : $("<div>", {class: "person-pic"}); + + + const toPersonDetails = person => + $("<div>").append( + person.github + ? $("<a>", {href: `https://github.com/${person.github}`}) + .append($("<p>", {class: "person-name"}).text(person.name)) + : $("<p>", {class: "person-name"}).text(person.name), + $("<p>", {class: "person-title"}).text(person.title), + ); + + const toPersonHeader = person => $("<div>", {class: "person-header"}) + .append(toPersonImage(person.github), toPersonDetails(person)); + + const toPersonEntryNode = entry => $("<p>").append( + $("<a>", { + href: entry.link.startsWith("./entries") + ? `https://github.com/braxtonhall/fib/tree/main/${entry.link.replace(/^\.\//, "")}` + : entry.link + }).append($("<code>").text(entry.name)), + ); + + const cmpPeople = () => 1; // TODO + + const cmpEntry = () => 1; // TODO + + $(document).ready(async _ => { + const contributors = await getContributors() + .then(people => people.sort(cmpPeople)) + .then(people => people.map(toPersonNode)) + .then(nodes => $("#contributors").append(...nodes)); + console.log(contributors); + }); +</script> +</body> +</html> diff --git a/people.json b/people.json new file mode 100644 index 0000000..cc5e8e3 --- /dev/null +++ b/people.json @@ -0,0 +1,172 @@ +[ + { + "github": "adirar111", + "name": "Aymen Dirar", + "title": "BSc Student, UBC", + "entries": [ + { + "name": "y86", + "link": "./entries/adirar111/y86/fib.s" + } + ] + }, + { + "github": "braxtonhall", + "name": "Braxton Hall", + "title": "MSc, UBC", + "entries": [ + { + "name": "express", + "link": "./entries/braxtonhall/express/index.js" + }, + { + "name": "homework", + "link": "./entries/braxtonhall/homework/fib.cpp" + }, + { + "name": "types", + "link": "./entries/braxtonhall/types/index.ts" + } + ] + }, + { + "github": "ionathanch", + "name": "Jonathan Chan", + "title": "MSc, UBC", + "entries": [ + { + "name": "agda", + "link": "./entries/ionathanch/Fib.agda" + }, + { + "name": "fortran", + "link": "./entries/ionathanch/fib.f90" + } + ] + }, + { + "github": "funemy", + "name": "Yanze Li", + "title": "PhD Student, UBC", + "entries": [ + { + "name": "agda", + "link": "./entries/funemy/agda/fib1.agda" + }, + { + "name": "z3", + "link": "./entries/funemy/z3/z3fib.sh" + } + ] + }, + { + "github": "jyoo980", + "name": "James Yoo", + "title": "MSc, UBC", + "entries": [ + { + "name": "scala", + "link": "./entries/jyoo980/scala/Fib.scala" + } + ] + }, + { + "github": "margoseltzer", + "name": "Margo Seltzer", + "title": "Professor of Computer Science, UBC", + "entries": [ + { + "name": "efficiency", + "link": "./entries/margoseltzer/efficiency.c" + } + ] + }, + { + "github": "meghasinghania22", + "name": "Megha Singhania", + "title": "BSc, UBC", + "entries": [ + { + "name": "bash", + "link": "./entries/meghasinghania22/bash/script.sh" + } + ] + }, + { + "github": "Metroxe", + "name": "Christopher Powroznik", + "title": "BCom, UBC", + "entries": [ + { + "name": "html", + "link": "./entries/Metroxe/index.html" + } + ] + }, + { + "github": "nritschel", + "name": "Nico Ritschel", + "title": "PhD Student, UBC", + "entries": [ + { + "name": "fib-java", + "link": "./entries/nritschel/fib-java/src" + } + ] + }, + { + "github": "perryliao", + "name": "Perry Liao", + "title": "BSc, UBC", + "entries": [ + { + "name": "groovy", + "link": "./entries/perryliao/fib.groovy" + } + ] + }, + { + "github": "rtholmes", + "name": "Reid Holmes", + "title": "Associate Professor of Computer Science, UBC", + "entries": [ + { + "name": "stack-overflow", + "link": "./entries/rtholmes/Fibonacci%20series%20in%20JavaScript%20-%20Stack%20Overflow.webloc" + } + ] + }, + { + "github": "shayanh", + "name": "Shayan Hosseini", + "title": "MSc Student, UBC", + "entries": [ + { + "name": "matrix", + "link": "./entries/shayanh/matrix.go" + } + ] + }, + { + "github": "Tarcisio-Teixeira", + "name": "TarcĂsio Teixeira", + "title": "MSc Student, UBC", + "entries": [ + { + "name": "logn?", + "link": "./entries/Tarcisio-Teixeira/fib.py" + } + ] + }, + { + "github": "wilbowma", + "name": "William Bowman", + "title": "Assistant Professor of Computer Science, UBC", + "entries": [ + { + "name": "fib-lang", + "link": "https://github.com/wilbowma/fib-lang/tree/2ec2d1dfd141220882d824cf3dac5b374ed291f3" + } + ] + } +]
\ No newline at end of file |