Skip to content

Commit

Permalink
Merge pull request #16 from Kvaksrud/feature/mdb5-template
Browse files Browse the repository at this point in the history
New template for Bootstrap 5
  • Loading branch information
shengslogar authored Jan 25, 2021
2 parents 7a4db95 + 55f6e42 commit 0271785
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ Then, open `config/breadcrumbs.php` and edit this line:

The possible values are:

- `breadcrumbs::bootstrap5`[Bootstrap 5](https://getbootstrap.com/docs/5.0/components/breadcrumb/)
- `breadcrumbs::bootstrap4`[Bootstrap 4](https://getbootstrap.com/docs/4.0/components/breadcrumb/)
- `breadcrumbs::bootstrap3`[Bootstrap 3](https://getbootstrap.com/docs/3.4/components/#breadcrumbs)
- `breadcrumbs::bootstrap2`[Bootstrap 2](http://getbootstrap.com/2.3.2/components.html#breadcrumbs)
Expand Down
1 change: 1 addition & 0 deletions config/breadcrumbs.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
| Choose a view to display when Breadcrumbs::render() is called.
| Built in templates are:
|
| - 'breadcrumbs::bootstrap5' - Bootstrap 5
| - 'breadcrumbs::bootstrap4' - Bootstrap 4
| - 'breadcrumbs::bootstrap3' - Bootstrap 3
| - 'breadcrumbs::bootstrap2' - Bootstrap 2
Expand Down
17 changes: 17 additions & 0 deletions resources/views/bootstrap5.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@unless ($breadcrumbs->isEmpty())

<nav aria-label="breadcrumb">
<ol class="breadcrumb">
@foreach ($breadcrumbs as $breadcrumb)

@if ($breadcrumb->url && !$loop->last)
<li class="breadcrumb-item"><a href="{{ $breadcrumb->url }}">{{ $breadcrumb->title }}</a></li>
@else
<li class="breadcrumb-item active" aria-current="page">{{ $breadcrumb->title }}</li>
@endif

@endforeach
</ol>
</nav>

@endunless

0 comments on commit 0271785

Please sign in to comment.