phorge/src/applications/uiexample/examples/PhabricatorTwoColumnExample.php
Chad Little f2cec9f973 Apront Two Column View
Summary: Wanted to pull this out in case we don't use it in Maniphest, still useful perhaps in the future. Creates a sidebar that wraps when on mobile.

Test Plan: Tested UIExample

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5321
2013-03-10 19:20:01 -07:00

37 lines
726 B
PHP

<?php
final class PhabricatorTwoColumnExample extends PhabricatorUIExample {
public function getName() {
return 'Two Column Layout';
}
public function getDescription() {
return 'Two Column mobile friendly layout';
}
public function renderExample() {
$main = phutil_tag(
'div',
array(
'style' => 'border: 1px solid blue; padding: 20px;'
),
'Mary, mary quite contrary.');
$side = phutil_tag(
'div',
array(
'style' => 'border: 1px solid red; padding: 20px;'
),
'How does your garden grow?');
$content = id(new AphrontTwoColumnView)
->setMainColumn($main)
->setSideColumn($side);
return $content;
}
}