From 8b8d1a7cf709341b4b254be6e10109bc23000261 Mon Sep 17 00:00:00 2001 From: Niklas Natter Date: Tue, 29 Sep 2020 13:40:53 +0200 Subject: [PATCH] Overwrite background color of login box --- assets/admin/postcss.config.js | 2 ++ assets/admin/style-overwrites/login.scss | 7 +++++++ assets/admin/webpack.config.js | 6 ++++++ 3 files changed, 15 insertions(+) create mode 100644 assets/admin/postcss.config.js create mode 100644 assets/admin/style-overwrites/login.scss diff --git a/assets/admin/postcss.config.js b/assets/admin/postcss.config.js new file mode 100644 index 00000000..20e3d191 --- /dev/null +++ b/assets/admin/postcss.config.js @@ -0,0 +1,2 @@ +/* reuse the postcss configuration included in sulu */ +module.exports = require('../../vendor/sulu/sulu/postcss.config.js'); diff --git a/assets/admin/style-overwrites/login.scss b/assets/admin/style-overwrites/login.scss new file mode 100644 index 00000000..bbf106c4 --- /dev/null +++ b/assets/admin/style-overwrites/login.scss @@ -0,0 +1,7 @@ +/* import original stylesheet to keep original styling */ +@import 'sulu-admin-bundle/containers/Login/login.scss'; + +/* overwrite style for specific elements */ +.login-container { + background-color: lightpink; +} diff --git a/assets/admin/webpack.config.js b/assets/admin/webpack.config.js index ba5d5eae..859655c6 100644 --- a/assets/admin/webpack.config.js +++ b/assets/admin/webpack.config.js @@ -14,5 +14,11 @@ module.exports = (env, argv) => { const config = webpackConfig(env, argv); config.entry = path.resolve(__dirname, 'index.js'); + const suluPath = path.resolve(__dirname, '../../vendor/sulu/sulu/'); + const loginScssPath = path.resolve(suluPath, 'src/Sulu/Bundle/AdminBundle/Resources/js/containers/Login/login.scss'); + + /* overwrite stylesheet of sulu login component with custom stylesheet of project */ + config.resolve.alias[loginScssPath] = path.resolve(__dirname, 'style-overwrites/login.scss'); + return config; };