ignore html marking single char constants
[mdref/mdref] / views / index.phtml
index acab9e27e026f215aa44922877d3da0819f7a57f..db2accd3867eaf8ee18a9cac969e06e34bb1c55e 100644 (file)
@@ -1,16 +1,22 @@
+
 <h1>mdref</h1>
 
 <?php if (isset($html)) : ?>
        <?= $html ?>
 <?php elseif (isset($text)) : ?>
+
        <p style="white-space:pre-wrap"><?= $esc($text) ?></p>
 <?php elseif (isset($refs)) : ?>
        <?php foreach ($refs as $repo) : /* @var \mdref\Repo $repo */ ?>
                <?php foreach ($repo as $entry) : /* @var \mdref\Entry $entry */ ?>
-               <h2>
+
+               <h2 id="<?= $anchor($entry->getTitle()) ?>">
                        <a href="<?= $esc($entry->getName()) ?>"
                        ><?= $esc($entry->getTitle()) ?></a></h2>
                <div><?= $quick($entry->getIntro()) ?></div>
+                       <?php if ($repo->hasStub($stub)) : ?>
+                               <?php include __DIR__ . "/stub.phtml"; ?>
+                       <?php endif; ?>
                <?php endforeach; ?>
        <?php endforeach; ?>
-<?php endif; ?>
\ No newline at end of file
+<?php endif; ?>