Skip to content

Instantly share code, notes, and snippets.

@Kolin
Created May 14, 2015 15:10
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 Kolin/a8d98c0230208a12badd to your computer and use it in GitHub Desktop.
Save Kolin/a8d98c0230208a12badd to your computer and use it in GitHub Desktop.
<?php class source extends Mustache_Template {
private $lambdaHelper;
public function renderInternal(Mustache_Context $context, $indent = '') {
$this->lambdaHelper = new Mustache_LambdaHelper($this->mustache, $context);
$buffer = '';
$buffer .= $indent . '<div class="page" id="page">';
$buffer .= "\n";
if ($partial = $this->mustache->loadPartial('organisms-header')) {
$buffer .= $partial->renderInternal($context, ' ');
}
$buffer .= $indent . ' <div role="main">';
$buffer .= "\n";
// 'emergency' section
$buffer .= $this->section39d860dc84c844098422da12fcdf9731($context, $indent, $context->find('emergency'));
// 'hero' section
$buffer .= $this->section9bf51d945db779472911a5ef8adf0d05($context, $indent, $context->find('hero'));
$buffer .= "\n";
$buffer .= $indent . ' <div class="g g-3up">';
$buffer .= "\n";
// 'touts' section
$buffer .= $this->section8321200e3be8e7ccf9c804df8cd75fb5($context, $indent, $context->find('touts'));
$buffer .= $indent . ' </div><!--end 3up-->';
$buffer .= "\n";
$buffer .= "\n";
$buffer .= $indent . ' <hr />';
$buffer .= "\n";
$buffer .= "\n";
$buffer .= $indent . ' <div class="l-two-col">';
$buffer .= "\n";
$buffer .= $indent . ' <div class="l-main">';
$buffer .= "\n";
$buffer .= $indent . ' <section class="section latest-posts">';
$buffer .= "\n";
$buffer .= $indent . ' <h2 class="section-title">Latest Posts</h2>';
$buffer .= "\n";
$buffer .= $indent . ' <ul class="post-list">';
$buffer .= "\n";
// 'latest-posts' section
$buffer .= $this->section2306b046fc73eb451d1ef7fb716d182c($context, $indent, $context->find('latest-posts'));
$buffer .= $indent . ' </ul>';
$buffer .= "\n";
$buffer .= $indent . ' <a href="#" class="text-btn">View more posts</a>';
$buffer .= "\n";
$buffer .= $indent . ' </section>';
$buffer .= "\n";
$buffer .= $indent . ' </div><!--end .l-main-->';
$buffer .= "\n";
$buffer .= "\n";
$buffer .= $indent . ' <div class="l-sidebar">';
$buffer .= "\n";
if ($partial = $this->mustache->loadPartial('organisms-recent-tweets')) {
$buffer .= $partial->renderInternal($context, ' ');
}
$buffer .= $indent . ' </div><!--end .l-sidebar-->';
$buffer .= "\n";
$buffer .= $indent . ' </div><!--end .l-two-col-->';
$buffer .= "\n";
$buffer .= $indent . ' </div><!--End role=main-->';
$buffer .= "\n";
if ($partial = $this->mustache->loadPartial('organisms-footer')) {
$buffer .= $partial->renderInternal($context, ' ');
}
$buffer .= $indent . '</div>';
return $buffer;
}
private function section39d860dc84c844098422da12fcdf9731(Mustache_Context $context, $indent, $value) {
$buffer = '';
if (!is_string($value) && is_callable($value)) {
$source = ' {{> molecules-alert:error }} ';
$buffer .= $this->mustache->loadLambda((string) call_user_func($value, $source, $this->lambdaHelper))
->renderInternal($context, $indent);
}
elseif (!empty($value)) {
$values = $this->isIterable($value) ? $value : array($value);
foreach ($values as $value) {
$context->push($value);
if ($partial = $this->mustache->loadPartial('molecules-alert:error')) {
$buffer .= $partial->renderInternal($context, ' ');
}
$context->pop();
}
}
return $buffer;
}
private function section9bf51d945db779472911a5ef8adf0d05(Mustache_Context $context, $indent, $value) {
$buffer = '';
if (!is_string($value) && is_callable($value)) {
$source = ' {{> molecules-block-hero }} ';
$buffer .= $this->mustache->loadLambda((string) call_user_func($value, $source, $this->lambdaHelper))
->renderInternal($context, $indent);
}
elseif (!empty($value)) {
$values = $this->isIterable($value) ? $value : array($value);
foreach ($values as $value) {
$context->push($value);
if ($partial = $this->mustache->loadPartial('molecules-block-hero')) {
$buffer .= $partial->renderInternal($context, ' ');
}
$context->pop();
}
}
return $buffer;
}
private function section8321200e3be8e7ccf9c804df8cd75fb5(Mustache_Context $context, $indent, $value) {
$buffer = '';
if (!is_string($value) && is_callable($value)) {
$source = ' <div class="gi"> {{> molecules-block-inset }} </div> ';
$buffer .= $this->mustache->loadLambda((string) call_user_func($value, $source, $this->lambdaHelper))
->renderInternal($context, $indent);
}
elseif (!empty($value)) {
$values = $this->isIterable($value) ? $value : array($value);
foreach ($values as $value) {
$context->push($value);
$buffer .= $indent . ' <div class="gi">';
$buffer .= "\n";
if ($partial = $this->mustache->loadPartial('molecules-block-inset')) {
$buffer .= $partial->renderInternal($context, ' ');
}
$buffer .= $indent . ' </div>';
$buffer .= "\n";
$context->pop();
}
}
return $buffer;
}
private function section2306b046fc73eb451d1ef7fb716d182c(Mustache_Context $context, $indent, $value) {
$buffer = '';
if (!is_string($value) && is_callable($value)) {
$source = ' <li>{{> molecules-media-block }}</li> ';
$buffer .= $this->mustache->loadLambda((string) call_user_func($value, $source, $this->lambdaHelper))
->renderInternal($context, $indent);
}
elseif (!empty($value)) {
$values = $this->isIterable($value) ? $value : array($value);
foreach ($values as $value) {
$context->push($value);
$buffer .= $indent . ' <li>';
if ($partial = $this->mustache->loadPartial('molecules-media-block')) {
$buffer .= $partial->renderInternal($context, '');
}
$buffer .= '</li>';
$buffer .= "\n";
$context->pop();
}
}
return $buffer;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment