mikuli.cz

:)
git clone https://git.sr.ht/~ashymad/mikuli.cz
Log | Files | Refs

blog-start.html (1667B)


      1 <?php $this->yellow->layout("header") ?>
      2 <div class="content">
      3 <div class="main" role="main">
      4 <?php if ($this->yellow->page->get("blogWithFilter")): ?>
      5 <h1><?php echo $this->yellow->page->getHtml("titleContent") ?></h1>
      6 <?php endif ?>
      7 <?php $pages = $this->yellow->page->getPages("blog")->paginate($this->yellow->system->get("blogPaginationLimit")) ?>
      8 <?php foreach ($pages as $page): ?>
      9 <?php $page->set("entryClass", "entry") ?>
     10 <?php if ($page->isExisting("tag")): ?>
     11 <?php foreach (preg_split("/\s*,\s*/", $page->get("tag")) as $tag) { $page->set("entryClass", $page->get("entryClass")." tag-".$this->yellow->lookup->normaliseClass($tag)); } ?>
     12 <?php endif ?>
     13 <div class="<?php echo $page->getHtml("entryClass") ?>">
     14 <div class="entry-title"><h1><a href="<?php echo $page->getLocation(true) ?>"><?php echo $page->getHtml("title") ?></a></h1></div>
     15 <div class="entry-meta"><p><?php echo $page->getDateHtml("published") ?> <?php echo $this->yellow->language->getTextHtml("blogBy") ?> <?php $authorCounter = 0; foreach (preg_split("/\s*,\s*/", $page->get("author")) as $author) { if (++$authorCounter>1) echo ", "; echo "<a href=\"".$this->yellow->page->getLocation(true).$this->yellow->lookup->normaliseArguments("author:$author")."\">".htmlspecialchars($author)."</a>"; } ?></p></div>
     16 <div class="entry-content"><?php echo $this->yellow->toolbox->createTextDescription($page->getContentHtml(), 0, false, "<!--more-->", "<a href=\"".$page->getLocation(true)."\">".$this->yellow->language->getTextHtml("blogMore")."</a>") ?></div>
     17 </div>
     18 <?php endforeach ?>
     19 <?php $this->yellow->layout("pagination", $pages) ?>
     20 </div>
     21 </div>
     22 <?php $this->yellow->layout("footer") ?>