diff --git a/externals/skins/oblivious/css/oblivious.css b/externals/skins/oblivious/css/oblivious.css --- a/externals/skins/oblivious/css/oblivious.css +++ b/externals/skins/oblivious/css/oblivious.css @@ -29,19 +29,18 @@ .oblivious-content { padding-top: 3%; margin-left: 22%; - max-width: 600px; + max-width: 800px; } a { - color: #222222; + color: #2980b9; text-decoration: none; } a:hover { - color: #a00000; + text-decoration: underline; } - h1 { font-size: 24px; font-weight: normal; @@ -50,37 +49,24 @@ h2 { font-size: 22px; font-weight: bold; + margin-bottom: 8px; } .phame-post { margin: 0 0 2em; } -.phame-post-date { - font-size: 12px; - margin: .25em 0 1em; -} - -.phame-post { - line-height: 1.6em; -} - -.phame-post p { - margin: 0 0 1em; +.phame-post-title { + font-size: 28px; } -.phame-post tt { - color: #333333; - background: #ebebeb; - padding: 0 .25em; - white-space: pre-wrap; +.phame-post-date { + font-size: 12px; + margin: .25em 0 2em; } -.phame-post .remarkup-code-block pre { - overflow: auto; - padding: 10px 10px; - border: 1px solid #dfdfdf; - background-color: #f8f8f8; +.oblivious-content .phabricator-remarkup ul.remarkup-list { + margin-left: 0; } .fb-comments, diff --git a/src/applications/phame/skins/PhameBasicBlogSkin.php b/src/applications/phame/skins/PhameBasicBlogSkin.php --- a/src/applications/phame/skins/PhameBasicBlogSkin.php +++ b/src/applications/phame/skins/PhameBasicBlogSkin.php @@ -16,6 +16,7 @@ $this->uriPath = $uri_path; return $this; } + public function getURIPath() { return $this->uriPath; } @@ -24,6 +25,7 @@ $this->oGType = $og_type; return $this; } + protected function getOGType() { return $this->oGType; } @@ -32,6 +34,7 @@ $this->description = $description; return $this; } + protected function getDescription() { return $this->description; } @@ -40,13 +43,12 @@ $this->title = $title; return $this; } + protected function getTitle() { return $this->title; } - public function processRequest() { - $request = $this->getRequest(); - + public function handleRequest(AphrontRequest $request) { $content = $this->renderContent($request); if (!$content) { @@ -69,7 +71,6 @@ $view->setFrameable(true); } - $view->appendChild($content); $response = new AphrontWebpageResponse(); @@ -222,7 +223,7 @@ * @task internal */ protected function renderContent(AphrontRequest $request) { - $user = $request->getUser(); + $viewer = $request->getViewer(); $matches = null; $path = $request->getPath(); @@ -233,7 +234,7 @@ $this->setURIPath(''); if (preg_match('@^/post/(?P.*)$@', $path, $matches)) { $post = id(new PhamePostQuery()) - ->setViewer($user) + ->setViewer($viewer) ->withBlogPHIDs(array($this->getBlog()->getPHID())) ->withPhameTitles(array($matches['name'])) ->executeOne(); @@ -263,7 +264,7 @@ $pager->setPageSize($this->getPageSize()); $posts = id(new PhamePostQuery()) - ->setViewer($user) + ->setViewer($viewer) ->withBlogPHIDs(array($this->getBlog()->getPHID())) ->executeWithCursorPager($pager); @@ -280,10 +281,10 @@ private function buildPostViews(array $posts) { assert_instances_of($posts, 'PhamePost'); - $user = $this->getRequest()->getUser(); + $viewer = $this->getViewer(); $engine = id(new PhabricatorMarkupEngine()) - ->setViewer($user); + ->setViewer($viewer); $phids = array(); foreach ($posts as $post) { @@ -294,7 +295,7 @@ } $handles = id(new PhabricatorHandleQuery()) - ->setViewer($user) + ->setViewer($viewer) ->withPHIDs($phids) ->execute(); @@ -303,7 +304,7 @@ $views = array(); foreach ($posts as $post) { $view = id(new PhamePostView()) - ->setUser($user) + ->setUser($viewer) ->setSkin($this) ->setPost($post) ->setBody($engine->getOutput($post, PhamePost::MARKUP_FIELD_BODY)) diff --git a/src/applications/phame/skins/PhameBasicTemplateBlogSkin.php b/src/applications/phame/skins/PhameBasicTemplateBlogSkin.php --- a/src/applications/phame/skins/PhameBasicTemplateBlogSkin.php +++ b/src/applications/phame/skins/PhameBasicTemplateBlogSkin.php @@ -27,15 +27,26 @@ } $map = CelerityResourceMap::getNamedInstance('phabricator'); - $resource_symbol = 'syntax-highlighting-css'; - $resource_uri = $map->getURIForSymbol($resource_symbol); + $highlight_symbol = 'syntax-highlighting-css'; + $highlight_uri = $map->getURIForSymbol($highlight_symbol); $this->cssResources[] = phutil_tag( 'link', array( 'rel' => 'stylesheet', 'type' => 'text/css', - 'href' => PhabricatorEnv::getCDNURI($resource_uri), + 'href' => PhabricatorEnv::getCDNURI($highlight_uri), + )); + + $remarkup_symbol = 'phabricator-remarkup-css'; + $remarkup_uri = $map->getURIForSymbol($remarkup_symbol); + + $this->cssResources[] = phutil_tag( + 'link', + array( + 'rel' => 'stylesheet', + 'type' => 'text/css', + 'href' => PhabricatorEnv::getCDNURI($remarkup_uri), )); $this->cssResources = phutil_implode_html("\n", $this->cssResources); diff --git a/src/applications/phame/view/PhamePostView.php b/src/applications/phame/view/PhamePostView.php --- a/src/applications/phame/view/PhamePostView.php +++ b/src/applications/phame/view/PhamePostView.php @@ -87,7 +87,7 @@ return phutil_tag( 'div', array( - 'class' => 'phame-post-body', + 'class' => 'phame-post-body phabricator-remarkup', ), $this->getBody()); } @@ -96,7 +96,7 @@ return phutil_tag( 'div', array( - 'class' => 'phame-post-body', + 'class' => 'phame-post-body phabricator-remarkup', ), $this->getSummary()); }