From 976dcb7e4fb81ebd3d2431363d0f5f32903ce641 Mon Sep 17 00:00:00 2001 From: Felix Labrecque Date: Tue, 7 Jul 2020 21:39:19 -0400 Subject: [PATCH 1/4] Allow to override the external dependencies. --- src/DashboardServiceProvider.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DashboardServiceProvider.php b/src/DashboardServiceProvider.php index eedcdcb..9e60e4b 100644 --- a/src/DashboardServiceProvider.php +++ b/src/DashboardServiceProvider.php @@ -15,8 +15,8 @@ class DashboardServiceProvider extends ServiceProvider public function boot() { $this->app->make(Dashboard::class) - ->script('https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.min.js') - ->stylesheet('https://rsms.me/inter/inter.css') + ->script(config('dashboard.scripts.alpinejs', 'https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.min.js')) + ->stylesheet(config('dashboard.stylesheets.inter', 'https://rsms.me/inter/inter.css')) ->inlineStylesheet(file_get_contents(__DIR__.'/../resources/dist/dashboard.min.css')); $this->loadViewsFrom(__DIR__ . '/../resources/views', 'dashboard'); From 674ad39e3f37ab23e1aa8de552288ac6e4b72581 Mon Sep 17 00:00:00 2001 From: Felix Labrecque Date: Wed, 8 Jul 2020 03:38:19 -0400 Subject: [PATCH 2/4] Add entries in config file. --- config/dashboard.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/config/dashboard.php b/config/dashboard.php index 32a2531..31a39ae 100644 --- a/config/dashboard.php +++ b/config/dashboard.php @@ -19,4 +19,18 @@ 'lat' => 51.260197, 'lng' => 4.402771, ], + + /** + * External script libraries + */ + 'scripts' => [ + 'alpinejs' => 'https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.min.js', + ], + + /** + * External css libraries + */ + 'stylesheets' => [ + 'inter' => 'https://rsms.me/inter/inter.css' + ], ]; From 4309fcd9ba62ca00ad4d073bdfc1806517cb0a36 Mon Sep 17 00:00:00 2001 From: Felix Labrecque Date: Wed, 8 Jul 2020 04:41:22 -0400 Subject: [PATCH 3/4] Removing default values. --- src/DashboardServiceProvider.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DashboardServiceProvider.php b/src/DashboardServiceProvider.php index 9e60e4b..e3f7cd7 100644 --- a/src/DashboardServiceProvider.php +++ b/src/DashboardServiceProvider.php @@ -15,8 +15,8 @@ class DashboardServiceProvider extends ServiceProvider public function boot() { $this->app->make(Dashboard::class) - ->script(config('dashboard.scripts.alpinejs', 'https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.min.js')) - ->stylesheet(config('dashboard.stylesheets.inter', 'https://rsms.me/inter/inter.css')) + ->script(config('dashboard.scripts.alpinejs')) + ->stylesheet(config('dashboard.stylesheets.inter')) ->inlineStylesheet(file_get_contents(__DIR__.'/../resources/dist/dashboard.min.css')); $this->loadViewsFrom(__DIR__ . '/../resources/views', 'dashboard'); From e1af260569be4faa3bf660c62551af72fc7f961a Mon Sep 17 00:00:00 2001 From: Freek Van der Herten Date: Wed, 8 Jul 2020 10:48:49 +0200 Subject: [PATCH 4/4] Update dashboard.php --- config/dashboard.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config/dashboard.php b/config/dashboard.php index 31a39ae..cd935b7 100644 --- a/config/dashboard.php +++ b/config/dashboard.php @@ -13,22 +13,22 @@ /* * When the dashboard uses the `auto` theme, these coordinates will be used - * to determine whether the sun is up or down + * to determine whether the sun is up or down. */ 'auto_theme_location' => [ 'lat' => 51.260197, 'lng' => 4.402771, ], - /** - * External script libraries + /* + * These scripts will be loaded when the dashboard is displayed. */ 'scripts' => [ 'alpinejs' => 'https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.min.js', ], - /** - * External css libraries + /* + * These stylesheets will be loaded when the dashboard is displayed. */ 'stylesheets' => [ 'inter' => 'https://rsms.me/inter/inter.css'