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:
@@ -73,18 +73,6 @@ final class DiffusionReadmeView extends DiffusionView {
|
||||
->getOutput($markup_object, $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;
|
||||
$class = null;
|
||||
@@ -106,15 +94,13 @@ final class DiffusionReadmeView extends DiffusionView {
|
||||
}
|
||||
|
||||
$readme_content = phutil_tag_div($class, $readme_content);
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($readme_name);
|
||||
|
||||
$document = id(new PHUIDocumentViewPro())
|
||||
->setFluid(true)
|
||||
->appendChild($readme_content);
|
||||
|
||||
return id(new PHUIObjectBoxView())
|
||||
->setHeader($header)
|
||||
->setHeaderText($readme_name)
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->appendChild($document)
|
||||
->addClass('diffusion-readme-view');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user