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 @@