From 4c3241349ebdc2e9c1270c12e110cdc19c4ce707 Mon Sep 17 00:00:00 2001 From: Madeorsk Date: Sun, 24 Feb 2019 14:52:23 +0100 Subject: [PATCH] Add poll question in page title. --- views/layout.php | 2 +- webroot/index.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/views/layout.php b/views/layout.php index 3bbd478..0741949 100644 --- a/views/layout.php +++ b/views/layout.php @@ -4,7 +4,7 @@ - Poll Verlaine + Poll Verlaine<?= isset($title) ? " - ".$title : "" ?> /static/css/main.css" /> diff --git a/webroot/index.php b/webroot/index.php index b86ec95..ecfcb8b 100644 --- a/webroot/index.php +++ b/webroot/index.php @@ -38,7 +38,7 @@ Flight::route("HEAD|GET /polls/@id:[a-fA-F0-9]+", function ($id) { { Flight::render("poll", ["app_url" => $VERLAINE["app_url"], "poll" => $poll], "body_content"); Flight::render("opengraph", ["poll" => $poll, "app_url" => $VERLAINE["app_url"]], "head"); - Flight::render("layout"); + Flight::render("layout", ["title" => $poll->title]); } } } @@ -107,7 +107,7 @@ Flight::route("HEAD|GET /polls/@id:[a-fA-F0-9]+/results", function ($id) { Flight::render("svg/results", ["poll" => $poll, "colors" => $VERLAINE["chart_colors"]], "results_chart"); Flight::render("results", ["poll" => $poll, "chart_colors" => $VERLAINE["chart_colors"]], "body_content"); Flight::render("opengraph", ["poll" => $poll, "app_url" => $VERLAINE["app_url"]], "head"); - Flight::render("layout"); + Flight::render("layout", ["title" => $poll->title]); } } else