Skip to content

Commit 165651e

Browse files
authored
Merge pull request #5510 from Laravel-Backpack/fix-default-ui-dashboard
add content_class and heading_class to jumbotron
2 parents acaf4d3 + 90a40fb commit 165651e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/resources/views/ui/dashboard.blade.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
$widgets['before_content'][] = [
1111
'type' => 'jumbotron',
1212
'heading' => trans('backpack::base.welcome'),
13+
'heading_class' => 'display-3 '.(backpack_theme_config('layout') === 'horizontal_overlap' ? ' text-white' : ''),
1314
'content' => trans('backpack::base.use_sidebar'),
15+
'content_class' => backpack_theme_config('layout') === 'horizontal_overlap' ? 'text-white' : '',
1416
'button_link' => backpack_url('logout'),
1517
'button_text' => trans('backpack::base.logout'),
1618
];

src/resources/views/ui/widgets/jumbotron.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
@endphp
77

88
@includeWhen(!empty($widget['wrapper']), backpack_view('widgets.inc.wrapper_start'))
9-
<div class="jumbotron mb-2">
9+
<div class="jumbotron mb-2 ">
1010

1111
@if (isset($widget['heading']))
12-
<h1 class="display-3">{!! $widget['heading'] !!}</h1>
12+
<h1 class="{{ $widget['heading_class'] ?? 'display-3'}}">{!! $widget['heading'] !!}</h1>
1313
@endif
1414

1515
@if (isset($widget['content']))
16-
<p>{!! $widget['content'] !!}</p>
16+
<p class="{{ $widget['content_class'] ?? ''}}">{!! $widget['content'] !!}</p>
1717
@endif
1818

1919
@if (isset($widget['button_link']))

0 commit comments

Comments
 (0)