stub file generation
[mdref/mdref] / views / index.phtml
1
2 <h1>mdref</h1>
3
4 <?php if (isset($html)) : ?>
5 <?= $html ?>
6 <?php elseif (isset($text)) : ?>
7
8 <p style="white-space:pre-wrap"><?= $esc($text) ?></p>
9 <?php elseif (isset($refs)) : ?>
10 <?php foreach ($refs as $repo) : /* @var \mdref\Repo $repo */ ?>
11 <?php foreach ($repo as $entry) : /* @var \mdref\Entry $entry */ ?>
12
13 <h2 id="<?= $anchor($entry->getTitle()) ?>">
14 <a href="<?= $esc($entry->getName()) ?>"
15 ><?= $esc($entry->getTitle()) ?></a></h2>
16 <div><?= $quick($entry->getIntro()) ?></div>
17 <?php if ($repo->hasStub($stub)) : ?>
18 <div>
19 <p><strong>Download the Stub file:</strong></p>
20 <ul style="list-style-type: '&raquo;'">
21 <li>
22 <a href="stub?ref=<?= $entry->getName() ?>"><?= $entry->getName() ?>.stub.php</a><br>
23 <small>
24 Last modified:
25 <?= date_create("@".filemtime($stub))->format("Y-m-d H:i:s") ?>
26 </small>
27 </li>
28 </ul>
29 </div>
30 <?php endif; ?>
31 <?php endforeach; ?>
32 <?php endforeach; ?>
33 <?php endif; ?>