Add "canonical" link to every html page
[stouyapi.git] / data / templates / discover.tpl.php
index 7f08c44f3a7b3807681b3cc16e823e45933e9c29..a13918b485cf50b2590718df1846babdcfea44ad 100644 (file)
@@ -2,15 +2,16 @@
 <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"/>
+  <link rel="canonical" href="<?= htmlspecialchars($canonicalUrl) ?>"/>
  </head>
  <body class="discover">
   <header>
-   <h1><?= htmlspecialchars($title); ?></h1>
-   <img class="ouyalogo" src="../ouya-logo.grey.svg" alt="OUYA logo" width="50"/>
+   <h1><?= htmlspecialchars($json->title); ?><?php if($subtitle) { echo ': ' . $subtitle; } ?></h1>
+   <a href="./"><img class="ouyalogo" src="../ouya-logo.grey.svg" alt="OUYA logo" width="50"/></a>
   </header>
 
   <?php foreach ($sections as $section): ?>