From 4715974e298c4395ff1799953b5dfddfab04874e Mon Sep 17 00:00:00 2001 From: Chris Kankiewicz Date: Mon, 17 Feb 2020 15:34:21 -0700 Subject: [PATCH] Fixed missing search page title --- app/src/Handlers/DirectoryHandler.php | 1 + app/src/Handlers/SearchHandler.php | 1 + app/views/layouts/app.twig | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/Handlers/DirectoryHandler.php b/app/src/Handlers/DirectoryHandler.php index 34d3885..57e9a75 100644 --- a/app/src/Handlers/DirectoryHandler.php +++ b/app/src/Handlers/DirectoryHandler.php @@ -58,6 +58,7 @@ class DirectoryHandler 'files' => $files, 'path' => $path, 'readme' => $this->readme($files), + 'title' => $path == '.' ? 'Home' : $path, ]); } diff --git a/app/src/Handlers/SearchHandler.php b/app/src/Handlers/SearchHandler.php index ae21b8c..8b67528 100644 --- a/app/src/Handlers/SearchHandler.php +++ b/app/src/Handlers/SearchHandler.php @@ -47,6 +47,7 @@ class SearchHandler return $this->view->render($response, 'index.twig', [ 'files' => $files, 'search' => $search, + 'title' => $search, ]); } } diff --git a/app/views/layouts/app.twig b/app/views/layouts/app.twig index 997916b..cb50f52 100644 --- a/app/views/layouts/app.twig +++ b/app/views/layouts/app.twig @@ -2,7 +2,7 @@ -{# #} + @@ -10,7 +10,7 @@ {% include 'components/google-analytics.twig' %} {% endif %} -{{ path == '.' ? 'Home' : path }} • Directory Lister +{{ title }} • Directory Lister
{% block content %}{% endblock %}