Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@pmoralesgarcia
Created March 19, 2023 04:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pmoralesgarcia/7be6da3f4a0914388d1c1d53d9c9644c to your computer and use it in GitHub Desktop.
Save pmoralesgarcia/7be6da3f4a0914388d1c1d53d9c9644c to your computer and use it in GitHub Desktop.
<?php $this->yellow->layout("header") ?>
<div class="content">
<div class="main h-entry" role="main">
<?php if ($this->yellow->page->get("blogWithFilter")): ?>
<h1><?php echo $this->yellow->page->getHtml("titleContent") ?></h1>
<?php endif ?>
<?php foreach ($this->yellow->page->getPages("blog")->paginate($this->yellow->system->get("blogPaginationLimit")) as $page): ?>
<?php $page->set("entryClass", "entry") ?>
<?php if ($page->isExisting("tag")): ?>
<?php foreach (preg_split("/\s*,\s*/", $page->get("tag")) as $tag) { $page->set("entryClass", $page->get("entryClass")." tag-".$this->yellow->lookup->normaliseArguments($tag, false)); } ?>
<?php endif ?>
<div class="<?php echo $page->getHtml("entryClass") ?>">
<div class="entry-title"><h1><a class="u-url" href="<?php echo $page->getLocation(true) ?>"><?php echo $page->getHtml("title") ?></a></h1></div>
<div class="entry-meta"><span class="dt-published"><?php echo $page->getDateHtml("published") ?></span> <span><?php echo $this->yellow->language->getTextHtml("blogBy") ?> <span class="p-author h-card"><?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>"; } ?></span></span></div>
<div class="entry-content e-content"><?php echo $this->yellow->toolbox->createTextDescription($page->getContent(), 0, false, "<!--more-->", "<a href=\"".$page->getLocation(true)."\">".$this->yellow->language->getTextHtml("blogMore")."</a>") ?></div>
</div>
<?php endforeach ?>
<?php $this->yellow->layout("pagination", $this->yellow->page->getPages("blog")) ?>
</div>
</div>
<?php $this->yellow->layout("footer") ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment