private function buildPhameHeader(PhameBlog $blog) { $image = null; if ($blog->getHeaderImagePHID()) { $image = phutil_tag('div', array('class' => 'phame-header-hero'), phutil_tag('img', array('src' => $blog->getHeaderImageURI(), 'class' => 'phame-header-image'))); } $title = phutil_tag_div('phame-header-title', $blog->getName()); $subtitle = null; if ($blog->getSubtitle()) { $subtitle = phutil_tag_div('phame-header-subtitle', $blog->getSubtitle()); } return phutil_tag_div('phame-mega-header', array($image, $title, $subtitle)); }
private function renderDescription(PhameBlog $blog, PhabricatorUser $viewer) { require_celerity_resource('phame-css'); if (strlen($blog->getDescription())) { $description = PhabricatorMarkupEngine::renderOneObject(id(new PhabricatorMarkupOneOff())->setContent($blog->getDescription()), 'default', $viewer); } else { $description = phutil_tag('em', array(), pht('No description.')); } $picture = $blog->getProfileImageURI(); $description = phutil_tag_div('phame-blog-description-content', $description); $image = phutil_tag('div', array('class' => 'phame-blog-description-image', 'style' => 'background-image: url(' . $picture . ');')); $header = phutil_tag('div', array('class' => 'phame-blog-description-name'), pht('About %s', $blog->getName())); $view = phutil_tag('div', array('class' => 'phame-blog-description'), array($image, $header, $description)); return $view; }