move path creation to separate file
[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   <link rel="stylesheet" type="text/css" href="../ouya-discover.css"/>
6  </head>
7  <body class="discover">
8   <header>
9    <h1><?= htmlspecialchars($title); ?></h1>
10   </header>
11
12   <?php foreach ($sections as $section): ?>
13   <section class="row">
14    <?php if ($section->title): ?>
15    <h2><?= htmlspecialchars($section->title) ?></h2>
16    <?php endif ?>
17
18    <div class="tiles">
19     <?php foreach ($section->tiles as $tile): ?>
20     <section class="tile<?= ($tile->thumb == '') ? ' noimg' : '' ?>">
21      <h3 class="title"><a href="<?= htmlspecialchars($tile->detailUrl) ?>"><?= htmlspecialchars($tile->title) ?></a></h3>
22      <?php if ($tile->thumb != ''): ?>
23      <a href="<?= htmlspecialchars($tile->detailUrl) ?>"><img src="<?= htmlspecialchars($tile->thumb) ?>"/></a>
24      <?php endif ?>
25      <?php if ($tile->type == 'app' && $tile->ratingCount > 0): ?>
26      <p class="rating">
27       <span class="average average-<?= round($tile->rating) ?>"><?= $tile->rating ?></span>
28       <span class="count">(<?= $tile->ratingCount ?>)</span>
29      </p>
30      <?php endif ?>
31     </section>
32     <?php endforeach; ?>
33    </div>
34
35   </section>
36   <?php endforeach; ?>
37  </body>
38 </html>