navbar for mobiles devices
This commit is contained in:
parent
1caddac331
commit
96f44aa286
|
@ -148,10 +148,10 @@ class dbList extends dbJSON
|
|||
return $tmp;
|
||||
}
|
||||
|
||||
// Returns the amount of items for some key
|
||||
// Returns the number of items in the list
|
||||
public function countItems($key)
|
||||
{
|
||||
if( isset($this->db[$key]) ) {
|
||||
if (isset($this->db[$key])) {
|
||||
return count($this->db[$key]['list']);
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
<nav class="navbar navbar-light bg-light d-block d-sm-none">
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#"><?php echo (defined('BLUDIT_PRO'))?'BLUDIT PRO':'BLUDIT' ?></a>
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'dashboard' ?>"><?php $L->p('Dashboard') ?></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'new-content' ?>"><?php $L->p('New content') ?></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'content' ?>"></span><?php $L->p('Content') ?></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'categories' ?>"><?php $L->p('Categories') ?></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>"><?php $L->p('Users') ?></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'settings' ?>"><?php $L->p('Settings') ?></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'plugins' ?>"><?php $L->p('Plugins') ?></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'themes' ?>"><?php $L->p('Themes') ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
|
@ -54,6 +54,9 @@
|
|||
<!-- Alert -->
|
||||
<?php include('html/alert.php'); ?>
|
||||
|
||||
<!-- Navbar, only for small devices -->
|
||||
<?php include('html/navbar.php'); ?>
|
||||
|
||||
<div class="container">
|
||||
<!-- 25%/75% split on large devices, small, medium devices hide -->
|
||||
<div class="row">
|
||||
|
|
|
@ -11,12 +11,12 @@ if($url->whereAmI()=='admin') {
|
|||
elseif($url->whereAmI()=='tag') {
|
||||
$itemsPerPage = $site->itemsPerPage();
|
||||
$tagKey = $url->slug();
|
||||
$amountOfItems = $tags->countPagesByTag($tagKey);
|
||||
$amountOfItems = $tags->numberOfPages($tagKey);
|
||||
}
|
||||
elseif($url->whereAmI()=='category') {
|
||||
$itemsPerPage = $site->itemsPerPage();
|
||||
$categoryKey = $url->slug();
|
||||
$amountOfItems = $categories->countPagesByCategory($categoryKey);
|
||||
$amountOfItems = $categories->numberOfPages($categoryKey);
|
||||
}
|
||||
else {
|
||||
$itemsPerPage = $site->itemsPerPage();
|
||||
|
|
|
@ -7,7 +7,7 @@ class Categories extends dbList {
|
|||
parent::__construct(DB_CATEGORIES);
|
||||
}
|
||||
|
||||
function countPagesByCategory($key)
|
||||
function numberOfPages($key)
|
||||
{
|
||||
return $this->countItems($key);
|
||||
}
|
||||
|
|
|
@ -7,9 +7,9 @@ class Tags extends dbList {
|
|||
parent::__construct(DB_TAGS);
|
||||
}
|
||||
|
||||
function countPagesByTag($tagKey)
|
||||
function numberOfPages($key)
|
||||
{
|
||||
return $this->countItems($tagKey);
|
||||
return $this->countItems($key);
|
||||
}
|
||||
|
||||
public function reindex()
|
||||
|
|
Loading…
Reference in New Issue