Unify domain names in README
[stouyapi.git] / data / templates / discover.tpl.php
1 <!DOCTYPE html>
2 <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
3  <head>
4   <meta charset="utf-8"/>
5   <title><?= htmlspecialchars($title); ?></title>
6   <meta name="generator" content="stouyapi"/>
7   <link rel="stylesheet" type="text/css" href="../ouya-discover.css"/>
8   <link rel="icon" href="../favicon.ico"/>
9   <link rel="canonical" href="<?= htmlspecialchars($canonicalUrl) ?>"/>
10  </head>
11  <body class="discover">
12   <header>
13    <h1><?= htmlspecialchars($json->title); ?><?php if($subtitle) { echo ': ' . $subtitle; } ?></h1>
14    <a href="./"><img class="ouyalogo" src="../ouya-logo.grey.svg" alt="OUYA logo" width="50"/></a>
15   </header>
16
17   <?php foreach ($sections as $section): ?>
18   <section class="row">
19    <?php if ($section->title): ?>
20    <h2><?= htmlspecialchars($section->title) ?></h2>
21    <?php endif ?>
22
23    <div class="tiles">
24     <?php foreach ($section->tiles as $tile): ?>
25     <section class="tile<?= ($tile->thumb == '') ? ' noimg' : '' ?>">
26      <h3 class="title"><a href="<?= htmlspecialchars($tile->detailUrl) ?>"><?= htmlspecialchars($tile->title) ?></a></h3>
27      <?php if ($tile->thumb != ''): ?>
28      <a href="<?= htmlspecialchars($tile->detailUrl) ?>"><img src="<?= htmlspecialchars($tile->thumb) ?>" alt="Screenshot of <?= htmlspecialchars($tile->title) ?>" width="732" height="412"/></a>
29      <?php endif ?>
30      <?php if ($tile->type == 'app' && $tile->ratingCount > 0): ?>
31      <p class="rating">
32       <span class="average average-<?= round($tile->rating) ?>"><?= $tile->rating ?></span>
33       <span class="count">(<?= $tile->ratingCount ?>)</span>
34      </p>
35      <?php endif ?>
36     </section>
37     <?php endforeach; ?>
38    </div>
39
40   </section>
41   <?php endforeach; ?>
42
43   <nav>
44    <?php foreach ($navLinks as $url => $title): ?>
45     <a rel="up" href="<?= htmlspecialchars($url) ?>"><?= htmlspecialchars($title) ?></a>
46    <?php endforeach ?>
47   </nav>
48  </body>
49 </html>