From a9d625be42d0b96fd3561d5bedaadb7f9cd5196c Mon Sep 17 00:00:00 2001 From: Michal Vanko Date: Sun, 29 Dec 2019 23:30:56 +0100 Subject: [PATCH] Add footer contact links --- package-lock.json | 32 ++- package.json | 1 + rollup.config.js | 195 ++++++++++-------- src/components/Footer.svelte | 150 ++++++++++++++ src/routes/_layout.svelte | 28 +-- .../iconfinder_343_Twitch_logo_4375116.svg | 1 + src/svg/iconfinder_38-instagram_1161953.svg | 14 ++ src/svg/iconfinder_Twitter_4070150.svg | 1 + src/svg/iconfinder_github_2561442.svg | 1 + src/svg/iconfinder_mail_5474819.svg | 1 + src/svg/iconfinder_twitch_306173.svg | 1 + ..._twitch_tv_gaming_stream_gamer_5340289.svg | 1 + src/svg/social-1_logo-github.svg | 12 ++ src/svg/social-1_logo-instagram.svg | 10 + src/svg/social-1_logo-twitter.svg | 11 + static/global.css | 1 + 16 files changed, 350 insertions(+), 110 deletions(-) create mode 100644 src/components/Footer.svelte create mode 100644 src/svg/iconfinder_343_Twitch_logo_4375116.svg create mode 100644 src/svg/iconfinder_38-instagram_1161953.svg create mode 100644 src/svg/iconfinder_Twitter_4070150.svg create mode 100644 src/svg/iconfinder_github_2561442.svg create mode 100644 src/svg/iconfinder_mail_5474819.svg create mode 100644 src/svg/iconfinder_twitch_306173.svg create mode 100644 src/svg/iconfinder_twitch_tv_gaming_stream_gamer_5340289.svg create mode 100644 src/svg/social-1_logo-github.svg create mode 100644 src/svg/social-1_logo-instagram.svg create mode 100644 src/svg/social-1_logo-twitter.svg diff --git a/package-lock.json b/package-lock.json index d54ecf5..b021b40 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1288,14 +1288,12 @@ "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1419,8 +1417,7 @@ "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "convert-source-map": { "version": "1.7.0", @@ -1851,7 +1848,6 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, "requires": { "brace-expansion": "^1.1.7" } @@ -2195,6 +2191,30 @@ "sourcemap-codec": "^1.4.4" } }, + "rollup-plugin-svg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-svg/-/rollup-plugin-svg-2.0.0.tgz", + "integrity": "sha512-DmE7dSQHo1SC5L2uH2qul3Mjyd5oV6U1aVVkyvTLX/mUsRink7f1b1zaIm+32GEBA6EHu8H/JJi3DdWqM53ySQ==", + "requires": { + "rollup-pluginutils": "^1.3.1" + }, + "dependencies": { + "estree-walker": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.2.1.tgz", + "integrity": "sha1-va/oCVOD2EFNXcLs9MkXO225QS4=" + }, + "rollup-pluginutils": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz", + "integrity": "sha1-HhVud4+UtyVb+hs9AXi+j1xVJAg=", + "requires": { + "estree-walker": "^0.2.1", + "minimatch": "^3.0.2" + } + } + } + }, "rollup-plugin-terser": { "version": "5.1.3", "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-5.1.3.tgz", diff --git a/package.json b/package.json index d8f19ba..b826782 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "marked": "^0.8.0", "polka": "^0.5.2", "ramda": "^0.26.1", + "rollup-plugin-svg": "^2.0.0", "sirv": "^0.4.2" }, "devDependencies": { diff --git a/rollup.config.js b/rollup.config.js index ac0b39b..d147185 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,101 +1,116 @@ -import resolve from 'rollup-plugin-node-resolve'; -import replace from 'rollup-plugin-replace'; -import commonjs from 'rollup-plugin-commonjs'; -import svelte from 'rollup-plugin-svelte'; -import babel from 'rollup-plugin-babel'; -import { terser } from 'rollup-plugin-terser'; -import config from 'sapper/config/rollup.js'; -import pkg from './package.json'; +import resolve from 'rollup-plugin-node-resolve' +import replace from 'rollup-plugin-replace' +import commonjs from 'rollup-plugin-commonjs' +import svelte from 'rollup-plugin-svelte' +import babel from 'rollup-plugin-babel' +import { terser } from 'rollup-plugin-terser' +import config from 'sapper/config/rollup.js' +import pkg from './package.json' +import svg from 'rollup-plugin-svg' -const mode = process.env.NODE_ENV; -const dev = mode === 'development'; -const legacy = !!process.env.SAPPER_LEGACY_BUILD; +const mode = process.env.NODE_ENV +const dev = mode === 'development' +const legacy = !!process.env.SAPPER_LEGACY_BUILD -const onwarn = (warning, onwarn) => (warning.code === 'CIRCULAR_DEPENDENCY' && /[/\\]@sapper[/\\]/.test(warning.message)) || onwarn(warning); -const dedupe = importee => importee === 'svelte' || importee.startsWith('svelte/'); +const onwarn = (warning, onwarn) => + (warning.code === 'CIRCULAR_DEPENDENCY' && + /[/\\]@sapper[/\\]/.test(warning.message)) || + onwarn(warning) +const dedupe = importee => + importee === 'svelte' || importee.startsWith('svelte/') export default { - client: { - input: config.client.input(), - output: config.client.output(), - plugins: [ - replace({ - 'process.browser': true, - 'process.env.NODE_ENV': JSON.stringify(mode) - }), - svelte({ - dev, - hydratable: true, - emitCss: true - }), - resolve({ - browser: true, - dedupe - }), - commonjs(), + client: { + input: config.client.input(), + output: config.client.output(), + plugins: [ + replace({ + 'process.browser': true, + 'process.env.NODE_ENV': JSON.stringify(mode), + }), + svelte({ + dev, + hydratable: true, + emitCss: true, + }), + resolve({ + browser: true, + dedupe, + }), + commonjs(), - legacy && babel({ - extensions: ['.js', '.mjs', '.html', '.svelte'], - runtimeHelpers: true, - exclude: ['node_modules/@babel/**'], - presets: [ - ['@babel/preset-env', { - targets: '> 0.25%, not dead' - }] - ], - plugins: [ - '@babel/plugin-syntax-dynamic-import', - ['@babel/plugin-transform-runtime', { - useESModules: true - }] - ] - }), + legacy && + babel({ + extensions: ['.js', '.mjs', '.html', '.svelte'], + runtimeHelpers: true, + exclude: ['node_modules/@babel/**'], + presets: [ + [ + '@babel/preset-env', + { + targets: '> 0.25%, not dead', + }, + ], + ], + plugins: [ + '@babel/plugin-syntax-dynamic-import', + [ + '@babel/plugin-transform-runtime', + { + useESModules: true, + }, + ], + ], + }), - !dev && terser({ - module: true - }) - ], + !dev && + terser({ + module: true, + }), + svg(), + ], - onwarn, - }, + onwarn, + }, - server: { - input: config.server.input(), - output: config.server.output(), - plugins: [ - replace({ - 'process.browser': false, - 'process.env.NODE_ENV': JSON.stringify(mode) - }), - svelte({ - generate: 'ssr', - dev - }), - resolve({ - dedupe - }), - commonjs() - ], - external: Object.keys(pkg.dependencies).concat( - require('module').builtinModules || Object.keys(process.binding('natives')) - ), + server: { + input: config.server.input(), + output: config.server.output(), + plugins: [ + replace({ + 'process.browser': false, + 'process.env.NODE_ENV': JSON.stringify(mode), + }), + svelte({ + generate: 'ssr', + dev, + }), + resolve({ + dedupe, + }), + commonjs(), + ], + external: Object.keys(pkg.dependencies).concat( + require('module').builtinModules || + Object.keys(process.binding('natives')) + ), - onwarn, - }, + onwarn, + }, - serviceworker: { - input: config.serviceworker.input(), - output: config.serviceworker.output(), - plugins: [ - resolve(), - replace({ - 'process.browser': true, - 'process.env.NODE_ENV': JSON.stringify(mode) - }), - commonjs(), - !dev && terser() - ], + serviceworker: { + input: config.serviceworker.input(), + output: config.serviceworker.output(), + plugins: [ + resolve(), + replace({ + 'process.browser': true, + 'process.env.NODE_ENV': JSON.stringify(mode), + }), + commonjs(), + !dev && terser(), + ], - onwarn, - } -}; + onwarn, + }, +} diff --git a/src/components/Footer.svelte b/src/components/Footer.svelte new file mode 100644 index 0000000..827b1e8 --- /dev/null +++ b/src/components/Footer.svelte @@ -0,0 +1,150 @@ + + + + + diff --git a/src/routes/_layout.svelte b/src/routes/_layout.svelte index 899e069..94dcd29 100644 --- a/src/routes/_layout.svelte +++ b/src/routes/_layout.svelte @@ -1,28 +1,28 @@
-
diff --git a/src/svg/iconfinder_343_Twitch_logo_4375116.svg b/src/svg/iconfinder_343_Twitch_logo_4375116.svg new file mode 100644 index 0000000..dd2491f --- /dev/null +++ b/src/svg/iconfinder_343_Twitch_logo_4375116.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/svg/iconfinder_38-instagram_1161953.svg b/src/svg/iconfinder_38-instagram_1161953.svg new file mode 100644 index 0000000..6f438be --- /dev/null +++ b/src/svg/iconfinder_38-instagram_1161953.svg @@ -0,0 +1,14 @@ + + + + + + + + + diff --git a/src/svg/iconfinder_Twitter_4070150.svg b/src/svg/iconfinder_Twitter_4070150.svg new file mode 100644 index 0000000..85d1374 --- /dev/null +++ b/src/svg/iconfinder_Twitter_4070150.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/svg/iconfinder_github_2561442.svg b/src/svg/iconfinder_github_2561442.svg new file mode 100644 index 0000000..f7a8110 --- /dev/null +++ b/src/svg/iconfinder_github_2561442.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/svg/iconfinder_mail_5474819.svg b/src/svg/iconfinder_mail_5474819.svg new file mode 100644 index 0000000..d5b16ed --- /dev/null +++ b/src/svg/iconfinder_mail_5474819.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/svg/iconfinder_twitch_306173.svg b/src/svg/iconfinder_twitch_306173.svg new file mode 100644 index 0000000..8b93233 --- /dev/null +++ b/src/svg/iconfinder_twitch_306173.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/svg/iconfinder_twitch_tv_gaming_stream_gamer_5340289.svg b/src/svg/iconfinder_twitch_tv_gaming_stream_gamer_5340289.svg new file mode 100644 index 0000000..f4f4f69 --- /dev/null +++ b/src/svg/iconfinder_twitch_tv_gaming_stream_gamer_5340289.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/svg/social-1_logo-github.svg b/src/svg/social-1_logo-github.svg new file mode 100644 index 0000000..ccbb190 --- /dev/null +++ b/src/svg/social-1_logo-github.svg @@ -0,0 +1,12 @@ + + + + + + diff --git a/src/svg/social-1_logo-instagram.svg b/src/svg/social-1_logo-instagram.svg new file mode 100644 index 0000000..02d6f6a --- /dev/null +++ b/src/svg/social-1_logo-instagram.svg @@ -0,0 +1,10 @@ + + + + + + diff --git a/src/svg/social-1_logo-twitter.svg b/src/svg/social-1_logo-twitter.svg new file mode 100644 index 0000000..f4af63c --- /dev/null +++ b/src/svg/social-1_logo-twitter.svg @@ -0,0 +1,11 @@ + + + + + + diff --git a/static/global.css b/static/global.css index cb52624..6d03546 100644 --- a/static/global.css +++ b/static/global.css @@ -10,6 +10,7 @@ body { line-height: 1.5; color: #42436a; background: #f2f6f6; + min-height: 1vh; } h1,