public function show() { // sitemap $this->controller->setView('SitemapView'); $sitemap = $this->controller->display(); // legal notice $left = array_key_exists('legal_notice', $this->config) ? $this->config['legal_notice'] : ''; $left = '<div class="col-md-6 col-md-offset-2"><p>' . $left . '</p></div>'; $right = '<div class="col-md-2"><p class="pull-right"><a href="#">Back to top</a></p></div>'; // social $social = ''; $general = Config::getInstance()->getGeneralArray('general'); if (array_key_exists('social', $general) && $general['social']) { $buttons = Social::getInstance()->socialButtons('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], Head::getInstance()->getTitle()); $span = floor(6 / count($buttons)); foreach ($buttons as $b) { $social .= '<div class="col-xs-2 col-md-' . $span . ' text-center">' . $b . '</div>'; } $x = floor((8 - count($buttons)) / 2); $social = '<div class="row"><div class="col-md-offset-2 col-md-' . $x . '"></div>' . $social . '</div>'; } // powered by $poweredby = ''; if (isset($this->config['poweredby'])) { $poweredby = '<p class="poweredby text-center">' . $this->config['poweredby'] . '</p>'; $poweredby = '<div class="row"><div class="col-md-8 col-md-offset-2">' . $poweredby . '</div></div>'; } // put it together return $sitemap . '<div class="footer-inner row">' . $left . $right . '</div>' . $social . $poweredby; }
public function markup(Markup $model, $arg) { $body = '<div class="preview"><div class="text">' . $model->parse($arg) . '</div></div>'; $body = '<div class="row content-item"><div class="col-md-12">' . $body . '</div></div>'; if (array_key_exists('static', $model->config) && $model->config['static']) { $href = Config::getInstance()->app_root . $model->config['static'] . '/' . preg_replace('/\\.[^.\\s]{2,4}$/', '', basename($model->config['path'])); // social $social = ''; $general = Config::getInstance()->getGeneralArray('general'); // TODO description if (array_key_exists('social', $general) && $general['social']) { $buttons = Social::getInstance()->socialButtons('https://' . $_SERVER['HTTP_HOST'] . $href, Head::getInstance()->getTitle()); $span = floor(6 / count($buttons)); foreach ($buttons as $b) { $social .= '<div class="col-xs-2 col-md-' . $span . ' text-center">' . $b . '</div>'; } } $static = '<a class="btn" href="' . $href . '">More <i class="fa fa-angle-double-right"></i></a>'; $body .= '<div class="row socials"><div class="col-md-5"><div class="row">' . $social . '</div></div><div class="col-md-7 text-right">' . $static . '</div></div>'; } return self::head($model->parseTags($model->config['path'])) . $body; }
public function markup(Markup $model, $arg, $bool) { // parse head $head = ''; $tags = $model->parseTags(); if (!empty($tags)) { $left = ''; if (isset($tags['published'])) { $left .= $tags['published']; } if (isset($tags['author'])) { $left = $left ? $left . ' | ' . $tags['author'] : $tags['author']; } $left = $left ? '<div class="col-md-7"><p>' . $left . '</p></div>' : ''; $right = ''; if (isset($tags['category'])) { $href = Config::getInstance()->app_root . URLs::getInstance()->getURI() . '?' . QueryString::removeAll(['tag', 'page'], $_SERVER['QUERY_STRING']); foreach ($tags['category'] as $c) { $right .= ' | <a href="' . $href . '&tag=' . $c . '">#' . trim($c) . '</a>'; // $right .= ' | #' . trim($c); } $right = '<div class="col-md-5 pull-right text-right">' . substr($right, 3) . '</div>'; } $head = $left . $right ? '<div class="row content-head">' . $left . $right . '</div>' : ''; } // parse body $body = '<div class="row content-body"><div class="col-md-12">' . $model->parse($arg) . '</div></div>'; if (array_key_exists('static', $model->config) && $model->config['static']) { $href = Config::getInstance()->app_root . URLs::getInstance()->getURI() . '/' . preg_replace('/\\.[^.\\s]{2,4}$/', '', basename($model->config['path'])); // social $social = ''; $general = Config::getInstance()->getGeneralArray('general'); // TODO description if (array_key_exists('social', $general) && $general['social']) { $buttons = Social::getInstance()->socialButtons('https://' . $_SERVER['HTTP_HOST'] . $href, Head::getInstance()->getTitle()); $span = floor(6 / count($buttons)); foreach ($buttons as $b) { $social .= '<div class="col-xs-2 col-md-' . $span . ' text-center">' . $b . '</div>'; } } $static = '<a class="btn btn-default" href="' . $href . '" role="button">Static <i class="fa fa-share-alt"></i></a>'; $body .= '<div class="row content-foot"><div class="col-md-5"><div class="row">' . $social . '</div></div><div class="col-md-7 text-right">' . $static . '</div></div>'; } return '<div class="row content-item"><div class="col-md-12">' . $head . $body . '</div></div>'; }