Fixed missing search page title

This commit is contained in:
Chris Kankiewicz
2020-02-17 15:34:21 -07:00
parent 841cbb774c
commit 4715974e29
3 changed files with 4 additions and 2 deletions

View File

@@ -58,6 +58,7 @@ class DirectoryHandler
'files' => $files,
'path' => $path,
'readme' => $this->readme($files),
'title' => $path == '.' ? 'Home' : $path,
]);
}

View File

@@ -47,6 +47,7 @@ class SearchHandler
return $this->view->render($response, 'index.twig', [
'files' => $files,
'search' => $search,
'title' => $search,
]);
}
}

View File

@@ -2,7 +2,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
{# <base href="{{ base_href() }}"> #}
<link rel="icon" href="{{ config('dark_mode') ? asset('images/favicon.dark.png') : asset('images/favicon.light.png') }}">
<link rel="stylesheet" href="{{ asset('app.css') }}">
@@ -10,7 +10,7 @@
{% include 'components/google-analytics.twig' %}
{% endif %}
<title>{{ path == '.' ? 'Home' : path }} &bull; Directory Lister</title>
<title>{{ title }} &bull; Directory Lister</title>
<div id="app" class="flex flex-col min-h-screen font-sans {{ config('dark_mode') ? 'dark-mode' : 'light-mode' }}">
{% block content %}{% endblock %}