From b2d4bb707c51e360cb92fe2d149aa16a0c41e80f Mon Sep 17 00:00:00 2001 From: victorbjelkholm Date: Mon, 30 Jul 2018 15:51:03 +0200 Subject: [PATCH] Add support for `datasets` Not quite happy with the layout of these dataset items as they become to wide with the hash in the description area. Also the README.md seems to have changed order but changes were never commited. Also includes a fix to be able to run dev server on any port with the `PORT` environment variable. License: MIT Signed-off-by: Victor Bjelkholm --- README.md | 22 +++++++++++++--------- data/datasets.yml | 23 +++++++++++++++++++++++ scripts/dev.js | 5 +++-- src/layouts/_default/baseof.html | 2 +- src/layouts/partials/list.html | 12 ++++++++++++ 5 files changed, 52 insertions(+), 12 deletions(-) create mode 100644 data/datasets.yml diff --git a/README.md b/README.md index 0d782b1..b33f289 100644 --- a/README.md +++ b/README.md @@ -6,24 +6,24 @@ > Useful resources for using [IPFS](https://ipfs.io) and building things on top of it -_This list is for projects, tools, or pretty much any things related to IPFS that are totally_ **awesome**_. This is for products which are already awesome - if you have plans for cool stuff to do with IPFS, you should build it, and then -link it here. If you have an idea for an awesome thing to do with IPFS, a good place to ask about it might be in [ipfs/apps](https://github.com/ipfs/apps) or [ipfs/notes](https://github.com/ipfs/notes)._ +_This list is for projects, tools, or pretty much any things related to IPFS that +are totally_ **awesome**_. This is for products which are already awesome - if +you have plans for cool stuff to do with IPFS, you should build it, and then +link it here. If you have an idea for an awesome thing to do with IPFS, a good +place to ask about it might be in [ipfs/apps](https://github.com/ipfs/apps) or +[ipfs/notes](https://github.com/ipfs/notes)._ ## Table of Contents -- [Contribute](#contribute-to-this-list) - [Apps](#apps) - [Articles](#articles) - [Tools](#tools) - [Videos](#videos) - [Discussions](#discussions) -- [Want to hack on IPFS?](#want-to-hack-on-ipfs) +- [Contribute](#contribute) + - [Want to hack on IPFS?](#want-to-hack-on-ipfs) - [License](#license) -## Contribute to this list! - -Everyone is welcome to submit their new awesome-ipfs item. Check the [CONTRIBUTING.md guidelines](https://github.com/ipfs/awesome-ipfs/blob/master/CONTRIBUTING.md) to learn how to do so. - ## Apps - [a js video player](https://github.com/ipfs/website/tree/master/content/docs/examples/webapps/play) - [Demo](https://ipfs.io/ipfs/QmVc6zuAneKJzicnJpfrqCH9gSy6bz54JhcypfJYhGUFQu/play#/ipfs/QmTKZgRNwDNZwHtJSjCp6r5FYefzpULfy37JvMt9DwvXs) @@ -132,7 +132,11 @@ Everyone is welcome to submit their new awesome-ipfs item. Check the [CONTRIBUTI * [CRDTs discussion](https://github.com/ipfs/notes/issues/23) -## Want to hack on IPFS? +## Contribute + +Please add (or remove) stuff from this list if you see anything awesome! [Open an issue](https://github.com/ipfs/awesome-ipfs/issues) or a PR. + +### Want to hack on IPFS? [![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/contributing.md) diff --git a/data/datasets.yml b/data/datasets.yml new file mode 100644 index 0000000..b6bcf18 --- /dev/null +++ b/data/datasets.yml @@ -0,0 +1,23 @@ +title: Datasets +color: teal +icon: stroke_copy +description: Datasets who live or are replicated to IPFS +content: + - title: IETF RFC Archive + hash: /ipfs/QmNvTjdqEPjZVWCvRWsFJA1vK7TTw1g9JP6we1WBJTRADM + website: https://ipfs.io/ipfs/QmNvTjdqEPjZVWCvRWsFJA1vK7TTw1g9JP6we1WBJTRADM + source: https://github.com/ipfs/archives/issues/18 + description: + size: 500MB + - title: Presidental Daily Briefs + hash: /ipfs/Qme6epvZDj3vzHcFKdF1nZhbixjw8Bn4imGcKnbUyBJL89 + website: https://ipfs.io/ipfs/Qme6epvZDj3vzHcFKdF1nZhbixjw8Bn4imGcKnbUyBJL89 + source: https://github.com/ipfs/archives/issues/23 + description: + size: 480MB + - title: XKCD + hash: /ipfs/Qmb8wsGZNXt5VXZh1pEmYynjB6Euqpq3HYyeAdw2vScTkQ + website: https://ipfs.io/ipfs/Qmb8wsGZNXt5VXZh1pEmYynjB6Euqpq3HYyeAdw2vScTkQ + source: https://github.com/ipfs/archives/issues/21 + description: + size: 122MB diff --git a/scripts/dev.js b/scripts/dev.js index 0358e65..e91c99c 100644 --- a/scripts/dev.js +++ b/scripts/dev.js @@ -46,7 +46,8 @@ async function run () { autoIndex: true }) - http.createServer(ecstatic).listen(8080) + const port = process.env.PORT || 8080 + http.createServer(ecstatic).listen(port) const watcher = chokidar.watch([dataFolder, srcFolder], { ignored: (string) => string.indexOf('src/content') !== -1 || @@ -62,7 +63,7 @@ async function run () { }) watcher - .on('ready', () => console.log('Listening on :8080')) + .on('ready', () => console.log('Listening on :' + port)) .on('add', handler) .on('change', handler) .on('unlink', handler) diff --git a/src/layouts/_default/baseof.html b/src/layouts/_default/baseof.html index 93f0f20..25efc3a 100644 --- a/src/layouts/_default/baseof.html +++ b/src/layouts/_default/baseof.html @@ -17,7 +17,7 @@ {{ $color := (index $site.Data.categories $name).color }} {{ $icon := print (index $site.Data.categories $name).icon ".svg" }} + class="flex-grow-1 flex items-center justify-center white no-underline pa2 bg-animate dib bg-{{ $color }}-muted hover-bg-{{ $color }}"> {{ partial (print "icons/" $icon ) }} {{ $name }} diff --git a/src/layouts/partials/list.html b/src/layouts/partials/list.html index 5324c9d..4c90b34 100644 --- a/src/layouts/partials/list.html +++ b/src/layouts/partials/list.html @@ -37,6 +37,18 @@ {{ template "text" .Params.description }} {{- end -}} + {{- if isset .Params "size" -}} + {{ template "text" (print "Size: " .Params.size) }} + {{- end -}} + + {{- if isset .Params "hash" -}} +
+ + {{ .Params.hash }} + +
+ {{- end -}} + {{- if isset .Params "picture" -}}