diff --git a/src/__celerity_resource_map__.php b/src/__celerity_resource_map__.php index e2c8cd3510..4e1a6550e3 100644 --- a/src/__celerity_resource_map__.php +++ b/src/__celerity_resource_map__.php @@ -818,7 +818,7 @@ celerity_register_resource_map(array( ), 'aphront-multi-column-view-css' => array( - 'uri' => '/res/972551b3/rsrc/css/aphront/multi-column.css', + 'uri' => '/res/e01f5f0e/rsrc/css/aphront/multi-column.css', 'type' => 'css', 'requires' => array( @@ -3592,7 +3592,7 @@ celerity_register_resource_map(array( ), 'phame-css' => array( - 'uri' => '/res/8e3edb71/rsrc/css/application/phame/phame.css', + 'uri' => '/res/ba5a8cd8/rsrc/css/application/phame/phame.css', 'type' => 'css', 'requires' => array( @@ -3669,7 +3669,7 @@ celerity_register_resource_map(array( ), 'phui-feed-story-css' => array( - 'uri' => '/res/2fb3c729/rsrc/css/phui/phui-feed-story.css', + 'uri' => '/res/4dbcec0e/rsrc/css/phui/phui-feed-story.css', 'type' => 'css', 'requires' => array( diff --git a/src/applications/phame/controller/PhameController.php b/src/applications/phame/controller/PhameController.php index 002f987a11..125c97ba0f 100644 --- a/src/applications/phame/controller/PhameController.php +++ b/src/applications/phame/controller/PhameController.php @@ -36,44 +36,57 @@ abstract class PhameController extends PhabricatorController { $nodata) { assert_instances_of($posts, 'PhamePost'); - $list = id(new PhabricatorObjectItemListView()) - ->setUser($user) - ->setNoDataString($nodata); + $stories = array(); foreach ($posts as $post) { $blogger = $this->getHandle($post->getBloggerPHID())->renderLink(); + $bloggerURI = $this->getHandle($post->getBloggerPHID())->getURI(); + $bloggerImage = $this->getHandle($post->getBloggerPHID())->getImageURI(); $blog = null; if ($post->getBlog()) { $blog = $this->getHandle($post->getBlog()->getPHID())->renderLink(); } - $published = null; - if ($post->getDatePublished()) { - $published = phabricator_date($post->getDatePublished(), $user); + $phame_post = ''; + if ($post->getBody()) { + $phame_post = PhabricatorMarkupEngine::summarize($post->getBody()); } - $draft = $post->isDraft(); + $blog_view = $post->getViewURI(); + $phame_title = phutil_tag('a', array('href' => $blog_view), + $post->getTitle()); + + $blogger = phutil_tag('strong', array(), $blogger); + if ($post->isDraft()) { + $title = pht('%s drafted a blog post on %s.', + $blogger, $blog); + $title = phutil_tag('em', array(), $title); + } else { + $title = pht('%s wrote a blog post on %s.', + $blogger, $blog); + } $item = id(new PhabricatorObjectItemView()) ->setObject($post) ->setHeader($post->getTitle()) ->setHref($this->getApplicationURI('post/view/'.$post->getID().'/')); - if ($blog) { - $item->addAttribute($blog); - } + $story = id(new PHUIFeedStoryView()) + ->setTitle($title) + ->setImage($bloggerImage) + ->setImageHref($bloggerURI) + ->setAppIcon('phame-dark') + ->setUser($user) + ->setPontification($phame_post, $phame_title); - if ($draft) { - $desc = pht('Draft by %s', $blogger); - } else { - $desc = pht('Published on %s by %s', $published, $blogger); + if ($post->getDatePublished()) { + $story->setEpoch($post->getDatePublished()); } - $item->addAttribute($desc); - $list->addItem($item); + $stories[] = $story; } - return $list; + return $stories; } public function buildApplicationMenu() { diff --git a/src/applications/phame/controller/blog/PhameBlogViewController.php b/src/applications/phame/controller/blog/PhameBlogViewController.php index a7bac16ccb..2f38c1b0cf 100644 --- a/src/applications/phame/controller/blog/PhameBlogViewController.php +++ b/src/applications/phame/controller/blog/PhameBlogViewController.php @@ -48,6 +48,13 @@ final class PhameBlogViewController extends PhameController { $user, pht('This blog has no visible posts.')); + require_celerity_resource('phame-css'); + $post_list = id(new PHUIBoxView()) + ->addPadding(PHUI::PADDING_LARGE) + ->addClass('phame-post-list') + ->appendChild($post_list); + + $crumbs = $this->buildApplicationCrumbs(); $crumbs->addCrumb( id(new PhabricatorCrumbView()) diff --git a/src/applications/phame/controller/post/PhamePostListController.php b/src/applications/phame/controller/post/PhamePostListController.php index 4fda6ca5f2..8009333f7a 100644 --- a/src/applications/phame/controller/post/PhamePostListController.php +++ b/src/applications/phame/controller/post/PhamePostListController.php @@ -70,7 +70,12 @@ final class PhamePostListController extends PhameController { mpull($posts, 'getBlogPHID')); $this->loadHandles($handle_phids); + require_celerity_resource('phame-css'); $post_list = $this->renderPostList($posts, $user, $nodata); + $post_list = id(new PHUIBoxView()) + ->addPadding(PHUI::PADDING_LARGE) + ->addClass('phame-post-list') + ->appendChild($post_list); $crumbs = $this->buildApplicationCrumbs(); $crumbs->addCrumb( diff --git a/webroot/rsrc/css/application/phame/phame.css b/webroot/rsrc/css/application/phame/phame.css index 405791dae4..b6ac7fdecb 100644 --- a/webroot/rsrc/css/application/phame/phame.css +++ b/webroot/rsrc/css/application/phame/phame.css @@ -21,6 +21,10 @@ margin: 0px 0px 16px 0px; } +.device-desktop .phame-post-list { + max-width: 600px; +} + .blog-post-list { clear: left; float: left; diff --git a/webroot/rsrc/css/phui/phui-feed-story.css b/webroot/rsrc/css/phui/phui-feed-story.css index 1b92caf53a..fa17425a68 100644 --- a/webroot/rsrc/css/phui/phui-feed-story.css +++ b/webroot/rsrc/css/phui/phui-feed-story.css @@ -32,6 +32,7 @@ font-size: 11px; background: #f7f7f7; padding: 10px; + line-height: 14px; } .phui-feed-story-foot .phui-icon-view { @@ -41,18 +42,16 @@ } .phui-feed-story-bigtext-post { - font-size: 15px; - font-weight: 200; line-height: 18px; color: #444; } .phui-feed-story-bigtext-post h3 { - font-size: 24px; - font-weight: 100; + font-size: 18px; + font-weight: 200; line-height: 18px; - color: #444; - margin: 10px 0; + color: #39444f; + margin: 0 0 5px 0; } .phui-feed-token-bar {