-
Notifications
You must be signed in to change notification settings - Fork 0
/
sunya-blog-start.html
18 lines (18 loc) · 1.3 KB
/
sunya-blog-start.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php $this->yellow->layout("header") ?>
<main>
<?php if ($this->yellow->page->get("blogWithFilter")): ?>
<h2><?php echo $this->yellow->page->getHtml("titleContent") ?></h2>
<?php endif ?>
<?php foreach ($this->yellow->page->getPages("blog")->paginate($this->yellow->system->get("blogPaginationLimit")) as $page): ?>
<?php $page->set("entryClass", "entry") ?>
<article class="<?php echo $page->getHtml("entryClass") ?>">
<header>
<h2><a href="<?php echo $page->getLocation(true) ?>"><?php echo $page->getHtml("title") ?></a></h2>
<p><time><?php echo $page->getDateHtml("published") ?></time> <?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->toolbox->normaliseArguments("author:$author")."\">".htmlspecialchars($author)."</a>"; } ?></p>
</header>
<?php echo $this->yellow->toolbox->createTextDescription($page->getContent(), 0, false, "<!--more-->", "<a href=\"".$page->getLocation(true)."\">".$this->yellow->language->getTextHtml("blogMore")."</a>") ?>
</article>
<?php endforeach ?>
<?php $this->yellow->layout("pagination", $this->yellow->page->getPages("blog")) ?>
</main>
<?php $this->yellow->layout("footer") ?>