mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52:41 +01:00
Improve diffusion readme layout
Summary: Uses more standard objects and more padding for reading. Removes the ToC, which is visually broken anyways. Test Plan: Review a README.md in a local repository. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D17752
This commit is contained in:
parent
7c61ace086
commit
d3546f94c1
3 changed files with 9 additions and 18 deletions
|
@ -72,7 +72,7 @@ return array(
|
||||||
'rsrc/css/application/differential/revision-list.css' => 'f3c47d33',
|
'rsrc/css/application/differential/revision-list.css' => 'f3c47d33',
|
||||||
'rsrc/css/application/differential/table-of-contents.css' => 'ae4b7a55',
|
'rsrc/css/application/differential/table-of-contents.css' => 'ae4b7a55',
|
||||||
'rsrc/css/application/diffusion/diffusion-icons.css' => 'a6a1e2ba',
|
'rsrc/css/application/diffusion/diffusion-icons.css' => 'a6a1e2ba',
|
||||||
'rsrc/css/application/diffusion/diffusion-readme.css' => '297373eb',
|
'rsrc/css/application/diffusion/diffusion-readme.css' => '18bd3910',
|
||||||
'rsrc/css/application/diffusion/diffusion-source.css' => '750add59',
|
'rsrc/css/application/diffusion/diffusion-source.css' => '750add59',
|
||||||
'rsrc/css/application/feed/feed.css' => 'ecd4ec57',
|
'rsrc/css/application/feed/feed.css' => 'ecd4ec57',
|
||||||
'rsrc/css/application/files/global-drag-and-drop.css' => '5c1b47c2',
|
'rsrc/css/application/files/global-drag-and-drop.css' => '5c1b47c2',
|
||||||
|
@ -579,7 +579,7 @@ return array(
|
||||||
'differential-revision-list-css' => 'f3c47d33',
|
'differential-revision-list-css' => 'f3c47d33',
|
||||||
'differential-table-of-contents-css' => 'ae4b7a55',
|
'differential-table-of-contents-css' => 'ae4b7a55',
|
||||||
'diffusion-icons-css' => 'a6a1e2ba',
|
'diffusion-icons-css' => 'a6a1e2ba',
|
||||||
'diffusion-readme-css' => '297373eb',
|
'diffusion-readme-css' => '18bd3910',
|
||||||
'diffusion-source-css' => '750add59',
|
'diffusion-source-css' => '750add59',
|
||||||
'diviner-shared-css' => '896f1d43',
|
'diviner-shared-css' => '896f1d43',
|
||||||
'font-fontawesome' => 'e838e088',
|
'font-fontawesome' => 'e838e088',
|
||||||
|
|
|
@ -73,18 +73,6 @@ final class DiffusionReadmeView extends DiffusionView {
|
||||||
->getOutput($markup_object, $markup_field);
|
->getOutput($markup_object, $markup_field);
|
||||||
|
|
||||||
$engine = $markup_object->newMarkupEngine($markup_field);
|
$engine = $markup_object->newMarkupEngine($markup_field);
|
||||||
$toc = PhutilRemarkupHeaderBlockRule::renderTableOfContents($engine);
|
|
||||||
if ($toc) {
|
|
||||||
$toc = phutil_tag_div(
|
|
||||||
'phabricator-remarkup-toc',
|
|
||||||
array(
|
|
||||||
phutil_tag_div(
|
|
||||||
'phabricator-remarkup-toc-header',
|
|
||||||
pht('Table of Contents')),
|
|
||||||
$toc,
|
|
||||||
));
|
|
||||||
$content = array($toc, $content);
|
|
||||||
}
|
|
||||||
|
|
||||||
$readme_content = $content;
|
$readme_content = $content;
|
||||||
$class = null;
|
$class = null;
|
||||||
|
@ -106,15 +94,13 @@ final class DiffusionReadmeView extends DiffusionView {
|
||||||
}
|
}
|
||||||
|
|
||||||
$readme_content = phutil_tag_div($class, $readme_content);
|
$readme_content = phutil_tag_div($class, $readme_content);
|
||||||
$header = id(new PHUIHeaderView())
|
|
||||||
->setHeader($readme_name);
|
|
||||||
|
|
||||||
$document = id(new PHUIDocumentViewPro())
|
$document = id(new PHUIDocumentViewPro())
|
||||||
->setFluid(true)
|
->setFluid(true)
|
||||||
->appendChild($readme_content);
|
->appendChild($readme_content);
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
return id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeaderText($readme_name)
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->appendChild($document)
|
->appendChild($document)
|
||||||
->addClass('diffusion-readme-view');
|
->addClass('diffusion-readme-view');
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,4 +11,9 @@
|
||||||
|
|
||||||
.diffusion-readme-view .phui-document-container {
|
.diffusion-readme-view .phui-document-container {
|
||||||
border: none;
|
border: none;
|
||||||
|
padding: 24px 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.diffusion-readme-view .phabricator-remarkup-toc {
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue