Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14012254
D12330.id29619.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D12330.id29619.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
@@ -64,6 +64,7 @@
'rsrc/css/application/differential/revision-list.css' => 'f3c47d33',
'rsrc/css/application/differential/table-of-contents.css' => '63f3ef4a',
'rsrc/css/application/diffusion/diffusion-icons.css' => '9c5828da',
+ 'rsrc/css/application/diffusion/diffusion-readme.css' => '2106ea08',
'rsrc/css/application/diffusion/diffusion-source.css' => '66fdf661',
'rsrc/css/application/feed/feed.css' => 'b513b5f4',
'rsrc/css/application/files/global-drag-and-drop.css' => '697324ad',
@@ -531,6 +532,7 @@
'differential-revision-list-css' => 'f3c47d33',
'differential-table-of-contents-css' => '63f3ef4a',
'diffusion-icons-css' => '9c5828da',
+ 'diffusion-readme-css' => '2106ea08',
'diffusion-source-css' => '66fdf661',
'diviner-shared-css' => '38813222',
'font-fontawesome' => 'ae9a7b4d',
diff --git a/src/applications/diffusion/view/DiffusionReadmeView.php b/src/applications/diffusion/view/DiffusionReadmeView.php
--- a/src/applications/diffusion/view/DiffusionReadmeView.php
+++ b/src/applications/diffusion/view/DiffusionReadmeView.php
@@ -53,6 +53,7 @@
$readme_path = $this->getPath();
$readme_name = basename($readme_path);
$interpreter = $this->getReadmeLanguage($readme_name);
+ require_celerity_resource('diffusion-readme-css');
$content = $this->getContent();
@@ -86,7 +87,7 @@
}
$readme_content = $content;
- $class = 'phabricator-remarkup';
+ $class = null;
break;
case 'rainbow':
$content = id(new PhutilRainbowSyntaxHighlighter())
@@ -95,30 +96,25 @@
$readme_content = phutil_escape_html_newlines($content);
require_celerity_resource('syntax-highlighting-css');
- $class = 'remarkup-code';
+ $class = 'remarkup-code ml';
break;
default:
case 'text':
$readme_content = phutil_escape_html_newlines($content);
+ $class = 'ml';
break;
}
- $readme_content = phutil_tag(
- 'div',
- array(
- 'class' => $class,
- ),
- $readme_content);
+ $readme_content = phutil_tag_div($class, $readme_content);
+ $header = id(new PHUIHeaderView())
+ ->setHeader($readme_name);
- $box = new PHUIBoxView();
- $box->appendChild($readme_content);
- $box->addPadding(PHUI::PADDING_LARGE);
-
- $object_box = id(new PHUIObjectBoxView())
- ->setHeaderText($readme_name)
- ->appendChild($box);
-
- return $object_box;
+ return id(new PHUIDocumentView())
+ ->setFluid(true)
+ ->appendChild($readme_content)
+ ->addClass('diffusion-readme-view')
+ ->setHeader($header)
+ ->setFontKit(PHUIDocumentView::FONT_SOURCE_SANS);
}
}
diff --git a/webroot/rsrc/css/application/diffusion/diffusion-readme.css b/webroot/rsrc/css/application/diffusion/diffusion-readme.css
new file mode 100644
--- /dev/null
+++ b/webroot/rsrc/css/application/diffusion/diffusion-readme.css
@@ -0,0 +1,14 @@
+/**
+ * @provides diffusion-readme-css
+ */
+
+.device .diffusion-readme-view {
+ margin: 16px 8px 0;
+ background-color: #fff;
+ border: 1px solid {$lightblueborder};
+ border-bottom: 1px solid {$blueborder};
+}
+
+.device-tablet .diffusion-readme-view {
+ margin: 16px;
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 2, 9:52 AM (2 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6730521
Default Alt Text
D12330.id29619.diff (3 KB)
Attached To
Mode
D12330: Send Markdown in Diffusion through SourceSans
Attached
Detach File
Event Timeline
Log In to Comment