-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add sidebar and header elements, update menu helper to BsUtils
- Loading branch information
Showing
16 changed files
with
763 additions
and
371 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,215 @@ | ||
<?php | ||
|
||
/** | ||
* @var \App\View\AppView $this | ||
*/ | ||
|
||
$navbar = [ | ||
'active' => [ | ||
'label' => __('Active'), | ||
'url' => '#', | ||
], | ||
[ | ||
'label' => __('Dropdown'), | ||
'url' => '#', | ||
'children' => [ | ||
[ | ||
'label' => __('Action'), | ||
'url' => '#', | ||
], | ||
[ | ||
'label' => __('Another action'), | ||
'url' => '#', | ||
], | ||
[ | ||
'label' => __('Something else here'), | ||
'url' => '#', | ||
], | ||
[ | ||
'type' => $this->Menu::ITEM_TYPE_DIVIDER, | ||
], | ||
[ | ||
'label' => __('Separated link'), | ||
'url' => '#', | ||
], | ||
], | ||
], | ||
[ | ||
'label' => __('Link'), | ||
'url' => '#', | ||
], | ||
[ | ||
'label' => __('Disabled'), | ||
'url' => '#', | ||
'type' => $this->Menu::ITEM_TYPE_DISABLED, | ||
], | ||
]; | ||
|
||
$this->Menu->activeItem('active'); | ||
|
||
?> | ||
|
||
<div class="card"> | ||
<div class="card-body"> | ||
<ul class="nav nav-tabs"> | ||
<li class="nav-item"> | ||
<a class="nav-link active" aria-current="page" href="#">Active</a> | ||
</li> | ||
<li class="nav-item dropdown"> | ||
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false">Dropdown</a> | ||
<ul class="dropdown-menu"> | ||
<li><a class="dropdown-item" href="#">Action</a></li> | ||
<li><a class="dropdown-item" href="#">Another action</a></li> | ||
<li><a class="dropdown-item" href="#">Something else here</a></li> | ||
<li> | ||
<hr class="dropdown-divider"> | ||
</li> | ||
<li><a class="dropdown-item" href="#">Separated link</a></li> | ||
</ul> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="#">Link</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link disabled" aria-disabled="true">Disabled</a> | ||
</li> | ||
</ul> | ||
</div> | ||
|
||
<div class="card-body"> | ||
<?= $this->Menu->render($navbar, ['menu.class' => 'nav']) ?> | ||
</div> | ||
|
||
<div class="card-body"> | ||
<?= $this->Menu->render($navbar, ['menu.class' => 'nav nav-pills']) ?> | ||
</div> | ||
<div class="card-body"> | ||
<?= $this->Menu->render($navbar, ['menu.class' => 'nav nav-tabs']) ?> | ||
</div> | ||
|
||
</div> | ||
|
||
|
||
<div class="card card-danger card-outline mb-4"> | ||
<!--begin::Header--> | ||
<div class="card-header"> | ||
<div class="card-title">MenuHelper</div> | ||
</div> | ||
<!--end::Header--> | ||
<!--begin::Body--> | ||
<div class="card-body"> | ||
<nav class="navbar navbar-expand-lg bg-body-tertiary"> | ||
<div class="container-fluid"> | ||
<a class="navbar-brand" href="#">Navbar</a> | ||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
<div class="collapse navbar-collapse" id="navbarSupportedContent"> | ||
<?= $this->Menu->render($navbar, ['menu.class' => 'navbar-nav me-auto mb-2 mb-lg-0']) ?> | ||
|
||
<?php | ||
|
||
/* | ||
<ul class="navbar-nav me-auto mb-2 mb-lg-0"> | ||
<li class="nav-item "><a href="#" class="nav-link ">Home</a></li> | ||
<li class="nav-item "><a href="#" class="nav-link ">Link</a></li> | ||
<li class="nav-item dropdown"><a href="#" class="nav-link dropdown-toggle" role="button" data-bs-toggle="dropdown" aria-expanded="false">Dropdown</a> | ||
<ul class="dropdown-menu"> | ||
<li><a href="#" class="dropdown-item ">Action</a></li> | ||
<li><a href="#" class="dropdown-item ">Another action</a></li> | ||
<li> | ||
<hr class="dropdown-divider"> | ||
</li> | ||
<li><a href="#" class="dropdown-item ">Something else here</a></li> | ||
</ul> | ||
</li> | ||
<li class="nav-item"><a class="nav-link disabled" aria-disabled="true">Disabled</a></li> | ||
</ul> | ||
*/ | ||
|
||
|
||
/* | ||
<ul class="navbar-nav me-auto mb-2 mb-lg-0"> | ||
<li class="nav-item"> | ||
<a class="nav-link active" aria-current="page" href="#">Home</a> | ||
</li> | ||
<li class="nav-item"><a class="nav-link" href="#">Link</a></li> | ||
<li class="nav-item dropdown"> | ||
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false"> | ||
Dropdown | ||
</a> | ||
<ul class="dropdown-menu"> | ||
<li><a class="dropdown-item" href="#">Action</a></li> | ||
<li><a class="dropdown-item" href="#">Another action</a></li> | ||
<li> | ||
<hr class="dropdown-divider"> | ||
</li> | ||
<li><a class="dropdown-item" href="#">Something else here</a></li> | ||
</ul> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link disabled" aria-disabled="true">Disabled</a> | ||
</li> | ||
</ul> | ||
*/ ?> | ||
|
||
<form class="d-flex" role="search"> | ||
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search" data-sharkid="__6"> | ||
<button class="btn btn-outline-success" type="submit">Search</button> | ||
</form> | ||
</div> | ||
</div> | ||
</nav> | ||
</div> | ||
<!--end::Body--> | ||
</div> | ||
|
||
|
||
|
||
<div class="card card-danger card-outline mb-4"> | ||
<!--begin::Header--> | ||
<div class="card-header"> | ||
<div class="card-title">Navbar</div> | ||
</div> | ||
<!--end::Header--> | ||
<!--begin::Body--> | ||
<div class="card-body"> | ||
<nav class="navbar navbar-expand-lg bg-body-tertiary"> | ||
<div class="container-fluid"> | ||
<a class="navbar-brand" href="#">Navbar</a> | ||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
<div class="collapse navbar-collapse" id="navbarSupportedContent"> | ||
<ul class="navbar-nav me-auto mb-2 mb-lg-0"> | ||
<li class="nav-item"> | ||
<a class="nav-link active" aria-current="page" href="#">Home</a> | ||
</li> | ||
<li class="nav-item"><a class="nav-link" href="#">Link</a></li> | ||
<li class="nav-item dropdown"> | ||
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false"> | ||
Dropdown | ||
</a> | ||
<ul class="dropdown-menu"> | ||
<li><a class="dropdown-item" href="#">Action</a></li> | ||
<li><a class="dropdown-item" href="#">Another action</a></li> | ||
<li> | ||
<hr class="dropdown-divider"> | ||
</li> | ||
<li><a class="dropdown-item" href="#">Something else here</a></li> | ||
</ul> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link disabled" aria-disabled="true">Disabled</a> | ||
</li> | ||
</ul> | ||
<form class="d-flex" role="search"> | ||
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search" data-sharkid="__6"> | ||
<button class="btn btn-outline-success" type="submit">Search</button> | ||
</form> | ||
</div> | ||
</div> | ||
</nav> | ||
</div> | ||
<!--end::Body--> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<div class="row mb-2"> | ||
<div class="col-sm-6"> | ||
<h1 class="m-0"><?= $this->fetch('title') ?></h1> | ||
</div><!-- /.col --> | ||
<div class="col-sm-6"> | ||
<?= $this->Breadcrumbs->render(['class' => 'float-sm-right']) ?> | ||
</div><!-- /.col --> | ||
</div><!-- /.row --> | ||
<div class="col-sm-6"> | ||
<h1 class="m-0"><?= $this->fetch('title') ?></h1> | ||
</div><!-- /.col --> | ||
<div class="col-sm-6"> | ||
<?= $this->Breadcrumbs->render(['class' => 'float-sm-right']) ?> | ||
</div><!-- /.col --> | ||
</div><!-- /.row --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<!--begin::Fullscreen Toggle--> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="#" data-lte-toggle="fullscreen"> | ||
<i data-lte-icon="maximize" class="bi bi-arrows-fullscreen"></i> | ||
<i data-lte-icon="minimize" class="bi bi-fullscreen-exit" style="display: none;"></i> | ||
</a> | ||
</li> <!--end::Fullscreen Toggle--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?= $this->element('CakeLte.header/menu') ?> | ||
<ul class="navbar-nav ms-auto"> <!--begin::Navbar Search--> | ||
<li class="nav-item"> <a class="nav-link" data-widget="navbar-search" href="#" role="button"> <i class="bi bi-search"></i> </a> </li> <!--end::Navbar Search--> | ||
<?= $this->element('CakeLte.header/messages') ?> | ||
<?= $this->element('CakeLte.header/notifications') ?> | ||
<?= $this->element('CakeLte.header/fullscreen') ?> | ||
<?= $this->element('CakeLte.header/user_menu') ?> | ||
<?= $this->element('CakeLte.header/theme_mode') ?> | ||
</ul> <!--end::End Navbar Links--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<ul class="navbar-nav"> | ||
<li class="nav-item"> <a class="nav-link" data-lte-toggle="sidebar" href="#" role="button"> <i class="bi bi-list"></i> </a> </li> | ||
<li class="nav-item d-none d-md-block"> <a href="#" class="nav-link">Home</a> </li> | ||
<li class="nav-item d-none d-md-block"> <a href="#" class="nav-link">Contact</a> </li> | ||
</ul> <!--end::Start Navbar Links--> <!--begin::End Navbar Links--> |
Oops, something went wrong.