update to bootstrap 4 p1, bugfix for logoLarge, logging cleanup, more

This commit is contained in:
Joey Kimsey
2024-12-08 04:35:25 -05:00
parent 9abd3865f5
commit dcbe7c2ac0
25 changed files with 509 additions and 264 deletions

View File

@ -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.' );

View File

@ -28,7 +28,7 @@ class Blog extends Plugin {
public $pluginDescription = 'A simple plugin to add a blog to your installation.';
public $admin_links = [
[
'text' => '<i class="glyphicon glyphicon-text-size"></i> Blog',
'text' => '<i class="fa fa-fw fa-font"></i> Blog',
'url' => '{ROOT_URL}admin/blog',
],
];

View File

@ -32,7 +32,6 @@
<link rel="icon" href="{ROOT_URL}images/favicon.ico">
<!-- Required CSS -->
<link rel="stylesheet" href="{FONT_AWESOME_URL}font-awesome.min.css" crossorigin="anonymous">
<link rel="stylesheet" href="{BOOTSTRAP_CDN}css/bootstrap-theme.min.css" crossorigin="anonymous">
<link rel="stylesheet" href="{BOOTSTRAP_CDN}css/bootstrap.min.css" crossorigin="anonymous">
<!-- RSS -->
<link rel="alternate" href="{ROOT_URL}blog/rss" title="{TITLE} Feed" type="application/rss+xml" />
@ -44,7 +43,7 @@
<!--Brand and toggle should get grouped for better mobile display -->
<div class="navbar-header">
<a href="{ROOT_URL}" class="navbar-brand">{SITENAME}</a>
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse" style="">
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target=".navbar-ex1-collapse" style="">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
@ -55,7 +54,7 @@
<div class="collapse navbar-collapse navbar-ex1-collapse">
{topNavLeft}
<div class="navbar-right">
<ul class="nav navbar-nav">
<ul class="navbar-nav">
{topNavRight}
</ul>
</div>
@ -75,9 +74,7 @@
{/ISSUES}
<div class="row">
<div class="container">
<div class="page-header">
<h1 class="blog-title">{SITENAME} Blog</h1>
</div>
<h1 class="blog-title">{SITENAME} Blog</h1>
<div class="row">
<div class="col-sm-8 blog-main">
{BLOG_BREADCRUMBS}