diff --git a/src/css/default.scss b/src/css/default.scss index 9c21df7597aa715fa22d0563aef62e9c1aadc1f3..3a4bcd829f2b17c9e5915f203903a281f327163f 100644 --- a/src/css/default.scss +++ b/src/css/default.scss @@ -212,7 +212,7 @@ appears on the left side of the page. right: 0; bottom: 0; z-index: 1000; /* so the menu or its navicon stays above all content */ - background: #E8410C; + background: $secondaryBackground; overflow-y: auto; -webkit-overflow-scrolling: touch; } @@ -240,7 +240,7 @@ Add that light border to separate items into groups. */ #menu .pure-menu ul, #menu .pure-menu .menu-item-divided { - border-top: 1px solid #db0100; + border-top: 1px solid $transitionBackground; } /* @@ -248,7 +248,7 @@ Change color of the anchor links on hover/focus. */ #menu .pure-menu li a:hover, #menu .pure-menu li a:focus { - background: #db0100; + background: $transitionBackground; } /* @@ -349,7 +349,7 @@ HEADER #header { height: 6rem; background-color: darkred; - background: linear-gradient(141deg, #b8002c 0%, #db0100 51%, #e8410c 75%) + background: linear-gradient(141deg, $primaryBackground 0%, $transitionBackground 51%, $secondaryBackground 75%) } .logo-header { @@ -463,7 +463,7 @@ FOOTER #footer { background-color: darkred; - background: linear-gradient(141deg, #b8002c 0%, #db0100 51%, #e8410c 75%); + background: linear-gradient(141deg, $primaryBackground 0%, $transitionBackground 51%, $secondaryBackground 75%); height: 4rem; padding: 2rem 0 0; text-align: center; diff --git a/webpack.config.js b/webpack.config.js index 539001ce7370f6d858eea9a64d6f4633da76c7e2..443d806ee5579842491cd497fb79d9422d8f753e 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -10,66 +10,75 @@ const localConfig = { js_filename: 'js/[name].js' }; -module.exports = { - entry: { - bundle: './src/js/bundle', - stylesheet: './src/js/style' - }, - output: { - path: path.resolve(buildDir), - filename: localConfig['js_filename'] - }, - mode: 'production', - module: { - rules: [ - { - test: /\.js$/, - exclude: /\/node_modules\//, - use: { - loader: 'babel-loader' - } - }, - { - test: /\.scss$/, - use: ExtractTextPlugin.extract({ - fallback: 'style-loader', - use: [ - { - loader: 'css-loader', - options: { - url: false, - sourceMap: true - } - }, - { - loader: 'sass-loader', - options: { - indentedSyntax: false, - sourceMap: true +module.exports = environment => { + const env = typeof environment !== 'undefined' ? environment : {}; + const primaryBackground = env.hasOwnProperty('primaryBackground') ? env.primaryBackground : '#b8002c'; + const transitionBackground = env.hasOwnProperty('transitionBackground') ? env.transitionBackground : '#db0100'; + const secondaryBackground = env.hasOwnProperty('secondaryBackground') ? env.secondaryBackground : '#e8410c'; + return { + entry: { + bundle: './src/js/bundle', + stylesheet: './src/js/style' + }, + output: { + path: path.resolve(buildDir), + filename: localConfig['js_filename'] + }, + mode: 'production', + module: { + rules: [ + { + test: /\.js$/, + exclude: /\/node_modules\//, + use: { + loader: 'babel-loader' + } + }, + { + test: /\.scss$/, + use: ExtractTextPlugin.extract({ + fallback: 'style-loader', + use: [ + { + loader: 'css-loader', + options: { + url: false, + sourceMap: true + } + }, + { + loader: 'sass-loader', + options: { + indentedSyntax: false, + sourceMap: true, + data: "$primaryBackground: " + primaryBackground + '; ' + + "$transitionBackground: " + transitionBackground + "; " + + "$secondaryBackground: " + secondaryBackground + ";" + } } - } - ] - }) - } + ] + }) + } + ] + }, + devtool: 'source-map', + plugins: [ + // Provides jQuery for other JS bundled with Webpack + new webpack.ProvidePlugin({ + $: 'jquery', + jQuery: 'jquery' + }), + new ExtractTextPlugin({ + filename: localConfig['css_filename'], + ignoreOrder: true + }), + new CopyWebpackPlugin([ + { + from: path.resolve(__dirname + '/node_modules/font-awesome/fonts/*'), + to: 'fonts/', + flatten: true + } + ]) ] - }, - devtool: 'source-map', - plugins: [ - // Provides jQuery for other JS bundled with Webpack - new webpack.ProvidePlugin({ - $: 'jquery', - jQuery: 'jquery' - }), - new ExtractTextPlugin({ - filename: localConfig['css_filename'], - ignoreOrder: true - }), - new CopyWebpackPlugin([ - { - from: path.resolve(__dirname + '/node_modules/font-awesome/fonts/*'), - to: 'fonts/', - flatten: true - } - ]) - ] + } }; diff --git a/yarn.lock b/yarn.lock deleted file mode 100644 index 1cbf92fed61b4dd0485ad90bf63e12791efecf7e..0000000000000000000000000000000000000000 --- a/yarn.lock +++ /dev/null @@ -1,148 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -ansicolors@~0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.2.1.tgz#be089599097b74a5c9c4a84a0cdbcdb62bd87aef" - integrity sha1-vgiVmQl7dKXJxKhKDNvNtivYeu8= - -async@^2.6.0: - version "2.6.1" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.1.tgz#b245a23ca71930044ec53fa46aa00a3e87c6a610" - integrity sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ== - dependencies: - lodash "^4.17.10" - -cardinal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/cardinal/-/cardinal-1.0.0.tgz#50e21c1b0aa37729f9377def196b5a9cec932ee9" - integrity sha1-UOIcGwqjdyn5N33vGWtanOyTLuk= - dependencies: - ansicolors "~0.2.1" - redeyed "~1.0.0" - -clipboard@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/clipboard/-/clipboard-2.0.1.tgz#a12481e1c13d8a50f5f036b0560fe5d16d74e46a" - integrity sha512-7yhQBmtN+uYZmfRjjVjKa0dZdWuabzpSKGtyQZN+9C8xlC788SSJjOHWh7tzurfwTqTD5UDYAhIv5fRJg3sHjQ== - dependencies: - good-listener "^1.2.2" - select "^1.1.2" - tiny-emitter "^2.0.0" - -csv-parse@^2.0.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/csv-parse/-/csv-parse-2.5.0.tgz#65748997ecc3719c594622db1b9ea0e2eb7d56bb" - integrity sha512-4OcjOJQByI0YDU5COYw9HAqjo8/MOLLmT9EKyMCXUzgvh30vS1SlMK+Ho84IH5exN44cSnrYecw/7Zpu2m4lkA== - -delegate@^3.1.2: - version "3.2.0" - resolved "https://registry.yarnpkg.com/delegate/-/delegate-3.2.0.tgz#b66b71c3158522e8ab5744f720d8ca0c2af59166" - integrity sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw== - -esprima@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.0.0.tgz#53cf247acda77313e551c3aa2e73342d3fb4f7d9" - integrity sha1-U88kes2ncxPlUcOqLnM0LT+099k= - -font-awesome@^4.7.0: - version "4.7.0" - resolved "https://registry.yarnpkg.com/font-awesome/-/font-awesome-4.7.0.tgz#8fa8cf0411a1a31afd07b06d2902bb9fc815a133" - integrity sha1-j6jPBBGhoxr9B7BtKQK7n8gVoTM= - -good-listener@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/good-listener/-/good-listener-1.2.2.tgz#d53b30cdf9313dffb7dc9a0d477096aa6d145c50" - integrity sha1-1TswzfkxPf+33JoNR3CWqm0UXFA= - dependencies: - delegate "^3.1.2" - -humanize@^0.0.9: - version "0.0.9" - resolved "https://registry.yarnpkg.com/humanize/-/humanize-0.0.9.tgz#1994ffaecdfe9c441ed2bdac7452b7bb4c9e41a4" - integrity sha1-GZT/rs3+nEQe0r2sdFK3u0yeQaQ= - -jquery-ui@^1.12.1: - version "1.12.1" - resolved "https://registry.yarnpkg.com/jquery-ui/-/jquery-ui-1.12.1.tgz#bcb4045c8dd0539c134bc1488cdd3e768a7a9e51" - integrity sha1-vLQEXI3QU5wTS8FIjN0+dop6nlE= - -jquery@^3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.3.1.tgz#958ce29e81c9790f31be7792df5d4d95fc57fbca" - integrity sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg== - -lodash@^4.17.10: - version "4.17.11" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" - integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== - -microplugin@0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/microplugin/-/microplugin-0.0.3.tgz#1fc2e1bb7c9e19e82bd84bba9137bbe71250d8cd" - integrity sha1-H8Lhu3yeGegr2Eu6kTe75xJQ2M0= - -minimist@~0.0.1: - version "0.0.10" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" - integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= - -nan@2.9.x: - version "2.9.2" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.9.2.tgz#f564d75f5f8f36a6d9456cca7a6c4fe488ab7866" - integrity sha512-ltW65co7f3PQWBDbqVvaU1WtFJUsNW7sWWm4HINhbMQIyVyzIeyZ8toX5TC5eeooE6piZoaEh4cZkueSKG3KYw== - -optimist@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" - integrity sha1-2j6nRob6IaGaERwybpDrFaAZZoY= - dependencies: - minimist "~0.0.1" - wordwrap "~0.0.2" - -purecss@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/purecss/-/purecss-1.0.0.tgz#3dbcd9e2a7592448a69acb705cce16311bf4b785" - integrity sha512-gfC78WCOWNnfkzulx9aoWwcl+0JflhwKeJ+k9s/ZyIawfYNA4bqBmt0DtfgtQK9iuYMtGfbdE8R2AQMjSWR2VQ== - -redeyed@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/redeyed/-/redeyed-1.0.1.tgz#e96c193b40c0816b00aec842698e61185e55498a" - integrity sha1-6WwZO0DAgWsArshCaY5hGF5VSYo= - dependencies: - esprima "~3.0.0" - -select@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/select/-/select-1.1.2.tgz#0e7350acdec80b1108528786ec1d4418d11b396d" - integrity sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0= - -selectize@^0.12.6: - version "0.12.6" - resolved "https://registry.yarnpkg.com/selectize/-/selectize-0.12.6.tgz#c2cf08cbaa4cb06c5e99bb452919d71b080690d6" - integrity sha512-bWO5A7G+I8+QXyjLfQUgh31VI4WKYagUZQxAXlDyUmDDNrFxrASV0W9hxCOl0XJ/XQ1dZEu3G9HjXV4Wj0yb6w== - dependencies: - microplugin "0.0.3" - sifter "^0.5.1" - -sifter@^0.5.1: - version "0.5.3" - resolved "https://registry.yarnpkg.com/sifter/-/sifter-0.5.3.tgz#5e6507fe8c114b2b28d90b6bf4e5b636e611e48b" - integrity sha1-XmUH/owRSyso2Qtr9OW2NuYR5Is= - dependencies: - async "^2.6.0" - cardinal "^1.0.0" - csv-parse "^2.0.0" - humanize "^0.0.9" - optimist "^0.6.1" - -tiny-emitter@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/tiny-emitter/-/tiny-emitter-2.0.2.tgz#82d27468aca5ade8e5fd1e6d22b57dd43ebdfb7c" - integrity sha512-2NM0auVBGft5tee/OxP4PI3d8WItkDM+fPnaRAVo6xTDI2knbz9eC5ArWGqtGlYqiH3RU5yMpdyTTO7MguC4ow== - -wordwrap@~0.0.2: - version "0.0.3" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" - integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc=