@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Clean up Oblivious skin

Summary: Adds Remarkup rules and CSS, cleans up some spacing a color. Ref T9546

Test Plan: Review a blog post list, and a blog

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9546

Differential Revision: https://secure.phabricator.com/D14421

+39 -41
+11 -25
externals/skins/oblivious/css/oblivious.css
··· 29 29 .oblivious-content { 30 30 padding-top: 3%; 31 31 margin-left: 22%; 32 - max-width: 600px; 32 + max-width: 800px; 33 33 } 34 34 35 35 a { 36 - color: #222222; 36 + color: #2980b9; 37 37 text-decoration: none; 38 38 } 39 39 40 40 a:hover { 41 - color: #a00000; 41 + text-decoration: underline; 42 42 } 43 - 44 43 45 44 h1 { 46 45 font-size: 24px; ··· 50 49 h2 { 51 50 font-size: 22px; 52 51 font-weight: bold; 52 + margin-bottom: 8px; 53 53 } 54 54 55 55 .phame-post { 56 56 margin: 0 0 2em; 57 57 } 58 58 59 - .phame-post-date { 60 - font-size: 12px; 61 - margin: .25em 0 1em; 62 - } 63 - 64 - .phame-post { 65 - line-height: 1.6em; 66 - } 67 - 68 - .phame-post p { 69 - margin: 0 0 1em; 59 + .phame-post-title { 60 + font-size: 28px; 70 61 } 71 62 72 - .phame-post tt { 73 - color: #333333; 74 - background: #ebebeb; 75 - padding: 0 .25em; 76 - white-space: pre-wrap; 63 + .phame-post-date { 64 + font-size: 12px; 65 + margin: .25em 0 2em; 77 66 } 78 67 79 - .phame-post .remarkup-code-block pre { 80 - overflow: auto; 81 - padding: 10px 10px; 82 - border: 1px solid #dfdfdf; 83 - background-color: #f8f8f8; 68 + .oblivious-content .phabricator-remarkup ul.remarkup-list { 69 + margin-left: 0; 84 70 } 85 71 86 72 .fb-comments,
+12 -11
src/applications/phame/skins/PhameBasicBlogSkin.php
··· 16 16 $this->uriPath = $uri_path; 17 17 return $this; 18 18 } 19 + 19 20 public function getURIPath() { 20 21 return $this->uriPath; 21 22 } ··· 24 25 $this->oGType = $og_type; 25 26 return $this; 26 27 } 28 + 27 29 protected function getOGType() { 28 30 return $this->oGType; 29 31 } ··· 32 34 $this->description = $description; 33 35 return $this; 34 36 } 37 + 35 38 protected function getDescription() { 36 39 return $this->description; 37 40 } ··· 40 43 $this->title = $title; 41 44 return $this; 42 45 } 46 + 43 47 protected function getTitle() { 44 48 return $this->title; 45 49 } 46 50 47 - public function processRequest() { 48 - $request = $this->getRequest(); 49 - 51 + public function handleRequest(AphrontRequest $request) { 50 52 $content = $this->renderContent($request); 51 53 52 54 if (!$content) { ··· 68 70 if ($this->getPreview()) { 69 71 $view->setFrameable(true); 70 72 } 71 - 72 73 73 74 $view->appendChild($content); 74 75 ··· 222 223 * @task internal 223 224 */ 224 225 protected function renderContent(AphrontRequest $request) { 225 - $user = $request->getUser(); 226 + $viewer = $request->getViewer(); 226 227 227 228 $matches = null; 228 229 $path = $request->getPath(); ··· 233 234 $this->setURIPath(''); 234 235 if (preg_match('@^/post/(?P<name>.*)$@', $path, $matches)) { 235 236 $post = id(new PhamePostQuery()) 236 - ->setViewer($user) 237 + ->setViewer($viewer) 237 238 ->withBlogPHIDs(array($this->getBlog()->getPHID())) 238 239 ->withPhameTitles(array($matches['name'])) 239 240 ->executeOne(); ··· 263 264 $pager->setPageSize($this->getPageSize()); 264 265 265 266 $posts = id(new PhamePostQuery()) 266 - ->setViewer($user) 267 + ->setViewer($viewer) 267 268 ->withBlogPHIDs(array($this->getBlog()->getPHID())) 268 269 ->executeWithCursorPager($pager); 269 270 ··· 280 281 281 282 private function buildPostViews(array $posts) { 282 283 assert_instances_of($posts, 'PhamePost'); 283 - $user = $this->getRequest()->getUser(); 284 + $viewer = $this->getViewer(); 284 285 285 286 $engine = id(new PhabricatorMarkupEngine()) 286 - ->setViewer($user); 287 + ->setViewer($viewer); 287 288 288 289 $phids = array(); 289 290 foreach ($posts as $post) { ··· 294 295 } 295 296 296 297 $handles = id(new PhabricatorHandleQuery()) 297 - ->setViewer($user) 298 + ->setViewer($viewer) 298 299 ->withPHIDs($phids) 299 300 ->execute(); 300 301 ··· 303 304 $views = array(); 304 305 foreach ($posts as $post) { 305 306 $view = id(new PhamePostView()) 306 - ->setUser($user) 307 + ->setUser($viewer) 307 308 ->setSkin($this) 308 309 ->setPost($post) 309 310 ->setBody($engine->getOutput($post, PhamePost::MARKUP_FIELD_BODY))
+14 -3
src/applications/phame/skins/PhameBasicTemplateBlogSkin.php
··· 27 27 } 28 28 29 29 $map = CelerityResourceMap::getNamedInstance('phabricator'); 30 - $resource_symbol = 'syntax-highlighting-css'; 31 - $resource_uri = $map->getURIForSymbol($resource_symbol); 30 + $highlight_symbol = 'syntax-highlighting-css'; 31 + $highlight_uri = $map->getURIForSymbol($highlight_symbol); 32 + 33 + $this->cssResources[] = phutil_tag( 34 + 'link', 35 + array( 36 + 'rel' => 'stylesheet', 37 + 'type' => 'text/css', 38 + 'href' => PhabricatorEnv::getCDNURI($highlight_uri), 39 + )); 40 + 41 + $remarkup_symbol = 'phabricator-remarkup-css'; 42 + $remarkup_uri = $map->getURIForSymbol($remarkup_symbol); 32 43 33 44 $this->cssResources[] = phutil_tag( 34 45 'link', 35 46 array( 36 47 'rel' => 'stylesheet', 37 48 'type' => 'text/css', 38 - 'href' => PhabricatorEnv::getCDNURI($resource_uri), 49 + 'href' => PhabricatorEnv::getCDNURI($remarkup_uri), 39 50 )); 40 51 41 52 $this->cssResources = phutil_implode_html("\n", $this->cssResources);
+2 -2
src/applications/phame/view/PhamePostView.php
··· 87 87 return phutil_tag( 88 88 'div', 89 89 array( 90 - 'class' => 'phame-post-body', 90 + 'class' => 'phame-post-body phabricator-remarkup', 91 91 ), 92 92 $this->getBody()); 93 93 } ··· 96 96 return phutil_tag( 97 97 'div', 98 98 array( 99 - 'class' => 'phame-post-body', 99 + 'class' => 'phame-post-body phabricator-remarkup', 100 100 ), 101 101 $this->getSummary()); 102 102 }