3376697f75e6b7008b44fa05e8654ddcdd1d14c9
[stouyapi.git] / data / templates / discover.tpl.php
1 <?xml version="1.0" encoding="utf-8"?>
2 <html xmlns="http://www.w3.org/1999/xhtml">
3  <head>
4   <title>OUYA: <?= htmlspecialchars($title); ?></title>
5   <meta name="generator" content="stouyapi"/>
6   <link rel="stylesheet" type="text/css" href="../ouya-discover.css"/>
7  </head>
8  <body class="discover">
9   <header>
10    <h1><?= htmlspecialchars($title); ?></h1>
11    <img class="ouyalogo" src="../ouya-logo.grey.svg" alt="OUYA logo" width="20%"/>
12   </header>
13
14   <?php foreach ($sections as $section): ?>
15   <section class="row">
16    <?php if ($section->title): ?>
17    <h2><?= htmlspecialchars($section->title) ?></h2>
18    <?php endif ?>
19
20    <div class="tiles">
21     <?php foreach ($section->tiles as $tile): ?>
22     <section class="tile<?= ($tile->thumb == '') ? ' noimg' : '' ?>">
23      <h3 class="title"><a href="<?= htmlspecialchars($tile->detailUrl) ?>"><?= htmlspecialchars($tile->title) ?></a></h3>
24      <?php if ($tile->thumb != ''): ?>
25      <a href="<?= htmlspecialchars($tile->detailUrl) ?>"><img src="<?= htmlspecialchars($tile->thumb) ?>"/></a>
26      <?php endif ?>
27      <?php if ($tile->type == 'app' && $tile->ratingCount > 0): ?>
28      <p class="rating">
29       <span class="average average-<?= round($tile->rating) ?>"><?= $tile->rating ?></span>
30       <span class="count">(<?= $tile->ratingCount ?>)</span>
31      </p>
32      <?php endif ?>
33     </section>
34     <?php endforeach; ?>
35    </div>
36
37   </section>
38   <?php endforeach; ?>
39
40   <nav>
41    <?php foreach ($navLinks as $url => $title): ?>
42     <a rel="up" href="<?= htmlspecialchars($url) ?>"><?= htmlspecialchars($title) ?></a>
43    <?php endforeach ?>
44   </nav>
45  </body>
46 </html>