1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-02 19:52:44 +01:00
phorge-phorge/src/applications/uiexample/examples/PhabricatorRemarkupExample.php
epriestley beccedb57c Make the "NOTE:" text bold and slightly darker
Summary: See screenshot. This does look like an improvement to me.

Test Plan: {F133255}

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley, chad

Differential Revision: https://secure.phabricator.com/D8597
2014-03-22 18:06:46 -07:00

57 lines
1.1 KiB
PHP

<?php
final class PhabricatorRemarkupExample extends PhabricatorUIExample {
public function getName() {
return pht('Remarkup');
}
public function getDescription() {
return pht(
'Demonstrates the visual appearance of various Remarkup elements.');
}
public function renderExample() {
$viewer = $this->getRequest()->getUser();
$content = pht(<<<EOCONTENT
This is some **remarkup text** using ~~exactly one style~~ //various styles//.
- Fruit
- Apple
- Banana
- Cherry
- Vegetables
1. Carrot
2. Celery
NOTE: This is a note.
(NOTE) This is also a note.
WARNING: This is a warning.
(WARNING) This is also a warning.
IMPORTANT: This is not really important.
(IMPORTANT) This isn't important either.
EOCONTENT
);
$remarkup = PhabricatorMarkupEngine::renderOneObject(
id(new PhabricatorMarkupOneOff())->setContent($content),
'default',
$viewer);
$frame = id(new PHUIBoxView())
->addPadding(PHUI::PADDING_LARGE)
->appendChild($remarkup);
return id(new PHUIObjectBoxView())
->setHeaderText(pht('Remarkup Example'))
->appendChild($frame);
}
}