From 34d654455d5b84c4546531450038f29a3041a926 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Tue, 17 Jul 2018 14:55:34 +0100 Subject: [PATCH] add icons to navbar --- .gitignore | 2 ++ data/apps.yaml | 1 + data/articles.yaml | 1 + data/tools.yaml | 1 + data/videos.yaml | 1 + package.json | 1 + scripts/dev.js | 10 ++++++++-- src/css/app.css | 4 ++++ src/layouts/_default/baseof.html | 4 +++- 9 files changed, 22 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index aa09d5f..d53963e 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,8 @@ yarn-debug.log* yarn-error.log* yarn.lock +glyph*.svg +stroke*.svg public dist /src/resources diff --git a/data/apps.yaml b/data/apps.yaml index df931a6..2a0bb99 100644 --- a/data/apps.yaml +++ b/data/apps.yaml @@ -1,5 +1,6 @@ title: Apps color: aqua +icon: stroke_marketing description: Applications built with IPFS or with functionality that uses IPFS. content: - title: akasha diff --git a/data/articles.yaml b/data/articles.yaml index 3366c05..69a31c0 100644 --- a/data/articles.yaml +++ b/data/articles.yaml @@ -1,5 +1,6 @@ title: Articles color: navy +icon: stroke_pencil description: Articles about the decentralized web and IPFS. content: - title: Decentralized & Distributed Edge Computing Comes to Computes.io diff --git a/data/tools.yaml b/data/tools.yaml index e83ca4a..9f6add4 100644 --- a/data/tools.yaml +++ b/data/tools.yaml @@ -1,5 +1,6 @@ title: Tools color: yellow +icon: stroke_code description: Tools built on the top of IPFS. content: - title: cachewarmer diff --git a/data/videos.yaml b/data/videos.yaml index 70d9585..5c81aad 100644 --- a/data/videos.yaml +++ b/data/videos.yaml @@ -1,6 +1,7 @@ title: Videos color: red description: Videos about IPFS. +icon: stroke_speaker content: - title: IPFS Alpha - Why we must redistribute the web website: https://www.youtube.com/watch?v=skMTdSEaCtA diff --git a/package.json b/package.json index af9a69e..4de646d 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "build": "run-s build:*", "build:readme": "node ./scripts/make-readme.js", "build:fonts": "shx mkdir -p src/static/fonts && shx cp node_modules/ipfs-css/fonts/* src/static/fonts", + "build:icons": "shx cp node_modules/ipfs-css/icons/* src/layouts/partials/icons", "build:css": "postcss --no-map --use postcss-import cssnano -o src/static/app.css src/css/*.css", "build:js": "browserify -g uglifyify src/js/app.js -o src/static/app.js", "build:data": "node ./scripts/make-data.js", diff --git a/scripts/dev.js b/scripts/dev.js index ba172b0..e18062e 100644 --- a/scripts/dev.js +++ b/scripts/dev.js @@ -7,7 +7,13 @@ const cssPath = path.join(__dirname, '../src/css') const jsPath = path.join(__dirname, '../src/js') const http = require('http') -const runHugo = () => runAll(['build:hugo']) +const runHugo = () => { + console.log('Rebuilding...') + return runAll(['build:hugo'], { + stdout: process.stdout, + stderr: process.stderr + }).then(() => console.log('Done!')).catch(console.log) +} const handler = (path) => { if (path.startsWith(dataFolder)) { @@ -23,7 +29,7 @@ const handler = (path) => { async function run () { console.log('Preparing fonts, css, js and data...') - await runAll(['build:fonts', 'build:css', 'build:js', 'build:data'], {parallel: true}) + await runAll(['build:fonts', 'build:css', 'build:js', 'build:css', 'build:data'], {parallel: true}) console.log('Running Hugo once...') await runHugo() diff --git a/src/css/app.css b/src/css/app.css index 3b9c204..7fdd1c6 100644 --- a/src/css/app.css +++ b/src/css/app.css @@ -33,3 +33,7 @@ body { .fill-blue { fill: #357edd; } + +.fill-white { + fill: white; +} diff --git a/src/layouts/_default/baseof.html b/src/layouts/_default/baseof.html index 4cdcbdc..796efc0 100644 --- a/src/layouts/_default/baseof.html +++ b/src/layouts/_default/baseof.html @@ -7,7 +7,7 @@