Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15404894
D8422.id20000.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
14 KB
Referenced Files
None
Subscribers
None
D8422.id20000.diff
View Options
diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -7,7 +7,7 @@
return array(
'names' =>
array(
- 'core.pkg.css' => '9cc0bd27',
+ 'core.pkg.css' => '2ed3f133',
'core.pkg.js' => 'b7bdab05',
'darkconsole.pkg.js' => 'ca8671ce',
'differential.pkg.css' => 'd1b3a605',
@@ -115,7 +115,7 @@
'rsrc/css/core/remarkup.css' => 'ca7f2265',
'rsrc/css/core/syntax.css' => '3c18c1cb',
'rsrc/css/core/z-index.css' => '0fd29d49',
- 'rsrc/css/diviner/diviner-shared.css' => 'be90f718',
+ 'rsrc/css/diviner/diviner-shared.css' => '38813222',
'rsrc/css/layout/phabricator-action-header-view.css' => 'c14dfc57',
'rsrc/css/layout/phabricator-action-list-view.css' => '81383e25',
'rsrc/css/layout/phabricator-crumbs-view.css' => '2d9db584',
@@ -129,11 +129,12 @@
'rsrc/css/phui/calendar/phui-calendar.css' => '5e1ad989',
'rsrc/css/phui/phui-box.css' => 'a36cf3a5',
'rsrc/css/phui/phui-button.css' => '8784a966',
- 'rsrc/css/phui/phui-document.css' => '143b2ac8',
+ 'rsrc/css/phui/phui-document.css' => 'b56323cf',
'rsrc/css/phui/phui-feed-story.css' => '3a59c2cf',
+ 'rsrc/css/phui/phui-fontkit.css' => 'de84aa4a',
'rsrc/css/phui/phui-form-view.css' => '0efd3326',
'rsrc/css/phui/phui-form.css' => 'b78ec020',
- 'rsrc/css/phui/phui-header-view.css' => '472a6003',
+ 'rsrc/css/phui/phui-header-view.css' => 'b76a37b3',
'rsrc/css/phui/phui-icon.css' => '7a5771a9',
'rsrc/css/phui/phui-info-panel.css' => '27ea50a1',
'rsrc/css/phui/phui-list.css' => '2edb76cf',
@@ -516,7 +517,7 @@
'diffusion-commit-view-css' => '92d1e8f9',
'diffusion-icons-css' => '384a0f7d',
'diffusion-source-css' => '66fdf661',
- 'diviner-shared-css' => 'be90f718',
+ 'diviner-shared-css' => '38813222',
'global-drag-and-drop-css' => '697324ad',
'herald-css' => '59d48f01',
'herald-rule-editor' => '4f31d692',
@@ -744,11 +745,12 @@
'phui-calendar-day-css' => 'de035c8a',
'phui-calendar-list-css' => 'c1d0ca59',
'phui-calendar-month-css' => '5e762971',
- 'phui-document-view-css' => '143b2ac8',
+ 'phui-document-view-css' => 'b56323cf',
'phui-feed-story-css' => '3a59c2cf',
+ 'phui-fontkit-css' => 'de84aa4a',
'phui-form-css' => 'b78ec020',
'phui-form-view-css' => '0efd3326',
- 'phui-header-view-css' => '472a6003',
+ 'phui-header-view-css' => 'b76a37b3',
'phui-icon-view-css' => '7a5771a9',
'phui-info-panel-css' => '27ea50a1',
'phui-list-view-css' => '2edb76cf',
diff --git a/src/applications/base/controller/PhabricatorController.php b/src/applications/base/controller/PhabricatorController.php
--- a/src/applications/base/controller/PhabricatorController.php
+++ b/src/applications/base/controller/PhabricatorController.php
@@ -222,6 +222,10 @@
$page->setDeviceReady(true);
}
+ if (idx($options, 'fonts')) {
+ $page->setExtraFonts(true);
+ }
+
$page->setShowChrome(idx($options, 'chrome', true));
$application_menu = $this->buildApplicationMenu();
diff --git a/src/applications/diviner/controller/DivinerAtomController.php b/src/applications/diviner/controller/DivinerAtomController.php
--- a/src/applications/diviner/controller/DivinerAtomController.php
+++ b/src/applications/diviner/controller/DivinerAtomController.php
@@ -121,6 +121,7 @@
$document = id(new PHUIDocumentView())
->setBook($book->getTitle(), $group_name)
->setHeader($header)
+ ->setFontKit(PHUIDocumentView::FONT_SOURCE_SANS)
->appendChild($properties)
->appendChild($warnings)
->appendChild($content);
@@ -248,6 +249,7 @@
array(
'title' => $symbol->getTitle(),
'device' => true,
+ 'fonts' => true,
));
}
@@ -460,10 +462,8 @@
case DivinerAtom::TYPE_METHOD:
case DivinerAtom::TYPE_FUNCTION:
break;
- case DivinerAtom::TYPE_ARTICLE:
- return $symbol->getTitle();
default:
- return null;
+ return $symbol->getTitle();
}
$atom = $symbol->getAtom();
diff --git a/src/applications/diviner/controller/DivinerBookController.php b/src/applications/diviner/controller/DivinerBookController.php
--- a/src/applications/diviner/controller/DivinerBookController.php
+++ b/src/applications/diviner/controller/DivinerBookController.php
@@ -38,6 +38,7 @@
$document = new PHUIDocumentView();
$document->setHeader($header);
+ $document->setFontKit(PHUIDocumentView::FONT_SOURCE_SANS);
$properties = $this->buildPropertyList($book);
@@ -68,7 +69,19 @@
$section->addContent($this->renderAtomList($atoms));
$out[] = $section;
}
+
+ $preface = $book->getPreface();
+ $preface_view = null;
+ if (strlen($preface)) {
+ $preface_view =
+ PhabricatorMarkupEngine::renderOneObject(
+ id(new PhabricatorMarkupOneOff())->setContent($preface),
+ 'default',
+ $viewer);
+ }
+
$document->appendChild($properties);
+ $document->appendChild($preface_view);
$document->appendChild($out);
return $this->buildApplicationPage(
@@ -79,6 +92,7 @@
array(
'title' => $book->getTitle(),
'device' => true,
+ 'fonts' => true,
));
}
@@ -95,15 +109,6 @@
pht('Updated'),
phabricator_datetime($book->getDateModified(), $viewer));
- $preface = $book->getPreface();
- if (strlen($preface)) {
- $view->addTextContent(
- PhabricatorMarkupEngine::renderOneObject(
- id(new PhabricatorMarkupOneOff())->setContent($preface),
- 'default',
- $viewer));
- }
-
return $view;
}
diff --git a/src/applications/diviner/controller/DivinerFindController.php b/src/applications/diviner/controller/DivinerFindController.php
--- a/src/applications/diviner/controller/DivinerFindController.php
+++ b/src/applications/diviner/controller/DivinerFindController.php
@@ -86,6 +86,7 @@
array(
'title' => array(pht('Find'), pht('"%s"', $query_text)),
'device' => true,
+ 'fonts' => true,
));
}
diff --git a/src/applications/diviner/controller/DivinerMainController.php b/src/applications/diviner/controller/DivinerMainController.php
--- a/src/applications/diviner/controller/DivinerMainController.php
+++ b/src/applications/diviner/controller/DivinerMainController.php
@@ -33,23 +33,27 @@
$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 @@
array(
'title' => pht('Documentation Books'),
'device' => true,
+ 'fonts' => true,
));
}
}
diff --git a/src/view/page/PhabricatorStandardPageView.php b/src/view/page/PhabricatorStandardPageView.php
--- a/src/view/page/PhabricatorStandardPageView.php
+++ b/src/view/page/PhabricatorStandardPageView.php
@@ -12,6 +12,7 @@
private $glyph;
private $menuContent;
private $showChrome = true;
+ private $extraFonts;
private $disableConsole;
private $pageObjects = array();
private $applicationMenu;
@@ -57,6 +58,15 @@
return $this->showChrome;
}
+ public function setExtraFonts($extra) {
+ $this->extraFonts = $extra;
+ return $this;
+ }
+
+ public function getExtraFonts() {
+ return $this->extraFonts;
+ }
+
public function appendPageObjects(array $objs) {
foreach ($objs as $obj) {
$this->pageObjects[] = $obj;
@@ -233,8 +243,16 @@
$response = CelerityAPI::getStaticResourceResponse();
+ $fonts = null;
+ if ($this->getExtraFonts()) {
+ $fonts = hsprintf("<link
+ href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700'
+ rel='stylesheet'
+ type='text/css'>");
+ }
+
return hsprintf(
- '%s<style type="text/css">'.
+ '%s%s<style type="text/css">'.
'.PhabricatorMonospaced, '.
'.phabricator-remarkup .remarkup-code-block { font: %s; } '.
'.platform-windows .PhabricatorMonospaced, '.
@@ -242,6 +260,7 @@
'.remarkup-code-block { font: %s; }'.
'</style>%s',
parent::getHead(),
+ $fonts,
phutil_safe_html($monospaced),
phutil_safe_html($monospaced_win),
$response->renderSingleResource('javelin-magical-init', 'phabricator'));
diff --git a/src/view/phui/PHUIDocumentView.php b/src/view/phui/PHUIDocumentView.php
--- a/src/view/phui/PHUIDocumentView.php
+++ b/src/view/phui/PHUIDocumentView.php
@@ -5,6 +5,7 @@
/* For mobile displays, where do you want the sidebar */
const NAV_BOTTOM = 'nav_bottom';
const NAV_TOP = 'nav_top';
+ const FONT_SOURCE_SANS = 'source-sans';
private $offset;
private $header;
@@ -14,6 +15,7 @@
private $bookname;
private $bookdescription;
private $mobileview;
+ private $fontKit;
public function setOffset($offset) {
$this->offset = $offset;
@@ -50,6 +52,11 @@
return $this;
}
+ public function setFontKit($kit) {
+ $this->fontKit = $kit;
+ return $this;
+ }
+
public function getTagAttributes() {
$classes = array();
@@ -64,6 +71,9 @@
public function getTagContent() {
require_celerity_resource('phui-document-view-css');
+ if ($this->fontKit) {
+ require_celerity_resource('phui-fontkit-css');
+ }
$classes = array();
$classes[] = 'phui-document-view';
@@ -122,6 +132,17 @@
$this->bookName);
}
+ if ($this->fontKit) {
+ $main_content = phutil_tag(
+ 'div',
+ array(
+ 'class' => 'phui-font-'.$this->fontKit
+ ),
+ $this->renderChildren());
+ } else {
+ $main_content = $this->renderChildren();
+ }
+
$content_inner = phutil_tag(
'div',
array(
@@ -131,7 +152,7 @@
$book,
$this->header,
$topnav,
- $this->renderChildren(),
+ $main_content,
$crumbs
));
diff --git a/webroot/rsrc/css/diviner/diviner-shared.css b/webroot/rsrc/css/diviner/diviner-shared.css
--- a/webroot/rsrc/css/diviner/diviner-shared.css
+++ b/webroot/rsrc/css/diviner/diviner-shared.css
@@ -15,10 +15,6 @@
margin: 0 8px 16px;
}
-a.diviner-atom-signature-name {
- color: {$violet};
-}
-
.diviner-table-header {
padding: 4px 16px;
background-color: {$greybackground};
@@ -71,6 +67,8 @@
body .diviner-document-section .phui-header-view {
width: 100%;
+ font-size: 20px;
+ font-weight: 400;
}
.phui-property-list-view + .diviner-document-section {
@@ -92,7 +90,8 @@
}
.diviner-list .diviner-atom-signature {
- color: {$greytext};
+ color: {$violet};
+ margin-left: -16px;
}
.diviner-list a {
@@ -120,9 +119,13 @@
padding-top: 0;
}
+.diviner-list {
+ padding-left: 12px;
+}
+
.diviner-list li {
- line-height: 18px;
- padding-bottom: 4px;
+ line-height: 20px;
+ padding-bottom: 12px;
}
/* - Book Index ----------------------------------------------------------------
@@ -133,8 +136,8 @@
.diviner-book-item {
display: block;
- padding: 4px 16px;
- margin: 0 -16px;
+ padding: 6px 16px;
+ margin: 4px -16px;
}
.diviner-book-item:hover {
@@ -142,11 +145,13 @@
}
.device-desktop .diviner-book-item:hover {
- background-color: {$lightgreybackground};
+ background-color: #F5EEFF;
}
.diviner-book-item-title {
- font-weight: bold;
+ font-weight: 700;
+ font-size: 16px;
+ color: {$darkbluetext};
}
.diviner-book-item-type {
@@ -156,6 +161,6 @@
.diviner-book-item-subtitle {
display: block;
- line-height: 18px;
- color: {$lightbluetext};
+ line-height: 20px;
+ color: {$lightgreytext};
}
diff --git a/webroot/rsrc/css/phui/phui-document.css b/webroot/rsrc/css/phui/phui-document.css
--- a/webroot/rsrc/css/phui/phui-document.css
+++ b/webroot/rsrc/css/phui/phui-document.css
@@ -77,7 +77,7 @@
.phui-header-shell.phui-header-no-backgound
.phui-header-view {
padding: 8px 0 4px;
- font-size: 14px;
+ font-size: 15px;
}
.phui-document-content .phui-header-view {
diff --git a/webroot/rsrc/css/phui/phui-fontkit.css b/webroot/rsrc/css/phui/phui-fontkit.css
new file mode 100644
--- /dev/null
+++ b/webroot/rsrc/css/phui/phui-fontkit.css
@@ -0,0 +1,38 @@
+/**
+ * @provides phui-fontkit-css
+ */
+
+.phui-font-source-sans {
+ font-family: 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif;
+ font-size: 15px;
+ font-weight: 400;
+ line-height: 20px;
+}
+
+.phui-font-source-sans .phabricator-remarkup h2 {
+ padding: 8px 24px 8px 0;
+ border-bottom: 1px solid {$thinblueborder};
+ font-size: 20px;
+ font-weight: 400;
+ color: {$bluetext};
+ margin: 0 0 16px;
+}
+
+.phui-font-source-sans .phabricator-remarkup tt {
+ font-size: 13px;
+ padding: 1px 3px 2px;
+}
+
+.phui-font-source-sans .phui-property-list-section {
+ border-bottom: 1px solid {$thinblueborder};
+ margin-bottom: 8px;
+ background: {$lightgreybackground};
+}
+
+.phui-font-source-sans .phui-property-list-container {
+ padding-bottom: 6px;
+}
+
+.phui-font-source-sans a {
+ color: {$blue};
+}
diff --git a/webroot/rsrc/css/phui/phui-header-view.css b/webroot/rsrc/css/phui/phui-header-view.css
--- a/webroot/rsrc/css/phui/phui-header-view.css
+++ b/webroot/rsrc/css/phui/phui-header-view.css
@@ -16,16 +16,15 @@
}
body .phui-header-shell.phui-bleed-header {
- background-color: {$lightgreybackground};
- border-top: 1px solid {$thinblueborder};
- border-bottom: none;
+ background-color: #fff;
+ border-bottom: 1px solid {$thinblueborder};
width: auto;
- margin-bottom: 16px;
+ margin: 16px;
}
body .phui-header-shell.phui-bleed-header
.phui-header-view {
- padding: 8px 24px 8px 16px;
+ padding: 8px 24px 8px 0;
color: {$bluetext};
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 19, 9:33 AM (1 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7711141
Default Alt Text
D8422.id20000.diff (14 KB)
Attached To
Mode
D8422: Pretty up Diviner with new fonts, colors, lots of spacing
Attached
Detach File
Event Timeline
Log In to Comment