Better title
authorChristian Weiske <cweiske@cweiske.de>
Sun, 17 May 2020 09:12:34 +0000 (11:12 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Sun, 17 May 2020 09:12:34 +0000 (11:12 +0200)
bin/build-html.php
data/templates/discover.tpl.php

index f7f915438d8bcff9b1fdc7b9a2c550277d2718f6..112a93d404cde1b575d3c5caad29b349e7d8525c 100755 (executable)
@@ -50,7 +50,7 @@ function renderDiscoverFile($discoverFile)
 {
     $json = json_decode(file_get_contents($discoverFile));
 
-    $title    = $json->title;
+    $title    = $json->title . ' OUYA games';
     $sections = [];
     foreach ($json->rows as $row) {
         $section = (object) [
@@ -89,8 +89,9 @@ function renderDiscoverFile($discoverFile)
     }
 
     $navLinks = [];
-    if ($title == 'DISCOVER') {
+    if ($json->title == 'DISCOVER') {
         $navLinks['../'] = 'back';
+        $title = 'OUYA games list';
     } else {
         $navLinks['./'] = 'discover';
     }
index 7f08c44f3a7b3807681b3cc16e823e45933e9c29..cd078ddb5a25a03b77c5424df5efb399ebb4e711 100644 (file)
@@ -2,14 +2,14 @@
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
  <head>
   <meta charset="utf-8"/>
-  <title>OUYA: <?= htmlspecialchars($title); ?></title>
+  <title><?= htmlspecialchars($title); ?></title>
   <meta name="generator" content="stouyapi"/>
   <link rel="stylesheet" type="text/css" href="../ouya-discover.css"/>
   <link rel="icon" href="../favicon.ico"/>
  </head>
  <body class="discover">
   <header>
-   <h1><?= htmlspecialchars($title); ?></h1>
+   <h1><?= htmlspecialchars($json->title); ?></h1>
    <img class="ouyalogo" src="../ouya-logo.grey.svg" alt="OUYA logo" width="50"/>
   </header>