summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/Http/Controllers/IndexController.php6
-rw-r--r--app/Libraries/Helper.php1
-rw-r--r--resources/views/layouts/app.blade.php8
3 files changed, 13 insertions, 2 deletions
diff --git a/app/Http/Controllers/IndexController.php b/app/Http/Controllers/IndexController.php
index f24d1ad..62bec0e 100644
--- a/app/Http/Controllers/IndexController.php
+++ b/app/Http/Controllers/IndexController.php
@@ -58,7 +58,11 @@ class IndexController extends Controller
public function show( $id ) {
$articles = Article::where('id', $id);
$articles = $articles->simplePaginate(10);
- return view('list', ["articles" => $articles, "count" => 1]);
+ $page_title = "";
+ foreach($articles as $a) {
+ $page_title = $a->title;
+ }
+ return view('list', ["articles" => $articles, "count" => 1, "page_title" => $page_title]);
}
public function search(Request $request) {
diff --git a/app/Libraries/Helper.php b/app/Libraries/Helper.php
index 026abef..41d26e5 100644
--- a/app/Libraries/Helper.php
+++ b/app/Libraries/Helper.php
@@ -69,6 +69,7 @@ class Helper {
{
$desc = ($post->excerpt_html);
+ $categories = null;
if ( "mastodon" == $title ) {
diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php
index 90f1075..ed55788 100644
--- a/resources/views/layouts/app.blade.php
+++ b/resources/views/layouts/app.blade.php
@@ -10,7 +10,13 @@
<link rel="me" href="https://mstdn.social/@MostDiscussed">
<link rel="me" href="https://mastodon.social/@MostDiscussed">
- <title>{{ config('app.name', 'Laravel') }}@if( ("index" != Request::route()->getName()) && ("show" != Request::route()->getName()) ) - {{ ucwords(Request::route()->getName()) }} Articles @endif</title>
+ <title>{{ config('app.name', 'Laravel') }}
+ @if( ("index" != Request::route()->getName()) && ("show" != Request::route()->getName()) )
+ - {{ ucwords(Request::route()->getName()) }} Articles
+ @elseif ( "show" == Request::route()->getName() )
+ - {{ ucwords( $page_title) }}
+ @endif
+ </title>
<!-- Scripts -->
<script src="{{ asset('js/app.js') }}" defer></script>