From 4e9c0b9d45454dabd734e182f94adfd4e92adedb Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Tue, 7 Aug 2018 09:25:20 +0800 Subject: [PATCH] Fix style of home page --- resources/assets/src/stylus/{index.styl => home.styl} | 2 -- resources/views/common/dependencies/style.tpl | 4 ++++ resources/views/index.tpl | 2 +- webpack.config.js | 5 +++-- 4 files changed, 8 insertions(+), 5 deletions(-) rename resources/assets/src/stylus/{index.styl => home.styl} (99%) diff --git a/resources/assets/src/stylus/index.styl b/resources/assets/src/stylus/home.styl similarity index 99% rename from resources/assets/src/stylus/index.styl rename to resources/assets/src/stylus/home.styl index 727dfd51..f1a454c3 100644 --- a/resources/assets/src/stylus/index.styl +++ b/resources/assets/src/stylus/home.styl @@ -1,5 +1,3 @@ -@import "general.styl"; - body { font-size: 16px; } diff --git a/resources/views/common/dependencies/style.tpl b/resources/views/common/dependencies/style.tpl index 14f8168c..bb0980ed 100644 --- a/resources/views/common/dependencies/style.tpl +++ b/resources/views/common/dependencies/style.tpl @@ -3,6 +3,10 @@ +@if (isset($module)) + +@endif + {{-- Content added by plugins dynamically --}} diff --git a/resources/views/index.tpl b/resources/views/index.tpl index d04f1d11..00ec9b78 100644 --- a/resources/views/index.tpl +++ b/resources/views/index.tpl @@ -8,7 +8,7 @@ - @include('common.dependencies.style', ['module' => 'index']) + @include('common.dependencies.style', ['module' => 'home']) diff --git a/webpack.config.js b/webpack.config.js index da84d362..4502e0ce 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -20,7 +20,8 @@ module.exports = [{ 'toastr/build/toastr.min.css', 'sweetalert2/dist/sweetalert2.min.css', './resources/assets/src/stylus/common.styl', - ] + ], + home: './resources/assets/src/stylus/home.styl' }, output: { path: __dirname + '/public', @@ -65,7 +66,7 @@ module.exports = [{ ] }, { - test: /common\.styl$/, + test: /(common|home)\.styl$/, use: [ MiniCssExtractPlugin.loader, { loader: 'css-loader', options: { importLoaders: 3 } },