Skip to content

Commit

Permalink
Merge pull request #41 from woodspire/feature/override-external-depen…
Browse files Browse the repository at this point in the history
…dencies

Allow to override the external dependencies.
  • Loading branch information
freekmurze authored Jul 8, 2020
2 parents bb615a9 + e1af260 commit 56b2685
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
16 changes: 15 additions & 1 deletion config/dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,24 @@

/*
* 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,
],

/*
* These scripts will be loaded when the dashboard is displayed.
*/
'scripts' => [
'alpinejs' => 'https://cdn.jsdelivr.net/gh/alpinejs/[email protected]/dist/alpine.min.js',
],

/*
* These stylesheets will be loaded when the dashboard is displayed.
*/
'stylesheets' => [
'inter' => 'https://rsms.me/inter/inter.css'
],
];
4 changes: 2 additions & 2 deletions src/DashboardServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ class DashboardServiceProvider extends ServiceProvider
public function boot()
{
$this->app->make(Dashboard::class)
->script('https://cdn.jsdelivr.net/gh/alpinejs/[email protected]/dist/alpine.min.js')
->stylesheet('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');
Expand Down

0 comments on commit 56b2685

Please sign in to comment.