Got me some cool new kicks yesterday. They're Timberland Redwood Falls Chelsea Boots. I quite like them.
John and I took my US coworker Kip to Clifton Hill today.
Team dinner at The Keg last night.
This fence was pretty beat up in a recent snow storm. Today it looks nice.
Our go-to restaurant when I was in highschool and college will soon be torn down to make way for "Stacked Towns". This is another step towards the overcrowding of the Niagara Region. I recently read an estimate of 12 million people will be moving to Niagara in the next 10 years. Hopefully they will also focus on expanding roads. Traffic is becoming horrible everywhere we go.
This beer from Bench is decent.
Found a great source for leather notebook covers and folios by accident from an Instagram ad recently. I love this company now.
The first round of site updates are done. I didn't go with the infinite scroll, I got lazy and used the old tried-and-true Paginator I wrote well over a decade ago. It has been updated with baked-in bootstrap pagination classes. If you're interested, here's the code:
class Paginator
{
public $current_page = 1;
public $total_pages = 1;
public $total_records = 0;
public $display_total_only = 0;
public $query_string = 0;
public $singular_record_text = "";
public $plural_record_text = "";
private $inc = 1; // inc = increment by N page - used in prev/next
private $fp = 1; // fp = first page
public $threshold = 1; // th = threshold (keep pages visible +/- from current)
public $end_threshold = 1; // st = starter threshold - keep first page visible up to Nth page.
public function __construct($thispage=1,$totalpages=1,$totalrecords=0,$singular_text="record",$plural_text="records",$query_string=0)
{
$this->current_page = $thispage;
$this->total_pages = $totalpages;
$this->total_records = $totalrecords;
$this->singular_record_text = $singular_text;
$this->plural_record_text = $plural_text;
$this->query_string = $query_string;
}
public function getFirst()
{
return $this->fp;
}
public function getLast()
{
return $this->total_pages;
}
public function getPrev()
{
if (($this->current_page - $this->inc) >= $this->fp)
{
if ($this->current_page - $this->inc > $this->total_pages)
{
return $this->total_pages;
} else {
return $this->current_page - $this->inc;
}
} else {
return $this->fp;
}
}
public function getNext()
{
if (($this->current_page + $this->inc) > $this->total_pages)
{
return $this->total_pages;
} else {
return $this->current_page + $this->inc;
}
}
public function getMin()
{
if ($this->current_page <= $this->end_threshold)
{
return $this->fp;
} else {
return $this->current_page - $this->threshold;
}
}
public function getMax()
{
if ($this->total_pages <= $this->end_threshold) {
$max = $this->total_pages;
} else {
// if ($this->current_page < $this->end_threshold) { // commented out mb 090616
// $max = $this->end_threshold;
//} else {
if ($this->current_page > ($this->total_pages - $this->threshold)) {
$max = $this->total_pages;
} else {
if ($this->total_pages - $this->current_page == $this->threshold+1)
{
$max = $this->current_page + $this->threshold+1;
} else {
$max = $this->current_page + $this->threshold;
}
}
// }
}
return $max;
}
public function getNextBreak()
{
return ($this->getMax() < $this->total_pages)?1:0;
}
public function getPrevBreak()
{
return ($this->getMin() > 1)?1:0;
}
public function getPageLink($page)
{
return "/".$this->query_string . "/page/" . $page;
// return ($this->query_string?$this->query_string."&":"?")."page=" . $page;
}
public function getHTML()
{
$previouspage = $this->getPrev();
$currentpage = $this->current_page;
$nextpage = $this->getNext();
$firstpage = $this->getFirst();
$min = $this->getMin();
$max = $this->getMax();
$shownextbreak = $this->getNextBreak();
$showprevbreak = $this->getPrevBreak();
$html = '';
$html .= "<div class=\"text-center\">\n";
if ($this->display_total_only != 1)
{
$html .= "<ul class=\"pagination justify-content-center\">\n";
// first page link - mb 100723
if ($this->current_page != $this->getFirst() && $min > $this->getFirst() && $this->threshold != 0)
$html .= "<li class='page-item'><a class='page-link' href=\"" . $this->getPageLink($this->getFirst()) . "\">«</a></li>\n";
if ($this->current_page != $this->getFirst())
$html .= "<li class='page-item'><a class='page-link' href=\"" . $this->getPageLink($previouspage) . "\">‹</a></li>\n";
for ($i=$min;$i<=$max;$i++)
{
if ($this->current_page == $i)
{
$html .= "<li class='page-item active'><a class='page-link' href=\"" . $this->getPageLink($currentpage) . "\">" . //"<span".($this->threshold==0?"":" class=\"This-page\"").">".
($this->threshold==0?"Page ":"").$this->current_page.
($this->threshold==0?" of ".$this->total_pages:"").
"</a></li>\n";
} else {
if ($this->threshold!=0) $html .= "<li class='page-item'><a class='page-link' href=\"" . $this->getPageLink($i) . "\">$i</a></li>\n";
}
}
if ($this->current_page != $this->total_pages && $this->current_page < $this->total_pages)
$html .= "<li class='page-item'><a class='page-link' href=\"" . $this->getPageLink($nextpage) . "\">›</a></li>\n";
// last page link - mb 100723
if ($this->current_page != $this->getLast() && $max < $this->getLast() && $this->threshold != 0)
$html .= "<li class='page-item'><a class='page-link' href=\"" . $this->getPageLink($this->getLast()) . "\">»</a></li>\n";
$html .= "</ul>\n";
}
if ($this->total_records)
{
$html .= "<div class='Results'>" .
number_format($this->total_records) . " " .
($this->total_records <> 1?$this->plural_record_text:$this->singular_record_text) .
"</div>\n";
}
$html .= "</div>\n";
return $html;
}
} // end of class
Here's how it's used with a Smarty template:
if ( $total_pages > 1) {
$pagin = new Paginator($current_page,$total_pages);
$smarty->assign("paginator",$pagin->getHTML());
}
Last year was a whirlwind of a year. Lots of ups and downs and even a few lefts and rights. There were a lot of changes in my life and in the lives of people around me.
This year there will also be some exciting new changes made to this site. Here's what I'm thinking of doing:
Public changes
Admin changes
What will stay the same
Starting immediately, the Contact area of the /about page will link to my Buy Me a Coffee profile.
A quick 10 minute sketch of one of my favourite places in the world.
Yesterday I ate a Big Mac No Meat. It was oddly satisfying. Would recommend if you want junk food but don't eat meat.
These daily scribbles are somewhat therapeutic.
A view from the dock at the island.
We went back for sunset last night.
My dad's iconic garage has to be rebuilt due to fire damage back in February. This week demolition was finally started.
I mean Dragons...
This caught my eye today.