From 96f44aa28658707250f5a71d17e2ccf9b5144f2e Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Sat, 4 Aug 2018 12:44:37 +0200 Subject: [PATCH] navbar for mobiles devices --- bl-kernel/abstract/dblist.class.php | 4 +-- bl-kernel/admin/themes/booty/html/navbar.php | 34 ++++++++++++++++++++ bl-kernel/admin/themes/booty/index.php | 3 ++ bl-kernel/boot/rules/99.paginator.php | 4 +-- bl-kernel/categories.class.php | 2 +- bl-kernel/tags.class.php | 4 +-- 6 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 bl-kernel/admin/themes/booty/html/navbar.php diff --git a/bl-kernel/abstract/dblist.class.php b/bl-kernel/abstract/dblist.class.php index 1e7110b0..ee36d459 100644 --- a/bl-kernel/abstract/dblist.class.php +++ b/bl-kernel/abstract/dblist.class.php @@ -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; diff --git a/bl-kernel/admin/themes/booty/html/navbar.php b/bl-kernel/admin/themes/booty/html/navbar.php new file mode 100644 index 00000000..7dc031ec --- /dev/null +++ b/bl-kernel/admin/themes/booty/html/navbar.php @@ -0,0 +1,34 @@ + \ No newline at end of file diff --git a/bl-kernel/admin/themes/booty/index.php b/bl-kernel/admin/themes/booty/index.php index 0501a988..598afb0c 100644 --- a/bl-kernel/admin/themes/booty/index.php +++ b/bl-kernel/admin/themes/booty/index.php @@ -54,6 +54,9 @@ + + +
diff --git a/bl-kernel/boot/rules/99.paginator.php b/bl-kernel/boot/rules/99.paginator.php index 88440151..4adaaa3e 100644 --- a/bl-kernel/boot/rules/99.paginator.php +++ b/bl-kernel/boot/rules/99.paginator.php @@ -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(); diff --git a/bl-kernel/categories.class.php b/bl-kernel/categories.class.php index 81517dba..b8cac9f0 100644 --- a/bl-kernel/categories.class.php +++ b/bl-kernel/categories.class.php @@ -7,7 +7,7 @@ class Categories extends dbList { parent::__construct(DB_CATEGORIES); } - function countPagesByCategory($key) + function numberOfPages($key) { return $this->countItems($key); } diff --git a/bl-kernel/tags.class.php b/bl-kernel/tags.class.php index a2259989..703ccaac 100644 --- a/bl-kernel/tags.class.php +++ b/bl-kernel/tags.class.php @@ -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()