diff --git a/site/config/config.localhost.php b/site/config/config.localhost.php deleted file mode 100644 index f5dfecb..0000000 --- a/site/config/config.localhost.php +++ /dev/null @@ -1,5 +0,0 @@ - true -]; diff --git a/site/controllers/blog.php b/site/controllers/blog.php index b9f03b9..84071a9 100644 --- a/site/controllers/blog.php +++ b/site/controllers/blog.php @@ -1,8 +1,6 @@ children()->listed(); if ($tag) { diff --git a/site/controllers/quotes.php b/site/controllers/quotes.php index 66fd73a..f8ae4e3 100644 --- a/site/controllers/quotes.php +++ b/site/controllers/quotes.php @@ -1,8 +1,6 @@ $page->children()->listed()->flip()->paginate(20) ]; diff --git a/site/models/article.php b/site/models/article.php index cb93c26..4ae9b75 100644 --- a/site/models/article.php +++ b/site/models/article.php @@ -1,33 +1,19 @@ date()->toDate('Y/m/d'); return '/' . $date .'/' . $this->slug(); } - public function readingTime(): string - { + public function readingTime() { $doc = new DOMDocument(); - $doc->loadHTML( - '' - . $this->text()->kirbytext() - . '' + $doc->loadHtml( + "" + . $this->text()->kirbytext() + ."" ); $pElems = $doc->getElementsByTagName('p'); @@ -39,6 +25,6 @@ class ArticlePage extends Page $wordCount = count(explode(' ', $text)); $readingTime = (int)ceil($wordCount / 150); - return sprintf(self::READING_TIME_FORMAT, $wordCount, $readingTime); + return $wordCount . ' words, ~' . $readingTime . 'min reading time'; } } diff --git a/site/snippets/article.php b/site/snippets/article.php index 63f618b..b97639b 100644 --- a/site/snippets/article.php +++ b/site/snippets/article.php @@ -1,10 +1,3 @@ - -

title() ?>

diff --git a/site/snippets/layout.php b/site/snippets/layout.php index b5abe5d..e999c52 100644 --- a/site/snippets/layout.php +++ b/site/snippets/layout.php @@ -1,11 +1,3 @@ - - diff --git a/site/templates/about.php b/site/templates/about.php index 3647285..7a98048 100644 --- a/site/templates/about.php +++ b/site/templates/about.php @@ -1,9 +1,3 @@ - -

title() ?>

diff --git a/site/templates/article.php b/site/templates/article.php index dcc8dfe..d5e4b47 100644 --- a/site/templates/article.php +++ b/site/templates/article.php @@ -1,9 +1,3 @@ - -

title() ?>

diff --git a/site/templates/blog.php b/site/templates/blog.php index ef44445..27395cf 100644 --- a/site/templates/blog.php +++ b/site/templates/blog.php @@ -1,10 +1,3 @@ - -

title() ?>

diff --git a/site/templates/blog.rss.php b/site/templates/blog.rss.php index ac360dd..08a1ec8 100644 --- a/site/templates/blog.rss.php +++ b/site/templates/blog.rss.php @@ -1,9 +1,4 @@ response()->type('application/rss+xml'); @@ -50,7 +45,6 @@ $writer->writeElement('link', url()); $writer->endElement(); // image foreach ($articles as $article) { - /** @var Kirby\Cms\Page $article */ $writer->startElement('item'); $writer->writeElement('title', $article->title()->toString()); diff --git a/site/templates/default.php b/site/templates/default.php index 5d2873a..a7c4762 100644 --- a/site/templates/default.php +++ b/site/templates/default.php @@ -1,9 +1,3 @@ - -

title() ?>

diff --git a/site/templates/home.php b/site/templates/home.php index b2b8e5f..3b20c57 100644 --- a/site/templates/home.php +++ b/site/templates/home.php @@ -1,10 +1,3 @@ - -
diff --git a/site/templates/quotes.php b/site/templates/quotes.php index b5af1d1..fa00553 100644 --- a/site/templates/quotes.php +++ b/site/templates/quotes.php @@ -1,10 +1,3 @@ - -

title() ?>