From bc125c32a27ceb2506ad4a3b3939e5b7c04b858f Mon Sep 17 00:00:00 2001 From: Marty Wallace Date: Mon, 16 Mar 2015 17:25:02 +1100 Subject: [PATCH] Bug fix where template wasn't found via URI. --- html/home.html | 2 +- sass/app.scss | 5 ----- server/tempest/Tempest/Tempest.php | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/html/home.html b/html/home.html index f6e9773..2bc0322 100644 --- a/html/home.html +++ b/html/home.html @@ -3,7 +3,7 @@ {% extends '_layouts/main.html' %} {% block body %} -
+

Ivan Aivazovsky - The Tempest

Success!

diff --git a/sass/app.scss b/sass/app.scss index d4707ae..bea9401 100644 --- a/sass/app.scss +++ b/sass/app.scss @@ -8,11 +8,6 @@ body { .content { padding: 40px 20px; -} - -#intro { - padding: 40px 20px; - text-align: center; img { border-radius: 3px; diff --git a/server/tempest/Tempest/Tempest.php b/server/tempest/Tempest/Tempest.php index 1bc065c..3959b7d 100644 --- a/server/tempest/Tempest/Tempest.php +++ b/server/tempest/Tempest/Tempest.php @@ -119,7 +119,7 @@ public function start() { // Let's peek at what templates are available in /html/. If we find one with a name that // matches the request, let's use it! - $template = REQUEST_URI === '/' ? 'home' : preg_replace(Path::PATTERN_SLASHES, '-',REQUEST_URI); + $template = REQUEST_URI === '/' ? 'home' : trim(preg_replace(Path::PATTERN_SLASHES, '-',REQUEST_URI), '-'); $twigResponse = $this->twig->render($template . '.html'); if ($twigResponse !== null)