Support WOFF files in Celerity and add Source Sans Pro
Summary:
- Allow Celerity to map and serve WOFF files.
- Add Source Sans Pro, Source Sans Pro Bold, and the corresponding LICENSE.
- Add a `font-source-sans-pro` resource for the font.
Test Plan:
- Changed body `font-face` to `'Source Sans Pro'`.
- Added `require_celerity_resource('font-source-sans-pro')` in StandardPageView.
Works in Firefox/Chrome/Safari, at least:
{F123296}
{F123297}
{F123298}
Reviewers: btrahan, chad
Reviewed By: chad
CC: chad, aran
Differential Revision: https://secure.phabricator.com/D8430
This commit is contained in:
@@ -33,23 +33,27 @@ final class DivinerMainController extends DivinerController {
|
||||
|
||||
$document = new PHUIDocumentView();
|
||||
$document->setHeader($header);
|
||||
$document->setFontKit(PHUIDocumentView::FONT_SOURCE_SANS);
|
||||
|
||||
if ($books) {
|
||||
$list = id(new PHUIObjectItemListView())
|
||||
->setUser($viewer)
|
||||
->setPlain(true);
|
||||
|
||||
$books = msort($books, 'getTitle');
|
||||
$list = array();
|
||||
foreach ($books as $book) {
|
||||
$item = id(new PHUIObjectItemView())
|
||||
$item = id(new DivinerBookItemView())
|
||||
->setTitle($book->getTitle())
|
||||
->setHref('/book/'.$book->getName().'/')
|
||||
->setHeader($book->getTitle())
|
||||
->addAttribute($book->getPreface());
|
||||
|
||||
$list->addItem($item);
|
||||
->setSubtitle($book->getPreface());
|
||||
$list[] = $item;
|
||||
}
|
||||
$list = id(new PHUIBoxView())
|
||||
->addPadding(PHUI::PADDING_LARGE_LEFT)
|
||||
->addPadding(PHUI::PADDING_LARGE_RIGHT)
|
||||
->addPadding(PHUI::PADDING_SMALL_TOP)
|
||||
->addPadding(PHUI::PADDING_SMALL_BOTTOM)
|
||||
->appendChild($list);
|
||||
|
||||
$document->appendChild($list);
|
||||
|
||||
} else {
|
||||
$text = pht(
|
||||
"(NOTE) **Looking for Phabricator documentation?** If you're looking ".
|
||||
@@ -84,6 +88,7 @@ final class DivinerMainController extends DivinerController {
|
||||
array(
|
||||
'title' => pht('Documentation Books'),
|
||||
'device' => true,
|
||||
'fonts' => true,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user