diff --git a/src/config/laracrumbs.php b/src/config/laracrumbs.php index 0f6b999..1937ca4 100644 --- a/src/config/laracrumbs.php +++ b/src/config/laracrumbs.php @@ -20,4 +20,11 @@ // use absolute paths for routes 'absolute_paths' => true, + // view-related configurations + 'separator' => '->', + 'class_wrapper' => 'laracrumbs-bar', + 'class_item' => 'laracrumbs-section', + 'class_list' => 'laracrumb-list', + 'class_list_item' => 'laracrumb-list-item', + ]; diff --git a/src/resources/views/templates/basic-list.blade.php b/src/resources/views/templates/basic-list.blade.php index 1fde7dc..f616a40 100644 --- a/src/resources/views/templates/basic-list.blade.php +++ b/src/resources/views/templates/basic-list.blade.php @@ -1,7 +1,7 @@ @php ($listTag = empty($isOrdered) ? 'ul' : 'ol') -<{{ $listTag }} class="{{ $listClass or 'laracrumbList' }}"> +<{{ $listTag }} class="{{ config('laracrumbs.class_list') }}"> @foreach($laracrumb->collectCrumbs() as $crumb) -
  • +
  • @include('laracrumbs::templates.basic', [ 'crumb' => $crumb, 'linkAttr' => !empty($settings) ? $settings : [] diff --git a/src/resources/views/templates/basic.blade.php b/src/resources/views/templates/basic.blade.php index 206616b..b5d15c1 100644 --- a/src/resources/views/templates/basic.blade.php +++ b/src/resources/views/templates/basic.blade.php @@ -3,5 +3,5 @@ 'crumb' => $crumb, 'linkAttr' => !empty($settings) ? $settings : [] ]) - @if (!$loop->last) {!! $separator or '>' !!} @endif + @if (!$loop->last) {!! config('laracrumbs.separator') !!} @endif @endforeach diff --git a/src/resources/views/templates/laracrumb.blade.php b/src/resources/views/templates/laracrumb.blade.php index 94ef95b..a4bf263 100644 --- a/src/resources/views/templates/laracrumb.blade.php +++ b/src/resources/views/templates/laracrumb.blade.php @@ -3,4 +3,3 @@ @else {{ $crumb->name() }} @endif - diff --git a/src/resources/views/templates/laracrumbs.blade.php b/src/resources/views/templates/laracrumbs.blade.php index d145c80..6ee054e 100644 --- a/src/resources/views/templates/laracrumbs.blade.php +++ b/src/resources/views/templates/laracrumbs.blade.php @@ -1,12 +1,12 @@ -
    +
    @foreach($laracrumb->collectCrumbs() as $crumb) - + @include('laracrumbs::templates.laracrumb', [ 'crumb' => $crumb, 'linkAttr' => !empty($settings) ? $settings : [] ]) @if (!$loop->last) - {!! $laracrumbSeparator or '>>' !!} + {!! config('laracrumbs.separator') !!} @endif @endforeach