@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.

Add basic support for Phame blog headers

Summary: Fixes T10901. Allows blogs to have headers. I've built this in a basic way, any file, max-height is 240. Should bleed into top crumbs, so any spacing you want you should add to the file itself. Might have to see how users break this.

Test Plan: Set a blog header, see blog header, remove blog header, see no blog header. Check mobile, tablet, desktop break points.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T10901

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

+40 -6
+4 -4
resources/celerity/map.php
··· 81 81 'rsrc/css/application/owners/owners-path-editor.css' => '2f00933b', 82 82 'rsrc/css/application/paste/paste.css' => '1898e534', 83 83 'rsrc/css/application/people/people-profile.css' => '2473d929', 84 - 'rsrc/css/application/phame/phame.css' => 'b78f5f1e', 84 + 'rsrc/css/application/phame/phame.css' => '19ba0afc', 85 85 'rsrc/css/application/pholio/pholio-edit.css' => '07676f51', 86 86 'rsrc/css/application/pholio/pholio-inline-comments.css' => '8e545e49', 87 87 'rsrc/css/application/pholio/pholio.css' => 'ca89d380', ··· 128 128 'rsrc/css/phui/phui-chart.css' => '6bf6f78e', 129 129 'rsrc/css/phui/phui-crumbs-view.css' => '6b813619', 130 130 'rsrc/css/phui/phui-curtain-view.css' => '7148ae25', 131 - 'rsrc/css/phui/phui-document-pro.css' => '8419560b', 131 + 'rsrc/css/phui/phui-document-pro.css' => 'a3730b94', 132 132 'rsrc/css/phui/phui-document-summary.css' => '9ca48bdf', 133 133 'rsrc/css/phui/phui-document.css' => '715aedfb', 134 134 'rsrc/css/phui/phui-feed-story.css' => 'aa49845d', ··· 808 808 'phabricator-uiexample-reactor-sendclass' => '1def2711', 809 809 'phabricator-uiexample-reactor-sendproperties' => 'b1f0ccee', 810 810 'phabricator-zindex-css' => '5b6fcf3f', 811 - 'phame-css' => 'b78f5f1e', 811 + 'phame-css' => '19ba0afc', 812 812 'pholio-css' => 'ca89d380', 813 813 'pholio-edit-css' => '07676f51', 814 814 'pholio-inline-comments-css' => '8e545e49', ··· 831 831 'phui-curtain-view-css' => '7148ae25', 832 832 'phui-document-summary-view-css' => '9ca48bdf', 833 833 'phui-document-view-css' => '715aedfb', 834 - 'phui-document-view-pro-css' => '8419560b', 834 + 'phui-document-view-pro-css' => 'a3730b94', 835 835 'phui-feed-story-css' => 'aa49845d', 836 836 'phui-font-icon-base-css' => '6449bce8', 837 837 'phui-fontkit-css' => '9cda225e',
+1
src/applications/phame/controller/PhameLiveController.php
··· 58 58 $blog_query = id(new PhameBlogQuery()) 59 59 ->setViewer($viewer) 60 60 ->needProfileImage(true) 61 + ->needHeaderImage(true) 61 62 ->withIDs(array($blog_id)); 62 63 63 64 // If this is a live view, only show active blogs.
+23
src/applications/phame/controller/blog/PhameBlogViewController.php
··· 32 32 33 33 $posts = $post_query->executeWithCursorPager($pager); 34 34 35 + $hero = $this->buildHeaderImage($blog); 36 + 35 37 $header = id(new PHUIHeaderView()) 36 38 ->setHeader($blog->getName()) 37 39 ->setUser($viewer); ··· 109 111 ->setCrumbs($crumbs) 110 112 ->appendChild( 111 113 array( 114 + $hero, 112 115 $page, 113 116 $about, 114 117 )); ··· 150 153 ->setName(pht('Manage Blog'))); 151 154 152 155 return $actions; 156 + } 157 + 158 + private function buildHeaderImage( 159 + PhameBlog $blog) { 160 + 161 + if ($blog->getHeaderImagePHID()) { 162 + $view = phutil_tag( 163 + 'div', 164 + array( 165 + 'class' => 'phame-header-hero', 166 + ), 167 + phutil_tag( 168 + 'img', 169 + array( 170 + 'src' => $blog->getHeaderImageURI(), 171 + 'class' => 'phame-header-image', 172 + ))); 173 + return $view; 174 + } 175 + return null; 153 176 } 154 177 155 178 }
+10
webroot/rsrc/css/application/phame/phame.css
··· 250 250 color: {$darkgreytext}; 251 251 background: {$greybackground}; 252 252 } 253 + 254 + /* Hero Image */ 255 + .phame-header-hero { 256 + background-color: #fff; 257 + } 258 + 259 + .phame-header-image { 260 + max-height: 240px; 261 + margin: 0 auto; 262 + }
+2 -2
webroot/rsrc/css/phui/phui-document-pro.css
··· 121 121 } 122 122 123 123 .device-phone .phui-document-view.phui-document-view-pro .phui-header-shell { 124 - margin: 8px 0 0 0; 125 - padding: 8px 0 20px; 124 + margin: 0; 125 + padding: 16px 0 20px; 126 126 } 127 127 128 128 .phui-document-view.phui-document-view-pro .phui-header-tall