From 4ab9d33b01063e501c6ee2cc029c2f47c92b3a00 Mon Sep 17 00:00:00 2001 From: Joey Kimsey Date: Sun, 8 Dec 2024 04:43:06 -0500 Subject: [PATCH] bootstrap 4 update and bugfixes --- app/css/main-dark.css | 374 +++++++++++++++++- app/css/main.css | 137 +------ app/js/main.js | 1 + app/models/group.php | 2 +- app/models/log.php | 2 +- app/models/routes.php | 8 +- app/models/user.php | 2 +- app/plugins/blog/models/posts.php | 12 +- app/plugins/blog/plugin.php | 2 +- app/plugins/blog/templates/blog.tpl | 9 +- app/plugins/blog/views/admin/dashboard.html | 6 +- app/plugins/blog/views/admin/list.html | 4 +- app/plugins/blog/views/admin/view.html | 2 - app/plugins/blog/views/recentWidget.html | 6 +- app/plugins/blog/views/sidebar.html | 10 +- app/plugins/blog/views/sidebar2.html | 8 +- app/plugins/bugreport/views/admin/list.html | 4 +- app/plugins/bugreport/views/admin/view.html | 14 +- app/plugins/comments/models/comments.php | 2 +- .../comments/views/admin/dashboard.html | 4 +- app/plugins/comments/views/admin/list.html | 4 +- app/plugins/comments/views/control.html | 8 +- app/plugins/comments/views/list.html | 16 +- app/plugins/feedback/views/admin/list.html | 4 +- app/plugins/feedback/views/admin/view.html | 14 +- app/plugins/messages/models/message.php | 16 +- app/plugins/messages/plugin.php | 30 +- app/plugins/messages/views/mesage.html | 14 +- app/plugins/messages/views/message.html | 14 +- .../views/nav/recentMessagesDropdown.html | 19 +- .../notifications/models/notification.php | 6 +- app/plugins/notifications/plugin.php | 14 +- app/plugins/notifications/views/list.html | 4 +- .../nav/recentNotificationsDropdown.html | 15 +- app/plugins/subscribe/views/admin/list.html | 2 +- app/resources/templates/example.tpl | 6 +- app/templates/admin/admin.tpl | 53 ++- app/templates/default/default.inc.php | 2 +- app/templates/default/default.tpl | 38 +- app/views/admin/dashboard/dash.html | 6 +- app/views/admin/dashboard/users.html | 6 +- app/views/admin/groups/list.html | 4 +- app/views/admin/groups/list_members.html | 8 +- app/views/admin/groups/view.html | 12 +- app/views/admin/logs/admin.html | 2 +- app/views/admin/logs/admin_list.html | 4 +- app/views/admin/logs/error.html | 2 +- app/views/admin/logs/error_list.html | 4 +- app/views/admin/logs/login.html | 2 +- app/views/admin/logs/login_list.html | 4 +- app/views/admin/modules/models/list.html | 2 +- app/views/admin/modules/models/view.html | 12 +- app/views/admin/modules/plugins/view.html | 12 +- app/views/admin/routes/list.html | 4 +- app/views/admin/routes/view.html | 12 +- app/views/admin/tokens/list.html | 2 +- app/views/admin/tokens/view.html | 12 +- app/views/admin/users/list.html | 4 +- app/views/admin/users/view.html | 20 +- app/views/alpha/index.html | 4 +- app/views/copy.html | 2 +- app/views/footer/container.html | 26 +- app/views/forms/iconSelect.html | 12 +- app/views/index.html | 74 ++-- app/views/install/nav.html | 20 +- app/views/issues/error.html | 2 +- app/views/issues/info.html | 2 +- app/views/issues/notice.html | 2 +- app/views/issues/success.html | 2 +- app/views/login.html | 49 ++- app/views/nav/admin.html | 9 +- app/views/nav/main.html | 2 +- app/views/nav/statusLoggedIn.html | 17 +- app/views/nav/statusLoggedOut.html | 73 +++- app/views/nav/usercp.html | 2 +- app/views/profile.html | 18 +- app/views/switches.html | 18 +- bin/tempus_project.php | 5 + composer.json | 4 +- 79 files changed, 861 insertions(+), 504 deletions(-) diff --git a/app/css/main-dark.css b/app/css/main-dark.css index 627223d..ba4ff32 100644 --- a/app/css/main-dark.css +++ b/app/css/main-dark.css @@ -48,4 +48,376 @@ body { border-color: #555; box-shadow: none; } - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + /** + * app/css/main.css + * + * This file is for any css that should be applied site wide. + * + * @version 3.0 + * @author Joey Kimsey + * @link https://TheTempusProject.com + * @license https://opensource.org/licenses/MIT [MIT LICENSE] + */ + +@media ( min-width: 768px ) { + .side-nav { + /* background-color: #222; */ + } + .side-nav li a:hover, + .side-nav li a:focus { + background-color: #fff !important; + } +} + +/** +* Other +*/ +.bars { + /* background-color: #333; */ + /* box-shadow: 0 5px 0 #333, 0 10px 0 #333; */ +} +.bg-gray { + /* background-image: -moz-linear-gradient( center bottom, #BBBBBB 0%, #F0F0F0 100% ); */ + /* box-shadow: 0 1px 0 #B4B3B3; */ +} +.UI-buffer { + /* border-bottom: 1px solid #CCCCCC; */ +} +.UI-page-buffer { + /* border-bottom: 1px solid #CCCCCC; */ +} +.table-user-information>tbody>tr { + /* border-top: 1px solid rgb( 221, 221, 221 ); */ +} +.sticky-foot-head { + /* background: #EDEFF1; */ + /* border-bottom: 1px solid #CCCCCC; */ + /* border-top: 1px solid #DDDDDD; */ +} +.sticky-foot { + background-color: #fff; +} +.sticky-copy { + background: #282828; /* E3E3E3; */ + border-bottom: 1px solid #b0b0b0; /* CCCCCC; */ + border-top: 1px solid #bfbfbf; /* DDDDDD; */ +} + +/** +* Main Carousel +*/ +.main-text { + color: #000; +} +.btn-clear { + color: #000; + border-color: #000; +} +.btn-clear:hover { + color: #fff; + /* background-color: #F000FF; */ +} + +/** +* Top Navigation +*/ +.top-nav>li>a { + /* color: #999; */ +} +.top-nav>li>a:hover, +.top-nav>li>a:focus, +.top-nav>.open>a, +.top-nav>.open>a:hover, +.top-nav>.open>a:focus { + color: #000; + background-color: #fff; +} +.top-nav>.open>.dropdown-menu { + /* border: 1px solid rgba( 0, 0, 0, .15 ); */ + background-color: #000; + /* -webkit-box-shadow: 0 6px 12px rgba( 0, 0, 0, .175 ); */ + /* box-shadow: 0 6px 12px rgba( 0, 0, 0, .175 ); */ +} + +/** +* Messages Dropdown +*/ +li.message-header { + /* border-bottom: 1px solid rgba( 0, 0, 0, .15 ); */ +} +li.message-preview { + /* border-bottom: 1px solid rgba( 0, 0, 0, .15 ); */ +} + +/** +* Widget +*/ +.widget li.list-group-item { + /* border-top: 1px solid #ddd; */ +} +.widget li.list-group-item:hover { + /* background-color: rgba( 86, 61, 124, .1 ); */ +} +.widget .mic-info { + /* color: #666666; */ +} + +/** +* Footer and Copyright +*/ +.copy { + background: #282828; /* E3E3E3; */ + border-bottom: 1px solid #b0b0b0; /* CCCCCC; */ + border-top: 1px solid #bfbfbf; /* DDDDDD; */ +} +.footer-head { + background: #282828; /* E3E3E3; */ + border-bottom: 1px solid #b0b0b0; /* CCCCCC; */ + border-top: 1px solid #bfbfbf; /* DDDDDD; */ +} +.footer-head h3 { + border-bottom: 1px solid #a1a7ad; /* BAC1C8 */ + color: #4a5c6e; /* 54697E */ +} +.footer-head ul { + /* color: #7F8C8D; */ +} +.footer-head a { + /* color: #78828D */ +} + +/** +* Side Navigation +*/ +.side-nav>li>ul>li>a { + /* color: #999; */ +} +.side-nav>li>ul>li>a:hover { + color: #000; +} +.side-nav .active > a { + color: #000; + background-color: #fff; +} +.side-nav .active > a:hover { + color: #000; + background-color: #fff; +} + +/** +* Social +*/ +.social span { + /* background: none repeat scroll 0 0 #B5B5B5; */ + /* border: 2px solid #B5B5B5; */ +} +.social span a { + /* color: #EDEFF1; */ +} +.social span:hover { + /* border: 2px solid #2c3e50; + background: #2c3e50; */ +} +.social span a i { + /* color: #EDEFF1 !important; */ +} + +/** +* Newsletter Box +*/ +.newsletter-box input#appendedInputButton { + background: #000; +} +.newsletter-box .btn { + color: #000; +} + +/** +* Colored Badges +*/ +.badge { + color: #000; + /* background-color: #999999; */ +} +.badge:hover { + color: #000; +} +.badge-error { + /* background-color: #b94a48; */ +} +.badge-error:hover { + /* background-color: #953b39; */ +} +.badge-warning { + /* background-color: #f89406; */ +} +.badge-warning:hover { + /* background-color: #c67605; */ +} +.badge-success { + /* background-color: #468847; */ +} +.badge-success:hover { + /* background-color: #356635; */ +} +.badge-info { + /* background-color: #3a87ad; */ +} +.badge-info:hover { + /* background-color: #2d6987; */ +} +.badge-inverse { + /* background-color: #333333; */ +} +.badge-inverse:hover { + /* background-color: #1a1a1a; */ +} + +/** +* Install Terms +*/ +.install-terms { + /* border: 1px solid #ccc; + background: #f2f2f2; */ +} +.install-terms p, +.install-terms li { + /* color: #333; */ +} +.install-terms h3 { + color: #fff; +} +.install-terms h4 { + color: #fff; +} +.install-terms strong { + color: #fff; +} + +/** +* Terms Page +*/ +.terms-page { + /* border: 1px solid #ccc; + background: #f2f2f2; */ +} +.terms-page p, +.terms-page li { + /* color: #333; */ +} +.terms-page h3 { + color: #fff; +} +.terms-page h4 { + color: #fff; +} +.terms-page strong { + color: #fff; +} + +/** +* Terms +*/ +.terms { + /* border: 1px solid #ccc; */ + /* background: #f2f2f2; */ +} +.terms p, +.terms li { + /* color: #333; */ +} +.terms h3 { + color: #fff; +} +.terms h4 { + color: #fff; +} +.terms strong { + color: #fff; +} + +.material-switch > label::before { + /* background: rgb(0, 0, 0); */ + /* box-shadow: inset 0px 0px 10px rgba(0, 0, 0, 0.5); */ +} +.material-switch > label::after { + /* background: rgb(255, 255, 255); */ + /* box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3); */ +} \ No newline at end of file diff --git a/app/css/main.css b/app/css/main.css index d1b1bd6..b048703 100644 --- a/app/css/main.css +++ b/app/css/main.css @@ -31,45 +31,11 @@ pre { padding-right: 225px; padding-left: 0; } - .side-nav { - right: 0; - left: auto; - } - .side-nav { - position: fixed; - top: 51px; - left: 225px; - width: 225px; - margin-left: -225px; - border: none; - border-radius: 0; - overflow-y: auto; - background-color: #222; - bottom: 53px; - overflow-x: hidden; - padding-bottom: 10px; - } - .side-nav>li>a { - width: 225px; - } - .side-nav li a:hover, - .side-nav li a:focus { - outline: none; - background-color: #000 !important; - } } /** * Other */ -.custom-nav { - display: relative; - float: right; -} -.navbar-form-alt { - margin-top: 10px; - margin-bottom: 10px; -} .bars { display: block; width: 60px; @@ -158,7 +124,7 @@ pre { .dynamic-footer-padding { padding-bottom: var(--footer-height); } -.footer-head .navbar-toggle { +.footer-head .navbar-toggler { display: inline-block; float: none; } @@ -225,45 +191,6 @@ pre { margin: 0 auto; } -/** - * Top Navigation - */ -.top-nav { - padding: 0 15px; -} -.top-nav>li { - display: inline-block; - float: left; -} -.top-nav>li>a { - padding-top: 15px; - padding-bottom: 15px; - line-height: 20px; - color: #999; -} -.top-nav>li>a:hover, -.top-nav>li>a:focus, -.top-nav>.open>a, -.top-nav>.open>a:hover, -.top-nav>.open>a:focus { - color: #fff; - background-color: #000; -} -.top-nav>.open>.dropdown-menu { - float: left; - position: absolute; - margin-top: 0; - border: 1px solid rgba( 0, 0, 0, .15 ); - border-top-left-radius: 0; - border-top-right-radius: 0; - background-color: #fff; - -webkit-box-shadow: 0 6px 12px rgba( 0, 0, 0, .175 ); - box-shadow: 0 6px 12px rgba( 0, 0, 0, .175 ); -} -.top-nav>.open>.dropdown-menu>li>a { - white-space: normal; -} - /** * Messages Dropdown */ @@ -327,44 +254,6 @@ ul.alert-dropdown { border-top-right-radius: 0px; } -/** - * Signin Form - */ -.form-signin { - max-width: 330px; - padding: 15px; - margin: 0 auto; -} -.form-signin .form-signin-heading, -.form-signin .checkbox { - margin-bottom: 10px; -} -.form-signin .checkbox { - font-weight: normal; -} -.form-signin .form-control { - position: relative; - height: auto; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - padding: 10px; - font-size: 16px; -} -.form-signin .form-control:focus { - z-index: 2; -} -.form-signin input[type="text"] { - margin-bottom: -1px; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} -.form-signin input[type="password"] { - margin-bottom: 10px; - border-top-left-radius: 0; - border-top-right-radius: 0; -} - /** * Footer and Copyright */ @@ -420,30 +309,6 @@ ul.alert-dropdown { color: #78828D } -/** - * Side Navigation - */ -.side-nav>li>ul { - padding: 0; -} -.side-nav>li>ul>li>a { - display: block; - padding: 10px 15px 10px 38px; - text-decoration: none; - color: #999; -} -.side-nav>li>ul>li>a:hover { - color: #fff; -} -.side-nav .active > a { - color: #fff; - background-color: #080808; -} -.side-nav .active > a:hover { - color: #fff; - background-color: #080808; -} - /** * Social */ diff --git a/app/js/main.js b/app/js/main.js index d1fcd2e..e4008c8 100644 --- a/app/js/main.js +++ b/app/js/main.js @@ -117,6 +117,7 @@ window.onload = function () { // Check if dark mode is saved in localStorage if (localStorage.getItem('darkMode') === 'enabled') { darkModeStylesheet.disabled = false; + toggleButton.checked = true; } toggleButton.addEventListener('click', function () { diff --git a/app/models/group.php b/app/models/group.php index 4a375f6..bbc512b 100644 --- a/app/models/group.php +++ b/app/models/group.php @@ -257,7 +257,7 @@ class Group extends DatabaseModel { if ( $group === false ) { return false; } - $members = self::$db->getPaginated( 'users', [ 'userGroup', '=', $id ] ); + $members = self::$db->get( 'users', [ 'userGroup', '=', $id ] ); if ( !$members->count() ) { Debug::info( "list members: Could not find anyone in group: $id" ); return false; diff --git a/app/models/log.php b/app/models/log.php index 9131548..efd7b4a 100644 --- a/app/models/log.php +++ b/app/models/log.php @@ -87,7 +87,7 @@ class Log extends DatabaseModel { } public function list( $filter = null ) { - $logData = self::$db->getPaginated( $this->tableName, [ 'source', '=', $filter ] ); + $logData = self::$db->get( $this->tableName, [ 'source', '=', $filter ] ); if ( !$logData->count() ) { return false; } diff --git a/app/models/routes.php b/app/models/routes.php index 19b26b2..63a23d1 100644 --- a/app/models/routes.php +++ b/app/models/routes.php @@ -128,7 +128,7 @@ class Routes extends DatabaseModel { } $routeData = self::$db->get( $this->tableName, [ 'nickname', '=', $name ] ); if ( !$routeData->count() ) { - Debug::warn( "Could not find a group named: $name" ); + Debug::info( "Routes:findByName: Could not find a route named: $name" ); return false; } return $this->filter( $routeData->first() ); @@ -137,7 +137,7 @@ class Routes extends DatabaseModel { public function findByOriginalUrl( $url ) { $routeData = self::$db->get( $this->tableName, [ 'original_url', '=', $url ] ); if ( !$routeData->count() ) { - Debug::warn( "Could not find route by original url: $url" ); + Debug::info( "Routes:findByOriginalUrl: Could not find route by original url: $url" ); return false; } return $this->filter( $routeData->first() ); @@ -145,12 +145,12 @@ class Routes extends DatabaseModel { public function findByforwardedUrl( $url ) { if ( !Check::url( $url ) ) { - Debug::warn( "Invalid forwarded_url: $url" ); + Debug::warn( "Routes:findByforwardedUrl: Invalid forwarded_url: $url" ); return false; } $routeData = self::$db->get( $this->tableName, [ 'forwarded_url', '=', $url ] ); if ( !$routeData->count() ) { - Debug::warn( "Could not find route by forwarded url: $url" ); + Debug::info( "Routes:findByforwardedUrl: Could not find route by forwarded url: $url" ); return false; } return $this->filter( $routeData->first() ); diff --git a/app/models/user.php b/app/models/user.php index 1ab7566..aa0f80d 100644 --- a/app/models/user.php +++ b/app/models/user.php @@ -446,7 +446,7 @@ class User extends DatabaseModel { */ public function recent( $limit = null ) { if ( empty( $limit ) ) { - $data = self::$db->getpaginated( $this->tableName, '*' ); + $data = self::$db->get( $this->tableName, '*' ); } else { $data = self::$db->get( $this->tableName, [ 'ID', '>', '0' ], 'ID', 'DESC', [ 0, $limit ] ); } diff --git a/app/plugins/blog/models/posts.php b/app/plugins/blog/models/posts.php index 5f8873d..471f51d 100644 --- a/app/plugins/blog/models/posts.php +++ b/app/plugins/blog/models/posts.php @@ -221,9 +221,9 @@ class Posts extends DatabaseModel { $whereClause = '*'; } if ( empty( $limit ) ) { - $postData = self::$db->getPaginated( $this->tableName, $whereClause ); + $postData = self::$db->get( $this->tableName, $whereClause ); } else { - $postData = self::$db->getPaginated( $this->tableName, $whereClause, 'ID', 'DESC', [0, $limit] ); + $postData = self::$db->get( $this->tableName, $whereClause, 'ID', 'DESC', [0, $limit] ); } if ( !$postData->count() ) { Debug::info( 'No Blog posts found.' ); @@ -239,7 +239,7 @@ class Posts extends DatabaseModel { } else { $whereClause = ['draft', '=', '0']; } - $postData = self::$db->getPaginated( $this->tableName, $whereClause ); + $postData = self::$db->get( $this->tableName, $whereClause ); if ( !$postData->count() ) { Debug::info( 'No Blog posts found.' ); @@ -263,7 +263,7 @@ class Posts extends DatabaseModel { $firstDayUnix = date( 'U', strtotime( "first day of $year" ) ); $lastDayUnix = date( 'U', strtotime( "last day of $year" ) ); $whereClause = array_merge( $whereClause, ['created', '<=', $lastDayUnix, 'AND', 'created', '>=', $firstDayUnix] ); - $postData = self::$db->getPaginated( $this->tableName, $whereClause ); + $postData = self::$db->get( $this->tableName, $whereClause ); if ( !$postData->count() ) { Debug::info( 'No Blog posts found.' ); @@ -282,7 +282,7 @@ class Posts extends DatabaseModel { $whereClause = ['draft', '=', '0', 'AND']; } $whereClause = array_merge( $whereClause, ['author' => $ID] ); - $postData = self::$db->getPaginated( $this->tableName, $whereClause ); + $postData = self::$db->get( $this->tableName, $whereClause ); if ( !$postData->count() ) { Debug::info( 'No Blog posts found.' ); @@ -311,7 +311,7 @@ class Posts extends DatabaseModel { $month = date( 'F', $firstDayUnix ); $lastDayUnix = date( 'U', strtotime( "last day of $month $year" ) ); $whereClause = array_merge( $whereClause, ['created', '<=', $lastDayUnix, 'AND', 'created', '>=', $firstDayUnix] ); - $postData = self::$db->getPaginated( $this->tableName, $whereClause ); + $postData = self::$db->get( $this->tableName, $whereClause ); if ( !$postData->count() ) { Debug::info( 'No Blog posts found.' ); diff --git a/app/plugins/blog/plugin.php b/app/plugins/blog/plugin.php index d784824..dd90d1b 100644 --- a/app/plugins/blog/plugin.php +++ b/app/plugins/blog/plugin.php @@ -28,7 +28,7 @@ class Blog extends Plugin { public $pluginDescription = 'A simple plugin to add a blog to your installation.'; public $admin_links = [ [ - 'text' => ' Blog', + 'text' => ' Blog', 'url' => '{ROOT_URL}admin/blog', ], ]; diff --git a/app/plugins/blog/templates/blog.tpl b/app/plugins/blog/templates/blog.tpl index 0be2524..eceda38 100644 --- a/app/plugins/blog/templates/blog.tpl +++ b/app/plugins/blog/templates/blog.tpl @@ -32,7 +32,6 @@ - @@ -44,7 +43,7 @@